Interface for a simulation state for the population-based algorithm, specifying member functions that need to be implemented.
More...
|
virtual PersonBase ** | getAllPeople ()=0 |
| Returns a list to the current living members in the population, introduced into the simulation using PopulationStateInterface::addNewPerson. More...
|
|
virtual PersonBase ** | getMen ()=0 |
| Same as PopulationStateInterface::getAllPeople, but only the men are returned. More...
|
|
virtual PersonBase ** | getWomen ()=0 |
| Same as PopulationStateInterface::getAllPeople, but only the women are returned. More...
|
|
virtual PersonBase ** | getDeceasedPeople ()=0 |
| Returns the people who were part of the simulation but who are now deceased (intended for result analysis, not to be used during the simulation). More...
|
|
virtual int | getNumberOfPeople () const =0 |
| Returns the number of people in the array returned by PopulationStateInterface::getAllPeople. More...
|
|
virtual int | getNumberOfMen () const =0 |
| Returns the number of people in the array returned by PopulationStateInterface::getMen. More...
|
|
virtual int | getNumberOfWomen () const =0 |
| Returns the number of people in the array returned by PopulationStateInterface::getWomen. More...
|
|
virtual int | getNumberOfDeceasedPeople () const =0 |
| Returns the number of people in the array returned by PopulationStateInterface::getDeceasedPeople. More...
|
|
virtual void | addNewPerson (PersonBase *pPerson)=0 |
| When a new person is introduced into the population, this function must be used to tell the simulation about this. More...
|
|
virtual void | setPersonDied (PersonBase *pPerson)=0 |
| When a person has died, this function must be called to inform the simulation about this. More...
|
|
virtual void | markAffectedPerson (PersonBase *pPerson) const =0 |
| This should only be called from within the PopulationEvent::markOtherAffectedPeople function, to indicate which other persons are also affected by the event (other than the persons mentioned in the event constructor. More...
|
|
void | setExtraStateInfo (PopulationStateExtra *pExtra) |
| This allows you to store additional information for a state that implements this PopulationStateInterface class, note that this is not automatically deleted in the destructor. More...
|
|
PopulationStateExtra * | getExtraStateInfo () const |
| Retrieves the PopulationStateExtra instance that was stored using PopulationStateInterface::setExtraStateInfo. More...
|
|
double | getTime () const |
| Retrieve the current simulation time, which is stored by the Algorithm instance in use (note that until Algorithm::evolve is first called, the time has it's initial value of zero, may be important when starting the simulation from another time).
|
|
void | setTime (double t) |
| Set the simulation time, which is normally only done by the Algorithm in use (but may be necessary when starting the simulation from a time different than zero, see State::getTime).
|
|
Interface for a simulation state for the population-based algorithm, specifying member functions that need to be implemented.