Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
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.
 
virtual ScenarioType type () const noexcept=0
 Gets the scenario type identifier.
 
virtual const std::string & name () const noexcept=0
 Gets the scenario type name.
 
virtual SyncChannelchannel ()=0
 Gets the Scenario communication channel.
 
virtual void clear () noexcept=0
 Clear the scenario log book data.
 
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.
 

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::BaselineScenario, hgps::FiscalPolicyScenario, hgps::FoodLabellingScenario, hgps::MarketingDynamicScenario, hgps::MarketingPolicyScenario, hgps::PhysicalActivityScenario, and hgps::SimplePolicyScenario.

◆ channel()

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

Gets the Scenario communication channel.

Returns
The communication channel

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

Here is the caller graph for this function:

◆ clear()

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

Clear the scenario log book data.

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

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::BaselineScenario, and hgps::InterventionScenario.

Here is the caller graph for this function:

◆ type()

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

Gets the scenario type identifier.

Returns
The scenario type

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

Here is the caller graph for this function:

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