PhysiologyEngine Class Referenceabstract

#include <PhysiologyEngine.h>

Inherited by PulseEngine.

Public Member Functions

virtual ~PhysiologyEngine ()
 
virtual bool SerializeFromFile (const std::string &filename, SerializationFormat m, const SEScalarTime *simTime=nullptr, const SEEngineConfiguration *config=nullptr)=0
 Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file. Engine will be in a cleared state if this method fails. Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!) More...
 
virtual bool SerializeToFile (const std::string &filename, SerializationFormat m) const =0
 Save the current state of the engine to provided filename. Engine will be in a cleared state if this method fails. More...
 
virtual bool SerializeFromString (const std::string &state, SerializationFormat m, const SEScalarTime *simTime=nullptr, const SEEngineConfiguration *config=nullptr)=0
 Reset engine and set it to the state in the provided string. The state is saved as bytes in the given string. Note that the bytes are binary, not text; we only use the string class as a convenient container. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file. Engine will be in a cleared state if this method fails. Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!) More...
 
virtual bool SerializeToString (std::string &state, SerializationFormat m) const =0
 Save the current state of the engine. The state is saved as bytes in the given string. Note that the bytes are binary, not text; we only use the string class as a convenient container. Engine will be in a cleared state if this method fails. More...
 
virtual bool InitializeEngine (const std::string &patient_configuration, SerializationFormat m, const SEEngineConfiguration *config=nullptr)=0
 locates the json patient file and reads in the values. More...
 
virtual bool InitializeEngine (const SEPatientConfiguration &patient_configuration, const SEEngineConfiguration *config=nullptr)=0
 This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing. More...
 
virtual const SEConditionManagerGetConditionManager () const =0
 Get the Condition Manager. Allows a user to check the state of active conditions. More...
 
virtual LoggerGetLogger () const =0
 Retrieve the Logger associated with this engine. More...
 
