|
Simpact Cyan
Population based event driven simulation using mNRM
|
This is the base class for a person in a population-based simulation. More...
#include <personbase.h>
Inherited by GlobalEventDummyPerson.
Public Types | |
| enum | Gender { Male , Female , GlobalEventDummy } |
| The gender of a person. More... | |
Public Member Functions | |
| Gender | getGender () const |
| Returns the gender of the person as set at construction time. | |
| std::string | getName () const |
| Returns a name with which the person can be identified. | |
| double | getDateOfBirth () const |
| Returns the time at which the person was born, as specified in the constructor. | |
| double | getAgeAt (double t0) const |
Returns the age of the person at time t0. | |
| bool | hasDied () const |
| Returns a flag indicating if the person has died. | |
| void | setTimeOfDeath (double t) |
| Marks the person as deceased and stores the specified time of death. | |
| double | getTimeOfDeath () const |
| Retrieves the time of death of the person, negative meaning that the person is still alive. | |
| void | setAlgorithmInfo (PersonAlgorithmInfo *pAlgInfo) |
| This is only meant to be used by the implementation of an algorithm, and allows you to store algorithm-specific data for each person (gets deleted automatically in the destructor). | |
| PersonAlgorithmInfo * | getAlgorithmInfo () const |
| Returns what was stored using PersonBase::PersonAlgorithmInfo. | |
Protected Member Functions | |
| PersonBase (Gender g, double dateOfBirth) | |
Create a new person of gender g and which was born at the specified time in the simulation. More... | |
This is the base class for a person in a population-based simulation.
Such a simulation uses an algorithm derived from PopulationAlgorithmInterface and a state derived from PopulationStateInterface. It is not mean to be used directly, but provides some common functions for a class which should derive from it.
| enum PersonBase::Gender |
|
protected |
Create a new person of gender g and which was born at the specified time in the simulation.
Although scheduled events must always use positive times, the time describing the birth date may be negative to set a certain age of the person when the simulation starts at
.