49 while (
static_cast<int>(
myAdults.size()) < numAdults) {
59 while (
static_cast<int>(
myChildren.size()) < numChilds) {
67 int peopleInNeed =
static_cast<int>(
myAdults.size()) -
static_cast<int>(
myCars.size());
68 while (peopleInNeed > 0) {
78 int numCar =
static_cast<int>(
myCars.size() + 1);
84 return static_cast<int>(
myCars.size());
94 return static_cast<int>(
myAdults.size());
97const std::list<AGAdult>&
102const std::list<AGChild>&
107const std::list<AGCar>&
133 std::list<AGChild>::iterator itC;
134 std::list<AGAdult>::iterator itA;
136 if (itC->haveASchool()) {
137 if (itC->leaveSchool()) {
145 if (itA->isWorking()) {
146 itA->resignFromWorkPosition();
153 std::cout <<
"Not enough work positions in AGHousehold::regenerate. Should not happen!" << std::endl;
160 std::list<AGChild>::iterator it;
161 bool oneRemainsAtHome =
false;
165 oneRemainsAtHome =
true;
168 return !oneRemainsAtHome;
173 std::list<AGAdult>::iterator it;
176 std::cout <<
"Not enough free work positions in AGHousehold::allocateAdultsWork. Should not happen." << std::endl;
An adult person who can have a job.
std::list< AGSchool > schools
AGDataAndStatistics & statData
std::vector< AGWorkPosition > workPositions
int getRandomPopDistributed(int n, int m)
void generateCars(double rate)
const std::list< AGCar > & getCars() const
std::list< AGAdult > myAdults
void generatePeople(int numAdults, int numChilds, bool firstRetired)
bool isCloseFromPubTransport(std::list< AGPosition > *pubTransport)
std::list< AGChild > myChildren
bool allocateAdultsWork()
std::list< AGCar > myCars
bool retiredHouseholders()
const std::list< AGChild > & getChildren() const
bool allocateChildrenSchool()
const std::list< AGAdult > & getAdults() const
A location in the 2D plane freely positioned on a street.
double minDistanceTo(const std::list< AGPosition > &positions) const
Computes the distance to the closest position in a list.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)