PhysiologyEngine.h
63 //--------------------------------------------------------------------------------------------------
66 //--------------------------------------------------------------------------------------------------
69 //--------------------------------------------------------------------------------------------------
76 //--------------------------------------------------------------------------------------------------
79 //--------------------------------------------------------------------------------------------------
84 //--------------------------------------------------------------------------------------------------
87 //--------------------------------------------------------------------------------------------------
94 //--------------------------------------------------------------------------------------------------
97 //--------------------------------------------------------------------------------------------------
102 //--------------------------------------------------------------------------------------------------
105 //--------------------------------------------------------------------------------------------------
113 //--------------------------------------------------------------------------------------------------
114 virtual bool InitializeEngine(const std::string& patient_configuration, eSerializationFormat m) = 0;
116 //--------------------------------------------------------------------------------------------------
123 //--------------------------------------------------------------------------------------------------
126 //--------------------------------------------------------------------------------------------------
131 //--------------------------------------------------------------------------------------------------
134 //--------------------------------------------------------------------------------------------------
139 //--------------------------------------------------------------------------------------------------
142 //--------------------------------------------------------------------------------------------------
149 //--------------------------------------------------------------------------------------------------
152 //--------------------------------------------------------------------------------------------------
155 //--------------------------------------------------------------------------------------------------
158 //--------------------------------------------------------------------------------------------------
163 //--------------------------------------------------------------------------------------------------
166 //--------------------------------------------------------------------------------------------------
170 //--------------------------------------------------------------------------------------------------
173 //--------------------------------------------------------------------------------------------------
176 //--------------------------------------------------------------------------------------------------
179 //--------------------------------------------------------------------------------------------------
183 //--------------------------------------------------------------------------------------------------
186 //--------------------------------------------------------------------------------------------------
193 //--------------------------------------------------------------------------------------------------
196 //--------------------------------------------------------------------------------------------------
204 //--------------------------------------------------------------------------------------------------
207 //--------------------------------------------------------------------------------------------------
210 //--------------------------------------------------------------------------------------------------
213 //--------------------------------------------------------------------------------------------------
219 //--------------------------------------------------------------------------------------------------
222 //--------------------------------------------------------------------------------------------------
227 //--------------------------------------------------------------------------------------------------
230 //--------------------------------------------------------------------------------------------------
234 //--------------------------------------------------------------------------------------------------
237 //--------------------------------------------------------------------------------------------------
241 //--------------------------------------------------------------------------------------------------
244 //--------------------------------------------------------------------------------------------------
248 //--------------------------------------------------------------------------------------------------
251 //--------------------------------------------------------------------------------------------------
255 //--------------------------------------------------------------------------------------------------
258 //--------------------------------------------------------------------------------------------------
264 //--------------------------------------------------------------------------------------------------
267 //--------------------------------------------------------------------------------------------------
271 //--------------------------------------------------------------------------------------------------
274 //--------------------------------------------------------------------------------------------------
278 //--------------------------------------------------------------------------------------------------
281 //--------------------------------------------------------------------------------------------------
285 //--------------------------------------------------------------------------------------------------
288 //--------------------------------------------------------------------------------------------------
292 //--------------------------------------------------------------------------------------------------
295 //--------------------------------------------------------------------------------------------------
299 //--------------------------------------------------------------------------------------------------
302 //--------------------------------------------------------------------------------------------------
306 //--------------------------------------------------------------------------------------------------
309 //--------------------------------------------------------------------------------------------------
313 //--------------------------------------------------------------------------------------------------
316 //--------------------------------------------------------------------------------------------------
320 //--------------------------------------------------------------------------------------------------
323 //--------------------------------------------------------------------------------------------------
327 //--------------------------------------------------------------------------------------------------
330 //--------------------------------------------------------------------------------------------------
334 //--------------------------------------------------------------------------------------------------
337 //--------------------------------------------------------------------------------------------------
341 //--------------------------------------------------------------------------------------------------
344 //--------------------------------------------------------------------------------------------------
348 //--------------------------------------------------------------------------------------------------
351 //--------------------------------------------------------------------------------------------------
355 //--------------------------------------------------------------------------------------------------
358 //--------------------------------------------------------------------------------------------------
362 //--------------------------------------------------------------------------------------------------
365 //--------------------------------------------------------------------------------------------------
369 //--------------------------------------------------------------------------------------------------
372 //--------------------------------------------------------------------------------------------------
376 //--------------------------------------------------------------------------------------------------
379 //--------------------------------------------------------------------------------------------------
383 //--------------------------------------------------------------------------------------------------
386 //--------------------------------------------------------------------------------------------------
390 //--------------------------------------------------------------------------------------------------
393 //--------------------------------------------------------------------------------------------------
398 //--------------------------------------------------------------------------------------------------
401 //--------------------------------------------------------------------------------------------------
408 //--------------------------------------------------------------------------------------------------
Definition: Logger.h:23
Definition: Logger.h:71
Definition: PhysiologyEngine.h:58
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 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:60
virtual double GetTimeStep(const TimeUnit &unit) const =0
returns the engine time step that is used when advancing time.
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 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:25
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:109
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:9
Definition: SEScalarTime.h:28
Definition: SESubstanceManager.h:9
Definition: SETissueSystem.h:8
Definition: SEScalarTime.h:8
Definition: CommonDefs.h:138
Base exception class that all CDM classes throw when an error occurs.
Definition: PhysiologyEngine.h:49
PhysiologyEngineException()
Definition: PhysiologyEngine.h:50
PhysiologyEngineException(const std::string &_Message)
Definition: PhysiologyEngine.h:53