Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
scenario.h
Go to the documentation of this file.
1#pragma once
3#include "channel.h"
4#include "person.h"
5#include "random_algorithm.h"
6#include "sync_message.h"
7
8#include <memory>
9#include <string>
10
11namespace hgps {
12
15
17enum class ScenarioType : uint8_t {
20
23};
24
30class Scenario {
31 public:
33 virtual ~Scenario() = default;
34
37 virtual ScenarioType type() const noexcept = 0;
38
41 virtual const std::string &name() const noexcept = 0;
42
45 virtual SyncChannel &channel() = 0;
46
48 virtual void clear() noexcept = 0;
49
57 virtual double apply(Random &generator, Person &entity, int time,
58 const core::Identifier &risk_factor_key, double value) = 0;
59};
60} // namespace hgps
Thread-safe communication channel data type.
Definition channel.h:24
General purpose Random number generator algorithms.
Definition random_algorithm.h:8
Health-GPS simulation scenario interface.
Definition scenario.h:30
virtual void clear() noexcept=0
Clear the scenario log book data.
virtual SyncChannel & channel()=0
Gets the Scenario communication channel.
virtual ScenarioType type() const noexcept=0
Gets the scenario type identifier.
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.
virtual const std::string & name() const noexcept=0
Gets the scenario type name.
virtual ~Scenario()=default
Destroys a Scenario instance.
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
ScenarioType
Health GPS policy scenario types enumeration.
Definition scenario.h:17
@ baseline
Baseline scenario.
@ intervention
Intervention scenario.
Global namespace.
Definition column_iterator.h:123
Defines a virtual population person data type.
Definition person.h:39