Defines the policy active interval.
More...
#include <intervention_scenario.h>
|
| PolicyInterval (int start_at_time, std::optional< int > finish_at_time=std::nullopt) |
| Initialise a new instance of the PolicyInterval structure. More...
|
|
bool | contains (const int &time) const noexcept |
| Determine whether this interval contains a given time. More...
|
|
Defines the policy active interval.
◆ PolicyInterval()
hgps::PolicyInterval::PolicyInterval |
( |
int |
start_at_time, |
|
|
std::optional< int > |
finish_at_time = std::nullopt |
|
) |
| |
|
inline |
Initialise a new instance of the PolicyInterval structure.
- Parameters
-
start_at_time | Intervention start time, inclusive |
finish_at_time | Intervention finish time, or no upper bound |
- Exceptions
-
std::out_of_range | for policy with negative start time or finishing before start time |
◆ contains()
bool hgps::PolicyInterval::contains |
( |
const int & |
time | ) |
const |
|
inlinenoexcept |
Determine whether this interval contains a given time.
- Parameters
-
- Returns
- true, if the time is in the interval range; otherwise, false.
◆ finish_time
std::optional<int> hgps::PolicyInterval::finish_time {} |
The intervention finish time, if given, or no upper bound.
◆ start_time
int hgps::PolicyInterval::start_time {} |
The intervention start time.
The documentation for this struct was generated from the following file: