biogears::PhysiologyEngine Class Referenceabstract

#include <PhysiologyEngine.h>

Inheritance diagram for biogears::PhysiologyEngine:

Public Member Functions

virtual ~PhysiologyEngine ()
 
virtual bool LoadState (const char *file, const SEScalarTime *simTime=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.

More...
 
virtual bool LoadState (const std::string &file, const SEScalarTime *simTime=nullptr)=0
 
virtual bool LoadState (const CDM::PhysiologyEngineStateData &state, const SEScalarTime *simTime=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.

More...
 
virtual std::unique_ptr< CDM::PhysiologyEngineStateDataSaveState (const char *file="")=0
 Save the current state of the engine. State will be written to a file if provided. State object will be returned.

Engine will be in a cleared state if this method fails.

More...
 
virtual std::unique_ptr< CDM::PhysiologyEngineStateDataSaveState (const std::string &file="")=0
 
virtual bool InitializeEngine (const char *patientFile, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr)=0
 locates the xml patient file and reads in the values. More...
 
virtual bool InitializeEngine (const std::string &patientFile, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *config=nullptr)=0
 
virtual bool InitializeEngine (const SEPatient &patient, const std::vector< const SECondition * > *conditions=nullptr, const PhysiologyEngineConfiguration *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 LoggerGetLogger ()=0
 

Retrieve the Logger associated with this engine

More...
 
virtual PhysiologyEngineTrackGetEngineTrack ()=0
 

Retrieve the PhysiologyEngineTrack associated with tracking data from this engine to a file

More...
 
virtual const PhysiologyEngineConfigurationGetConfiguration ()=0
 

returns the engine configuration.

More...
 
virtual double GetTimeStep (const TimeUnit &unit)=0
 returns the engine time step that is used when advancing time. More...
 
virtual double GetSimulationTime (const TimeUnit &unit)=0
 

returns the current time of the simulation.

More...
 
virtual void AdvanceModelTime (bool appendDataTrack=false)=0
 executes one pass through the time loop of the engine at the fixed timestep More...
 
virtual void AdvanceModelTime (double time, const TimeUnit &unit=TimeUnit::s, bool appendDataTrack=false)=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 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 SESubstanceManagerGetSubstanceManager ()=0
 Retrieves the associated substance manager. More...
 
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 ()=0
 Returns the patient object used by the engine. More...
 
virtual bool GetPatientAssessment (SEPatientAssessment &assessment)=0
 Determines the assessment type and fills the data object with current data. More...
 
virtual const SEEnvironmentGetEnvironment ()=0
 Returns the environment object used by the engine. More...
 
virtual const SEBloodChemistrySystemGetBloodChemistrySystem ()=0
 Returns the current state of the Blood Chemistry System. More...
 
virtual const SECardiovascularSystemGetCardiovascularSystem ()=0
 Returns the current state of the Cardiovascular System. More...
 
virtual const SEDrugSystemGetDrugSystem ()=0
 Returns the current state of the drug system. More...
 
virtual const SEEndocrineSystemGetEndocrineSystem ()=0
 Returns the current state of the Endocrine System. More...
 
virtual const SEEnergySystemGetEnergySystem ()=0
 Returns the current state of the Energy System. More...
 
virtual const SEGastrointestinalSystemGetGastrointestinalSystem ()=0
 Returns the current state of the Gastrointestinal System. More...
 
virtual const SEHepaticSystemGetHepaticSystem ()=0
 Returns the current state of the Hepatic System. More...
 
virtual const SENervousSystemGetNervousSystem ()=0
 Returns the current state of the Nervous System. More...
 
virtual const SERenalSystemGetRenalSystem ()=0
 Returns the current state of the Renal System. More...
 
virtual const SERespiratorySystemGetRespiratorySystem ()=0
 Returns the current state of the Respiratory System. More...
 
virtual const SETissueSystemGetTissueSystem ()=0
 Returns the current state of the tissue system. More...
 
virtual const SEAnesthesiaMachineGetAnesthesiaMachine ()=0
 Returns the current state of the Anesthesia machine. More...
 
virtual const SEElectroCardioGramGetElectroCardioGram ()=0
 Returns the current state of the Electrocardiogram machine. More...
 
virtual const SEInhalerGetInhaler ()=0
 Returns the current state of the Inhaler. More...
 
virtual const SECompartmentManagerGetCompartments ()=0
 Retrieves the engine compartments, providing such data as: flows, pressure, volume as well as substance volumes and volume fractions. More...
 
virtual Tree< const char * > GetDataRequestGraph () const =0
 

Return a Graph of DataRequest that the current PhysiologyEngine Supports.

More...
 
virtual bool IsAutoTracking () const =0
 Returns the current state of the AutoTracking Property. True implies for each time advance All DataRequest will be tracked if the current simulation time is a multiple of

GetDataRequestManager().GetSamplesPerSecond();

More...
 
virtual void SetAutoTrackFlag (bool flag)=0
 

Return Allows the toggling of the SetAutoTrackFlag to On/Off

More...
 
virtual bool IsTrackingStabilization () const =0
 Returns the current state of the Track Stabilization Property. When true the user expects the Results file to include engine values during stabilization routines

When false the user expects the 0 time index to be the first engine readout post stabilization.

More...
 
virtual void SetTrackStabilizationFlag (bool flag)=0
 

Return Allows the toggling of the SetAutoTrackFlag to On/Off

More...
 

Constructor & Destructor Documentation

virtual biogears::PhysiologyEngine::~PhysiologyEngine ( )
inlinevirtual

Member Function Documentation

virtual void biogears::PhysiologyEngine::AdvanceModelTime ( bool  appendDataTrack = false)
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 biogears::BioGearsEngine.

virtual void biogears::PhysiologyEngine::AdvanceModelTime ( double  time,
const TimeUnit unit = TimeUnit::s,
bool  appendDataTrack = false 
)
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 biogears::BioGearsEngine.

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

Returns the current state of the Anesthesia machine.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Blood Chemistry System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Cardiovascular System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

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

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

virtual const PhysiologyEngineConfiguration* biogears::PhysiologyEngine::GetConfiguration ( )
pure virtual

returns the engine configuration.


Implemented in biogears::BioGearsEngine.

virtual Tree<const char*> biogears::PhysiologyEngine::GetDataRequestGraph ( ) const
pure virtual

Return a Graph of DataRequest that the current PhysiologyEngine Supports.


Implemented in biogears::BioGearsEngine.

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

Returns the current state of the drug system.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Electrocardiogram machine.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Endocrine System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Energy System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

virtual PhysiologyEngineTrack* biogears::PhysiologyEngine::GetEngineTrack ( )
pure virtual

Retrieve the PhysiologyEngineTrack associated with tracking data from this engine to a file


Implemented in biogears::BioGearsEngine.

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

Returns the environment object used by the engine.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Gastrointestinal System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Hepatic System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Inhaler.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Retrieve the Logger associated with this engine


Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Nervous System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the patient object used by the engine.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::GetPatientAssessment ( SEPatientAssessment assessment)
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 biogears::BioGearsEngine.

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

Returns the current state of the Renal System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the Respiratory System.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

returns the current time of the simulation.


Implemented in biogears::BioGearsEngine.

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

Retrieves the associated substance manager.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

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

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

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

Returns the current state of the tissue system.

----------------------------------------------------------------------------------------------—

Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::InitializeEngine ( const char *  patientFile,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
pure virtual

locates the xml 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 biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::InitializeEngine ( const std::string &  patientFile,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration config = nullptr 
)
pure virtual

Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::InitializeEngine ( const SEPatient patient,
const std::vector< const SECondition * > *  conditions = nullptr,
const PhysiologyEngineConfiguration 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 biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::IsAutoTracking ( ) const
pure virtual

Returns the current state of the AutoTracking Property. True implies for each time advance All DataRequest will be tracked if the current simulation time is a multiple of

GetDataRequestManager().GetSamplesPerSecond();


Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::IsTrackingStabilization ( ) const
pure virtual

Returns the current state of the Track Stabilization Property. When true the user expects the Results file to include engine values during stabilization routines

When false the user expects the 0 time index to be the first engine readout post stabilization.


Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::LoadState ( const char *  file,
const SEScalarTime simTime = 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.


Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::LoadState ( const std::string &  file,
const SEScalarTime simTime = nullptr 
)
pure virtual

Implemented in biogears::BioGearsEngine.

virtual bool biogears::PhysiologyEngine::LoadState ( const CDM::PhysiologyEngineStateData state,
const SEScalarTime simTime = 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.


Implemented in biogears::BioGearsEngine.

virtual bool biogears::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 biogears::BioGearsEngine.

virtual std::unique_ptr<CDM::PhysiologyEngineStateData> biogears::PhysiologyEngine::SaveState ( const char *  file = "")
pure virtual

Save the current state of the engine. State will be written to a file if provided. State object will be returned.

Engine will be in a cleared state if this method fails.


Implemented in biogears::BioGearsEngine.

virtual std::unique_ptr<CDM::PhysiologyEngineStateData> biogears::PhysiologyEngine::SaveState ( const std::string &  file = "")
pure virtual

Implemented in biogears::BioGearsEngine.

virtual void biogears::PhysiologyEngine::SetAutoTrackFlag ( bool  flag)
pure virtual

Return Allows the toggling of the SetAutoTrackFlag to On/Off


Implemented in biogears::BioGearsEngine.

virtual void biogears::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 biogears::BioGearsEngine.

virtual void biogears::PhysiologyEngine::SetTrackStabilizationFlag ( bool  flag)
pure virtual

Return Allows the toggling of the SetAutoTrackFlag to On/Off


Implemented in biogears::BioGearsEngine.