 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
50 while (
static_cast<int>(
myAdults.size()) < numAdults) {
60 while (
static_cast<int>(
myChildren.size()) < numChilds) {
68 int peopleInNeed =
static_cast<int>(
myAdults.size()) -
static_cast<int>(
myCars.size());
69 while (peopleInNeed > 0) {
79 int numCar =
static_cast<int>(
myCars.size() + 1);
85 return static_cast<int>(
myCars.size());
95 return static_cast<int>(
myAdults.size());
98 const std::list<AGAdult>&
103 const std::list<AGChild>&
108 const std::list<AGCar>&
134 std::list<AGChild>::iterator itC;
135 std::list<AGAdult>::iterator itA;
137 if (itC->haveASchool()) {
138 if (itC->leaveSchool()) {
146 if (itA->isWorking()) {
147 itA->resignFromWorkPosition();
154 std::cout <<
"Not enough work positions in AGHousehold::regenerate. Should not happen!" << std::endl;
161 std::list<AGChild>::iterator it;
162 bool oneRemainsAtHome =
false;
166 oneRemainsAtHome =
true;
169 return !oneRemainsAtHome;
174 std::list<AGAdult>::iterator it;
177 std::cout <<
"Not enough free work positions in AGHousehold::allocateAdultsWork. Should not happen." << std::endl;
std::vector< AGWorkPosition > workPositions
void generatePeople(int numAdults, int numChilds, bool firstRetired)
std::list< AGCar > myCars
std::list< AGAdult > myAdults
double minDistanceTo(const std::list< AGPosition > &positions) const
Computes the distance to the closest position in a list.
bool isCloseFromPubTransport(std::list< AGPosition > *pubTransport)
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
void generateCars(double rate)
std::list< AGChild > myChildren
bool retiredHouseholders()
const std::list< AGChild > & getChildren() const
int getRandomPopDistributed(int n, int m)
bool allocateAdultsWork()
A location in the 2D plane freely positioned on a street.
An adult person who can have a job.
const std::list< AGAdult > & getAdults() const
const std::list< AGCar > & getCars() const
bool allocateChildrenSchool()
AGDataAndStatistics & statData
std::list< AGSchool > schools