Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::MarketingPolicyScenario Class Referencefinal

Implements the marketing regulation intervention scenario. More...

#include <marketing_scenario.h>

Inheritance diagram for hgps::MarketingPolicyScenario:
[legend]
Collaboration diagram for hgps::MarketingPolicyScenario:
[legend]

Public Member Functions

 MarketingPolicyScenario ()=delete
 
 MarketingPolicyScenario (SyncChannel &data_sync, MarketingPolicyDefinition &&definition)
 Initialises a new instance of the MarketingDynamicScenario class. More...
 
SyncChannelchannel () override
 Gets the Scenario communication channel. More...
 
void clear () noexcept override
 Clear the scenario log book data. More...
 
double apply (Random &generator, Person &entity, int time, const core::Identifier &risk_factor_key, double value) override
 Applies this Scenario to the Person instance. More...
 
const PolicyIntervalactive_period () const noexcept override
 Gets the intervention active period. More...
 
const std::vector< PolicyImpact > & impacts () const noexcept override
 Gets the intervention impacts by risk factor and age range. More...
 
- Public Member Functions inherited from hgps::InterventionScenario
ScenarioType type () const noexcept override
 Gets the scenario type identifier. More...
 
const std::string & name () const noexcept override
 Gets the scenario type name. More...
 
- Public Member Functions inherited from hgps::Scenario
virtual ~Scenario ()=default
 Destroys a Scenario instance. More...
 

Detailed Description

Implements the marketing regulation intervention scenario.

This is the initial implementation of the marketing regulation before the dynamic component has been added.

Constructor & Destructor Documentation

◆ MarketingPolicyScenario() [1/2]

hgps::MarketingPolicyScenario::MarketingPolicyScenario ( )
delete

◆ MarketingPolicyScenario() [2/2]

hgps::MarketingPolicyScenario::MarketingPolicyScenario ( SyncChannel data_sync,
MarketingPolicyDefinition &&  definition 
)

Initialises a new instance of the MarketingDynamicScenario class.

Parameters
data_syncThe data synchronisation channel instance to use.
definitionThe intervention definition
Exceptions
std::invalid_argumentnumber of impact levels mismatch.
std::out_of_rangefor overlapping or non-ordered impact levels.

Member Function Documentation

◆ active_period()

const PolicyInterval & hgps::MarketingPolicyScenario::active_period ( ) const
overridevirtualnoexcept

Gets the intervention active period.

Returns
Intervention period

Implements hgps::InterventionScenario.

◆ apply()

double hgps::MarketingPolicyScenario::apply ( Random generator,
Person entity,
int  time,
const core::Identifier risk_factor_key,
double  value 
)
overridevirtual

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

Implements hgps::Scenario.

Here is the call graph for this function:

◆ channel()

SyncChannel & hgps::MarketingPolicyScenario::channel ( )
overridevirtual

Gets the Scenario communication channel.

Returns
The communication channel

Implements hgps::Scenario.

◆ clear()

void hgps::MarketingPolicyScenario::clear ( )
overridevirtualnoexcept

Clear the scenario log book data.

Implements hgps::Scenario.

◆ impacts()

const std::vector< PolicyImpact > & hgps::MarketingPolicyScenario::impacts ( ) const
overridevirtualnoexcept

Gets the intervention impacts by risk factor and age range.

Returns
Intervention impact on risk factors

Implements hgps::InterventionScenario.


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