44 myOpeningTime(generateOpeningTime(*ds)),
45 myClosingTime(generateClosingTime(*ds)) {
52 myLocation(inStreet, pos),
54 myOpeningTime(generateOpeningTime(*ds)),
55 myClosingTime(generateClosingTime(*ds)) {
77 for (std::map<int, double>::const_iterator it = ds.
beginWorkHours.begin();
80 if (cumul >= choice) {
84 std::cout <<
"-- WARNING: work time distribution not complete (Sum(proportions) != 1): AUTODEFINED at 9.00am --" << std::endl;
93 for (std::map<int, double>::const_iterator it = ds.
endWorkHours.begin();
96 if (cumul >= choice) {
100 std::cout <<
"-- WARNING: work time distribution not complete (Sum(proportions) != 1): AUTODEFINED at 5.00pm --" << std::endl;
127 throw ProcessError(
TL(
"Work position already occupied. Cannot give it to another adult."));
An adult person who can have a job.
void lostWorkPosition()
Called when the adult has lost her job.
std::map< int, double > endWorkHours
std::map< int, double > beginWorkHours
A location in the 2D plane freely positioned on a street.
void print() const
Prints out a summary of the properties of this class on standard output.
A model of the street in the city.
static int generateOpeningTime(const AGDataAndStatistics &ds)
static int generateClosingTime(const AGDataAndStatistics &ds)
AGPosition getPosition() const
AGDataAndStatistics * myStatData
AGWorkPosition(AGDataAndStatistics *ds, const AGStreet &inStreet)
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)