 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 myOpeningTime(generateOpeningTime(*ds)),
46 myClosingTime(generateClosingTime(*ds)) {
53 myLocation(inStreet, pos),
55 myOpeningTime(generateOpeningTime(*ds)),
56 myClosingTime(generateClosingTime(*ds)) {
78 for (std::map<int, double>::const_iterator it = ds.
beginWorkHours.begin();
81 if (cumul >= choice) {
85 std::cout <<
"-- WARNING: work time distribution not complete (Sum(proportions) != 1): AUTODEFINED at 9.00am --" << std::endl;
94 for (std::map<int, double>::const_iterator it = ds.
endWorkHours.begin();
97 if (cumul >= choice) {
101 std::cout <<
"-- WARNING: work time distribution not complete (Sum(proportions) != 1): AUTODEFINED at 5.00pm --" << std::endl;
128 throw (std::runtime_error(
"Work position already occupied. Cannot give it to another adult."));
AGPosition getPosition() const
static int generateClosingTime(const AGDataAndStatistics &ds)
void lostWorkPosition()
Called when the adult has lost her job.
static int generateOpeningTime(const AGDataAndStatistics &ds)
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
std::map< int, double > beginWorkHours
A model of the street in the city.
std::map< int, double > endWorkHours
void print() const
Prints out a summary of the properties of this class on standard output.
A location in the 2D plane freely positioned on a street.
AGDataAndStatistics * myStatData
An adult person who can have a job.
AGWorkPosition(AGDataAndStatistics *ds, const AGStreet &inStreet)