PhysiologyEngine.h
73 //--------------------------------------------------------------------------------------------------
76 //--------------------------------------------------------------------------------------------------
79 //--------------------------------------------------------------------------------------------------
86 //--------------------------------------------------------------------------------------------------
89 //--------------------------------------------------------------------------------------------------
94 //--------------------------------------------------------------------------------------------------
97 //--------------------------------------------------------------------------------------------------
104 //--------------------------------------------------------------------------------------------------
107 //--------------------------------------------------------------------------------------------------
112 //--------------------------------------------------------------------------------------------------
115 //--------------------------------------------------------------------------------------------------
123 //--------------------------------------------------------------------------------------------------
124 virtual bool InitializeEngine(const std::string& patient_configuration, eSerializationFormat m) = 0;
126 //--------------------------------------------------------------------------------------------------
133 //--------------------------------------------------------------------------------------------------
136 //--------------------------------------------------------------------------------------------------
141 //--------------------------------------------------------------------------------------------------
144 //--------------------------------------------------------------------------------------------------
149 //--------------------------------------------------------------------------------------------------
152 //--------------------------------------------------------------------------------------------------
157 //--------------------------------------------------------------------------------------------------
160 //--------------------------------------------------------------------------------------------------
167 //--------------------------------------------------------------------------------------------------
170 //--------------------------------------------------------------------------------------------------
173 //--------------------------------------------------------------------------------------------------
176 //--------------------------------------------------------------------------------------------------
181 //--------------------------------------------------------------------------------------------------
184 //--------------------------------------------------------------------------------------------------
188 //--------------------------------------------------------------------------------------------------
191 //--------------------------------------------------------------------------------------------------
194 //--------------------------------------------------------------------------------------------------
197 //--------------------------------------------------------------------------------------------------
200 //--------------------------------------------------------------------------------------------------
203 //--------------------------------------------------------------------------------------------------
207 //--------------------------------------------------------------------------------------------------
210 //--------------------------------------------------------------------------------------------------
217 //--------------------------------------------------------------------------------------------------
220 //--------------------------------------------------------------------------------------------------
228 //--------------------------------------------------------------------------------------------------
231 //--------------------------------------------------------------------------------------------------
234 //--------------------------------------------------------------------------------------------------
237 //--------------------------------------------------------------------------------------------------
243 //--------------------------------------------------------------------------------------------------
246 //--------------------------------------------------------------------------------------------------
251 //--------------------------------------------------------------------------------------------------
254 //--------------------------------------------------------------------------------------------------
258 //--------------------------------------------------------------------------------------------------
261 //--------------------------------------------------------------------------------------------------
265 //--------------------------------------------------------------------------------------------------
268 //--------------------------------------------------------------------------------------------------
272 //--------------------------------------------------------------------------------------------------
275 //--------------------------------------------------------------------------------------------------
279 //--------------------------------------------------------------------------------------------------
282 //--------------------------------------------------------------------------------------------------
288 //--------------------------------------------------------------------------------------------------
291 //--------------------------------------------------------------------------------------------------
295 //--------------------------------------------------------------------------------------------------
298 //--------------------------------------------------------------------------------------------------
302 //--------------------------------------------------------------------------------------------------
305 //--------------------------------------------------------------------------------------------------
309 //--------------------------------------------------------------------------------------------------
312 //--------------------------------------------------------------------------------------------------
316 //--------------------------------------------------------------------------------------------------
319 //--------------------------------------------------------------------------------------------------
323 //--------------------------------------------------------------------------------------------------
326 //--------------------------------------------------------------------------------------------------
330 //--------------------------------------------------------------------------------------------------
333 //--------------------------------------------------------------------------------------------------
337 //--------------------------------------------------------------------------------------------------
340 //--------------------------------------------------------------------------------------------------
344 //--------------------------------------------------------------------------------------------------
347 //--------------------------------------------------------------------------------------------------
351 //--------------------------------------------------------------------------------------------------
354 //--------------------------------------------------------------------------------------------------
358 //--------------------------------------------------------------------------------------------------
361 //--------------------------------------------------------------------------------------------------
365 //--------------------------------------------------------------------------------------------------
368 //--------------------------------------------------------------------------------------------------
372 //--------------------------------------------------------------------------------------------------
375 //--------------------------------------------------------------------------------------------------
379 //--------------------------------------------------------------------------------------------------
382 //--------------------------------------------------------------------------------------------------
386 //--------------------------------------------------------------------------------------------------
389 //--------------------------------------------------------------------------------------------------
393 //--------------------------------------------------------------------------------------------------
396 //--------------------------------------------------------------------------------------------------
400 //--------------------------------------------------------------------------------------------------
403 //--------------------------------------------------------------------------------------------------
407 //--------------------------------------------------------------------------------------------------
410 //--------------------------------------------------------------------------------------------------
414 //--------------------------------------------------------------------------------------------------
417 //--------------------------------------------------------------------------------------------------
422 //--------------------------------------------------------------------------------------------------
425 //--------------------------------------------------------------------------------------------------
432 //--------------------------------------------------------------------------------------------------
Definition: Logger.h:23
Definition: Logger.h:71
Definition: PhysiologyEngine.h:68
virtual bool SetConfigurationOverride(const SEEngineConfiguration *config)=0
Engines can have a configuration for allowing a user to set certain internal parameters Engines with ...
virtual const SEEnvironment * GetEnvironment() const =0
Returns the environment object used by the engine.
virtual const SECompartmentManager & GetCompartments() const =0
Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substan...
virtual const SEECMO * GetECMO() const =0
Returns the current state of the ECMO machine.
virtual void SetSimulationTime(const SEScalarTime &time)=0
Set the current time of the simulation. Engine Simulation time will be advanced from this time point.
virtual double GetStabilizationTime(const TimeUnit &unit) const =0
returns the stabilization time of the simulation (if stabilized)
virtual bool SerializeFromFile(const std::string &file)=0
Reset engine and set it to the state in the provided file. The file may contain json or binary....
PhysiologyEngine(Logger *logger=nullptr)
Definition: PhysiologyEngine.h:70
virtual double GetTimeStep(const TimeUnit &unit) const =0
returns the engine time step that is used when advancing time.
virtual ~PhysiologyEngine()=default
virtual const SEEventManager & GetEventManager() const =0
Retrieves the associated event manager.
virtual const SEDrugSystem * GetDrugSystem() const =0
Returns the current state of the drug system.
virtual const SEEndocrineSystem * GetEndocrineSystem() const =0
Returns the current state of the Endocrine System.
virtual bool SerializeToString(std::string &state, eSerializationFormat m) const =0
Save the current state of the engine. The state can be saved as JSON or bytes in the given string....
virtual double GetSimulationTime(const TimeUnit &unit) const =0
returns the current time of the simulation.
virtual const SEPatient & GetPatient() const =0
Returns the patient object used by the engine.
virtual const SEMechanicalVentilator * GetMechanicalVentilator() const =0
Returns the current state of the Mechanical ventilator.
virtual const SEPatient & GetInitialPatient() const =0
Returns the initial simulation patient object used by the engine.
virtual bool InitializeEngine(const SEPatientConfiguration &patient_configuration)=0
This will create an engine that you can send instructions (patient,actions,conditions) to dynamically...
virtual std::string GetTypeName() const =0
Returns the engine type, such as "Human Adult Whole Body".
virtual const SEInhaler * GetInhaler() const =0
Returns the current state of the Inhaler.
virtual void SetAdvanceHandler(SEAdvanceHandler *handler)=0
Add a callback object that will be called after each timestep.
virtual bool AdvanceModelTime(double time, const TimeUnit &unit)=0
executes time loop of the engine beginning at the current time and running for the duration specified...
virtual const SERespiratorySystem * GetRespiratorySystem() const =0
Returns the current state of the Respiratory System.
virtual const SEEngineConfiguration * GetConfiguration() const =0
returns the engine configuration.
virtual const SERenalSystem * GetRenalSystem() const =0
Returns the current state of the Renal System.
virtual const SETissueSystem * GetTissueSystem() const =0
Returns the current state of the tissue system.
virtual const SEHepaticSystem * GetHepaticSystem() const =0
Returns the current state of the Hepatic System.
virtual bool ProcessAction(const SEAction &action)=0
Execute the provided action. true will be returned if the engine supports the action false will be re...
virtual const SEAnesthesiaMachine * GetAnesthesiaMachine() const =0
Returns the current state of the Anesthesia machine.
virtual const SEEnergySystem * GetEnergySystem() const =0
Returns the current state of the Energy System.
virtual SEEngineTracker * GetEngineTracker() const =0
Retrieve the SEEngineTracker associated with tracking data from this engine to a file The SEEngineTra...
virtual const SEElectroCardioGram * GetElectroCardioGram() const =0
Returns the current state of the Electrocardiogram machine.
virtual bool AdvanceModelTime()=0
executes one pass through the time loop of the engine at the fixed timestep
virtual const SEGastrointestinalSystem * GetGastrointestinalSystem() const =0
Returns the current state of the Gastrointestinal System.
virtual const SEBagValveMask * GetBagValveMask() const =0
Returns the current state of the Bag Valve Mask.
virtual const SEBloodChemistrySystem * GetBloodChemistrySystem() const =0
Returns the current state of the Blood Chemistry System.
virtual bool GetPatientAssessment(SEPatientAssessment &assessment) const =0
Determines the assessment type and fills the data object with current data.
virtual const SENervousSystem * GetNervousSystem() const =0
Returns the current state of the Nervous System.
virtual eEngineInitializationState GetInitializationState() const =0
Get a bit more detail as to how initialization went.
virtual const SEConditionManager & GetConditionManager() const =0
Get the Condition Manager. Allows a user to check the state of active conditions.
virtual bool SerializeFromString(const std::string &state, eSerializationFormat m)=0
Reset engine and set it to the state in the provided string. The string can contain JSON or binary....
virtual SEBlackBoxManager & GetBlackBoxes() const =0
Retrieves the engine black box manager Black boxes allow users to inject or retrieve flows,...
virtual const SEActionManager & GetActionManager() const =0
Get the Action Manager. Allows a user to check the state of active actions.
virtual bool InitializeEngine(const std::string &patient_configuration, eSerializationFormat m)=0
Initialize an engine based on the engines initialization structure.
virtual bool SerializeToFile(const std::string &filename) const =0
Save the current state of the engine to provided filename. Using a .json extension will save a json/a...
virtual const SESubstanceManager & GetSubstanceManager() const =0
Retrieves the associated substance manager.
virtual const SECardiovascularSystem * GetCardiovascularSystem() const =0
Returns the current state of the Cardiovascular System.
Definition: SEAction.h:14
Definition: SEActionManager.h:12
Definition: SEAdvanceHandler.h:8
Definition: SEAnesthesiaMachine.h:24
Definition: SEBagValveMask.h:14
Definition: SEBlackBoxManager.h:11
Definition: SEBloodChemistrySystem.h:10
Definition: SECardiovascularSystem.h:24
Definition: SECompartmentManager.h:25
Definition: SECondition.h:8
Definition: SEConditionManager.h:26
Definition: SEDrugSystem.h:9
Definition: SEECMO.h:10
Definition: SEElectroCardioGram.h:9
Definition: SEEndocrineSystem.h:8
Definition: SEEnergySystem.h:8
Definition: SEEngineConfiguration.h:8
Definition: SEEngineTracker.h:66
Definition: SEEnvironment.h:13
Definition: SEEventManager.h:117
Definition: SEGastrointestinalSystem.h:9
Definition: SEHepaticSystem.h:8
Definition: SEInhaler.h:12
Definition: SEMechanicalVentilator.h:10
Definition: SENervousSystem.h:9
Data formed at a level of a clinicians report. This is high level data, such as a mean or generalized...
Definition: SEPatientAssessment.h:22
Definition: SEPatientConfiguration.h:11
Definition: SEPatient.h:13
Definition: SERenalSystem.h:8
Definition: SERespiratorySystem.h:25
Definition: SEScalarTime.h:28
Definition: SESubstanceManager.h:9
Definition: SETissueSystem.h:8
Definition: SEScalarTime.h:8
Definition: CommonDefs.h:127
Base exception class that all CDM classes throw when an error occurs.
Definition: PhysiologyEngine.h:59
PhysiologyEngineException()
Definition: PhysiologyEngine.h:60
PhysiologyEngineException(const std::string &_Message)
Definition: PhysiologyEngine.h:63