Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::Scenario Class Referenceabstract

Health-GPS simulation scenario interface. More...

#include <scenario.h>

Inheritance diagram for hgps::Scenario:
[legend]

Public Member Functions

virtual ~Scenario ()=default
 Destroys a Scenario instance. More...
 
virtual ScenarioType type () const noexcept=0
 Gets the scenario type identifier. More...
 
virtual const std::string & name () const noexcept=0
 Gets the scenario type name. More...
 
virtual SyncChannelchannel ()=0
 Gets the Scenario communication channel. More...
 
virtual void clear () noexcept=0
 Clear the scenario log book data. More...
 
virtual double apply (Random &generator, Person &entity, int time, const core::Identifier &risk_factor_key, double value)=0
 Applies this Scenario to the Person instance. More...
 

Detailed Description

Health-GPS simulation scenario interface.

The scenarios communication is one way from baseline to intervention, the ScenarioType is by the Health-GPS simulation engine to identify the data-flow direction and send or receive messages.

Constructor & Destructor Documentation

◆ ~Scenario()

virtual hgps::Scenario::~Scenario ( )
virtualdefault

Destroys a Scenario instance.

Member Function Documentation

◆ apply()

virtual double hgps::Scenario::apply ( Random generator,
Person entity,
int  time,
const core::Identifier risk_factor_key,
double  value 
)
pure virtual

Applies this Scenario to the Person instance.

Parameters
generatorRandom number generator instance
entityPerson instance to apply
timeCurrent simulation time
risk_factor_keyTarget risk factor identifier
valueCurrent risk factor value
Returns
The risk factor new value

Implemented in hgps::SimplePolicyScenario, hgps::PhysicalActivityScenario, hgps::MarketingPolicyScenario, hgps::MarketingDynamicScenario, hgps::FoodLabellingScenario, hgps::FiscalPolicyScenario, and hgps::BaselineScenario.

◆ channel()

virtual SyncChannel& hgps::Scenario::channel ( )
pure virtual

◆ clear()

virtual void hgps::Scenario::clear ( )
pure virtualnoexcept

Clear the scenario log book data.

Implemented in hgps::SimplePolicyScenario, hgps::PhysicalActivityScenario, hgps::MarketingPolicyScenario, hgps::MarketingDynamicScenario, hgps::FoodLabellingScenario, hgps::FiscalPolicyScenario, and hgps::BaselineScenario.

Here is the caller graph for this function:

◆ name()

virtual const std::string& hgps::Scenario::name ( ) const
pure virtualnoexcept

Gets the scenario type name.

Returns
Scenario type name

Implemented in hgps::InterventionScenario, and hgps::BaselineScenario.

◆ type()

virtual ScenarioType hgps::Scenario::type ( ) const
pure virtualnoexcept

Gets the scenario type identifier.

Returns
The scenario type

Implemented in hgps::InterventionScenario, and hgps::BaselineScenario.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: