15 #include <dpsim-models/Logger.h>
16 #include <dpsim-models/SystemTopology.h>
17 #include <dpsim-models/Task.h>
18 #include <dpsim/Config.h>
19 #include <dpsim/Definitions.h>
20 #include <dpsim/DirectLinearSolverConfiguration.h>
32 typedef std::shared_ptr<Solver> Ptr;
33 typedef std::vector<Ptr> List;
68 Solver(String name, CPS::Logger::Level logLevel)
71 CPS::
Logger::Level::warn)) {}
78 enum class Type { MNA, DAE, NRP };
80 void setTimeStep(Real timeStep) {
mTimeStep = timeStep; }
82 void doFrequencyParallelization(Bool freqParallel) {
88 void doSystemMatrixRecomputation(Bool value) {
94 virtual void initialize() {}
119 virtual void log(Real time, Int timeStepCount){};
123 void setMaxNumberOfIterations(
int maxIterations) {
The Simulation holds a SystemTopology and a Solver.
Base class for more specific solvers such as MNA, ODE or IDA.
String mName
Name for logging.
Real mSteadStIniAccLimit
steady state initialization accuracy limit
void setSteadStIniAccLimit(Real v)
set steady state initialization accuracy limit
Real mTimeStep
Time step for fixed step solvers.
Bool mSystemMatrixRecomputation
Enable recomputation of system matrix during simulation.
Behaviour mBehaviour
Solver behaviour initialization or simulation.
CPS::Logger::Log mSLog
Logger.
CPS::Logger::Level mLogLevel
Logging level.
Bool mIsInInitialization
Determines if solver is in initialization phase, which requires different behavior.
Real mSteadStIniTimeLimit
steady state initialization time limit
Bool mInitFromNodesAndTerminals
void doSteadyStateInit(Bool f)
activate steady state initialization
Bool mFrequencyParallel
Activates parallelized computation of frequencies.
virtual void setDirectLinearSolverConfiguration(DirectLinearSolverConfiguration &)
set direct linear solver configuration (only available in MNA for now)
virtual void logLUTimes()
log LU decomposition times, if applicable
virtual void setSolverAndComponentBehaviour(Solver::Behaviour behaviour)
set solver and component to initialization or simulation behaviour
virtual void log(Real time, Int timeStepCount)
Log results.
Bool mSteadyStateInit
Activates steady state initialization.
void setSteadStIniTimeLimit(Real v)
set steady state initialization time limit
virtual CPS::Task::List getTasks()=0
Get tasks for scheduler.
void doInitFromNodesAndTerminals(Bool f)
activate powerflow initialization
Holds switching time and which system should be activated.