NREL-Sienna / PowerSimulationsDynamics.jl

Julia package to run Dynamic Power System simulations. Part of the Scalable Integrated Infrastructure Planning Initiative at the National Renewable Energy Lab.
https://nrel-sienna.github.io/PowerSimulationsDynamics.jl/stable/
BSD 3-Clause "New" or "Revised" License
177 stars 42 forks source link

add ext to StaticWrapper #330

Closed m-bossart closed 1 year ago

m-bossart commented 1 year ago

Adds an ext field to StaticWrapper. The reason for this change is to allow for implementing new surrogate models which are <:StaticInjection with minimal changes to PSID. Also creates a function _add_callback! to allow for handling different types of perturbations when building the callback vector. In my case this allows me to define a perturbation which is essentially just for saving values during the simulation.

github-actions[bot] commented 1 year ago
Performance Results Version Precompile Time
Main 4.218129469
This Branch 4.254199951
Version Execute Time
Main-Build ResidualModel 13.342424062
Main-Execute ResidualModel 35.023363557
Main-Build MassMatrixModel 1.254934006
Main-Execute MassMatrixModel 475.690200818
This Branch-Build ResidualModel 13.146839685
This Branch-Execute ResidualModel 34.733988117
This Branch-Build MassMatrixModel 1.173911703
This Branch-Execute MassMatrixModel 466.540549874

ResidualModel and MassMatrixModel performance results should be compared between versions and not between models due to the execution order of the tests