virtual SEEngineTrackerGetEngineTracker () const =0
 Retrieve the SEEngineTracker associated with tracking data from this engine to a file The SEEngineTracker is a class set up to pull data requested from the engine (via SEDataRequest's) and provide access to the data easily (ex. to easily write data to csv files) More...
 
virtual const SEEngineConfigurationGetConfiguration () const =0
 returns the engine configuration. More...
 
virtual double GetTimeStep (const TimeUnit &unit) const =0
 returns the engine time step that is used when advancing time. More...
 
virtual double GetSimulationTime (const TimeUnit &unit) const =0
 returns the current time of the simulation. More...
 
virtual void AdvanceModelTime ()=0
 executes one pass through the time loop of the engine at the fixed timestep More...
 
virtual void AdvanceModelTime (double time, const TimeUnit &unit)=0
 executes time loop of the engine beginning at the current time and running for the duration specified in the call at the fixed timestep More...
 
virtual void SetAdvanceHandler (SEAdvanceHandler *handler)=0
 Add a callback object that will be called after each timestep. More...
 
virtual bool ProcessAction (const SEAction &action)=0
 Execute the provided action. true will be returned if the engine supports the action false will be returned if the engine does not support the action. More...
 
virtual const SEActionManagerGetActionManager () const =0
 Get the Action Manager. Allows a user to check the state of active actions. More...
 
virtual SESubstanceManagerGetSubstanceManager ()=0
 Retrieves the associated substance manager. More...
 
virtual const SESubstanceManagerGetSubstanceManager () const =0
 
virtual void SetEventHandler (SEEventHandler *handler)=0
 Add a callback object that will be called whenever a pateint or anesthesia machine event changes state. More...
 
virtual const SEPatientGetPatient () const =0
 Returns the patient object used by the engine. More...
 
virtual bool GetPatientAssessment (SEPatientAssessment &assessment) const =0
 Determines the assessment type and fills the data object with current data. More...
 
virtual const SEEnvironmentGetEnvironment () const =0
 Returns the environment object used by the engine. More...
 
virtual const SEBloodChemistrySystemGetBloodChemistrySystem () const =0
 Returns the current state of the Blood Chemistry System. More...
 
virtual const SECardiovascularSystemGetCardiovascularSystem () const =0
 Returns the current state of the Cardiovascular System. More...
 
virtual const SEDrugSystemGetDrugSystem () const =0
 Returns the current state of the drug system. More...
 
virtual const SEEndocrineSystemGetEndocrineSystem () const =0
 Returns the current state of the Endocrine System. More...
 
virtual const SEEnergySystemGetEnergySystem () const =0
 Returns the current state of the Energy System. More...
 
virtual const SEGastrointestinalSystemGetGastrointestinalSystem () const =0
 Returns the current state of the Gastrointestinal System. More...
 
virtual const SEHepaticSystemGetHepaticSystem () const =0
 Returns the current state of the Hepatic System. More...
 
virtual const SENervousSystemGetNervousSystem () const =0
 Returns the current state of the Nervous System. More...
 
virtual const SERenalSystemGetRenalSystem () const =0
 Returns the current state of the Renal System. More...
 
virtual const SERespiratorySystemGetRespiratorySystem () const =0
 Returns the current state of the Respiratory System. More...
 
virtual const SETissueSystemGetTissueSystem () const =0
 Returns the current state of the tissue system. More...
 
virtual const SEAnesthesiaMachineGetAnesthesiaMachine () const =0
 Returns the current state of the Anesthesia machine. More...
 
virtual const SEElectroCardioGramGetElectroCardioGram () const =0
 Returns the current state of the Electrocardiogram machine. More...
 
virtual const SEInhalerGetInhaler () const =0
 Returns the current state of the Inhaler. More...
 
virtual const SECompartmentManagerGetCompartments () const =0
 Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substance volumes and volume fractions. More...
 

Constructor & Destructor Documentation

◆ ~PhysiologyEngine()

virtual PhysiologyEngine::~PhysiologyEngine ( )
inlinevirtual

Member Function Documentation

◆ AdvanceModelTime() [1/2]

virtual void PhysiologyEngine::AdvanceModelTime ( )
pure virtual

executes one pass through the time loop of the engine at the fixed timestep

Events, errors, and warning as are logged to file not errors are returned through the API at this time.

Implemented in PulseEngine.

◆ AdvanceModelTime() [2/2]

virtual void PhysiologyEngine::AdvanceModelTime ( double  time,
const TimeUnit unit 
)
pure virtual

executes time loop of the engine beginning at the current time and running for the duration specified in the call at the fixed timestep

Events, errors, and warning as are logged to file not errors are returned through the API at this time.

Implemented in PulseEngine.

◆ GetActionManager()

virtual const SEActionManager& PhysiologyEngine::GetActionManager ( ) const
pure virtual

Get the Action Manager. Allows a user to check the state of active actions.

Implemented in PulseEngine.

◆ GetAnesthesiaMachine()

virtual const SEAnesthesiaMachine* PhysiologyEngine::GetAnesthesiaMachine ( ) const
pure virtual

Returns the current state of the Anesthesia machine.

Implemented in PulseEngine.

◆ GetBloodChemistrySystem()

virtual const SEBloodChemistrySystem* PhysiologyEngine::GetBloodChemistrySystem ( ) const
pure virtual

Returns the current state of the Blood Chemistry System.

Implemented in PulseEngine.

◆ GetCardiovascularSystem()

virtual const SECardiovascularSystem* PhysiologyEngine::GetCardiovascularSystem ( ) const
pure virtual

Returns the current state of the Cardiovascular System.

Implemented in PulseEngine.

◆ GetCompartments()

virtual const SECompartmentManager& PhysiologyEngine::GetCompartments ( ) const
pure virtual

Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substance volumes and volume fractions.

Implemented in PulseEngine.

◆ GetConditionManager()

virtual const SEConditionManager& PhysiologyEngine::GetConditionManager ( ) const
pure virtual

Get the Condition Manager. Allows a user to check the state of active conditions.

Implemented in PulseEngine.

◆ GetConfiguration()

virtual const SEEngineConfiguration* PhysiologyEngine::GetConfiguration ( ) const
pure virtual

returns the engine configuration.

Implemented in PulseEngine.

◆ GetDrugSystem()

virtual const SEDrugSystem* PhysiologyEngine::GetDrugSystem ( ) const
pure virtual

Returns the current state of the drug system.

Implemented in PulseEngine.

◆ GetElectroCardioGram()

virtual const SEElectroCardioGram* PhysiologyEngine::GetElectroCardioGram ( ) const
pure virtual

Returns the current state of the Electrocardiogram machine.

Implemented in PulseEngine.

◆ GetEndocrineSystem()

virtual const SEEndocrineSystem* PhysiologyEngine::GetEndocrineSystem ( ) const
pure virtual

Returns the current state of the Endocrine System.

Implemented in PulseEngine.

◆ GetEnergySystem()

virtual const SEEnergySystem* PhysiologyEngine::GetEnergySystem ( ) const
pure virtual

Returns the current state of the Energy System.

Implemented in PulseEngine.

◆ GetEngineTracker()

virtual SEEngineTracker* PhysiologyEngine::GetEngineTracker ( ) const
pure virtual

Retrieve the SEEngineTracker associated with tracking data from this engine to a file The SEEngineTracker is a class set up to pull data requested from the engine (via SEDataRequest's) and provide access to the data easily (ex. to easily write data to csv files)

Implemented in PulseEngine.

◆ GetEnvironment()

virtual const SEEnvironment* PhysiologyEngine::GetEnvironment ( ) const
pure virtual

Returns the environment object used by the engine.

Implemented in PulseEngine.

◆ GetGastrointestinalSystem()

virtual const SEGastrointestinalSystem* PhysiologyEngine::GetGastrointestinalSystem ( ) const
pure virtual

Returns the current state of the Gastrointestinal System.

Implemented in PulseEngine.

◆ GetHepaticSystem()

virtual const SEHepaticSystem* PhysiologyEngine::GetHepaticSystem ( ) const
pure virtual

Returns the current state of the Hepatic System.

Implemented in PulseEngine.

◆ GetInhaler()

virtual const SEInhaler* PhysiologyEngine::GetInhaler ( ) const
pure virtual

Returns the current state of the Inhaler.

Implemented in PulseEngine.

◆ GetLogger()

virtual Logger* PhysiologyEngine::GetLogger ( ) const
pure virtual

Retrieve the Logger associated with this engine.

Implemented in PulseEngine.

◆ GetNervousSystem()

virtual const SENervousSystem* PhysiologyEngine::GetNervousSystem ( ) const
pure virtual

Returns the current state of the Nervous System.

Implemented in PulseEngine.

◆ GetPatient()

virtual const SEPatient& PhysiologyEngine::GetPatient ( ) const
pure virtual

Returns the patient object used by the engine.

Implemented in PulseEngine.

◆ GetPatientAssessment()

virtual bool PhysiologyEngine::GetPatientAssessment ( SEPatientAssessment assessment) const
pure virtual

Determines the assessment type and fills the data object with current data.

Assessments can be queried at any point in the calculation and as many times are desired.

Implemented in PulseEngine.

◆ GetRenalSystem()

virtual const SERenalSystem* PhysiologyEngine::GetRenalSystem ( ) const
pure virtual

Returns the current state of the Renal System.

Implemented in PulseEngine.

◆ GetRespiratorySystem()

virtual const SERespiratorySystem* PhysiologyEngine::GetRespiratorySystem ( ) const
pure virtual

Returns the current state of the Respiratory System.

Implemented in PulseEngine.

◆ GetSimulationTime()

virtual double PhysiologyEngine::GetSimulationTime ( const TimeUnit unit) const
pure virtual

returns the current time of the simulation.

Implemented in PulseEngine.

◆ GetSubstanceManager() [1/2]

virtual SESubstanceManager& PhysiologyEngine::GetSubstanceManager ( )
pure virtual

Retrieves the associated substance manager.

Implemented in PulseEngine.

◆ GetSubstanceManager() [2/2]

virtual const SESubstanceManager& PhysiologyEngine::GetSubstanceManager ( ) const
pure virtual

Implemented in PulseEngine.

◆ GetTimeStep()

virtual double PhysiologyEngine::GetTimeStep ( const TimeUnit unit) const
pure virtual

returns the engine time step that is used when advancing time.

Implemented in PulseEngine.

◆ GetTissueSystem()

virtual const SETissueSystem* PhysiologyEngine::GetTissueSystem ( ) const
pure virtual

Returns the current state of the tissue system.

Implemented in PulseEngine.

◆ InitializeEngine() [1/2]

virtual bool PhysiologyEngine::InitializeEngine ( const std::string &  patient_configuration,
SerializationFormat  m,
const SEEngineConfiguration config = nullptr 
)
pure virtual

locates the json patient file and reads in the values.

This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing

Implemented in PulseEngine.

◆ InitializeEngine() [2/2]

virtual bool PhysiologyEngine::InitializeEngine ( const SEPatientConfiguration patient_configuration,
const SEEngineConfiguration config = nullptr 
)
pure virtual

This will create an engine that you can send instructions (patient,actions,conditions) to dynamically. The return value will indicate success failure of the creation of the engine. Some combinations of patients and conditions may prevent the engine from stabilizing.

Implemented in PulseEngine.

◆ ProcessAction()

virtual bool PhysiologyEngine::ProcessAction ( const SEAction action)
pure virtual

Execute the provided action. true will be returned if the engine supports the action false will be returned if the engine does not support the action.

Implemented in PulseEngine.

◆ SerializeFromFile()

virtual bool PhysiologyEngine::SerializeFromFile ( const std::string &  filename,
SerializationFormat  m,
const SEScalarTime simTime = nullptr,
const SEEngineConfiguration config = nullptr 
)
pure virtual

Reset engine and set it to the state in the provided file. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file. Engine will be in a cleared state if this method fails. Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!)

Implemented in PulseEngine.

◆ SerializeFromString()

virtual bool PhysiologyEngine::SerializeFromString ( const std::string &  state,
SerializationFormat  m,
const SEScalarTime simTime = nullptr,
const SEEngineConfiguration config = nullptr 
)
pure virtual

Reset engine and set it to the state in the provided string. The state is saved as bytes in the given string. Note that the bytes are binary, not text; we only use the string class as a convenient container. You may provided a Simulation Time to be used if desired. It will be reflected in the GetSimulationTime method. Return value indicates engine was able to load provided state file. Engine will be in a cleared state if this method fails. Note the provided configuration will overwrite any configuration options in the state with its contents (Use with caution!)

Implemented in PulseEngine.

◆ SerializeToFile()

virtual bool PhysiologyEngine::SerializeToFile ( const std::string &  filename,
SerializationFormat  m 
) const
pure virtual

Save the current state of the engine to provided filename. Engine will be in a cleared state if this method fails.

Implemented in PulseEngine.

◆ SerializeToString()

virtual bool PhysiologyEngine::SerializeToString ( std::string &  state,
SerializationFormat  m 
) const
pure virtual

Save the current state of the engine. The state is saved as bytes in the given string. Note that the bytes are binary, not text; we only use the string class as a convenient container. Engine will be in a cleared state if this method fails.

Implemented in PulseEngine.

◆ SetAdvanceHandler()

virtual void PhysiologyEngine::SetAdvanceHandler ( SEAdvanceHandler handler)
pure virtual

Add a callback object that will be called after each timestep.

Implemented in PulseEngine.

◆ SetEventHandler()

virtual void PhysiologyEngine::SetEventHandler ( SEEventHandler handler)
pure virtual

Add a callback object that will be called whenever a pateint or anesthesia machine event changes state.

Implemented in PulseEngine.