75 std::list<AGChild>::const_iterator itC;
77 if (itC->haveASchool()) {
88 std::list<AGAdult>::const_iterator itA;
90 if (itA->isWorking()) {
109 std::list<AGAdult>::iterator it;
137 std::list<AGAdult>::const_iterator itUA;
139 if (! itUA->isWorking()) {
157 std::list<AGAdult>::const_iterator itDriA;
165 if (!itDriA->getWorkPosition().getPosition().getStreet().allows(
SVC_PASSENGER)) {
173 std::list<AGAdult>::iterator itAccA;
179 std::list<AGChild>::iterator itAccC;
204 std::list<AGTrip>::iterator it1, it2;
213 diff1 = it2->getTime() - it1->getRideBackArrTime(this->
timePerKm);
214 diff2 = it1->getTime() - it2->getRideBackArrTime(this->
timePerKm);
216 if (diff1 < 0 || diff2 < 0) {
218 arrTime = it2->getArrTime(this->
timePerKm);
219 it2->addLayOver(*it1);
220 it2->setDepTime(it2->estimateDepTime(arrTime, this->timePerKm));
223 arrTime = it1->getArrTime(this->
timePerKm);
224 it1->addLayOver(*it2);
225 it1->setDepTime(it1->estimateDepTime(arrTime, this->timePerKm));
243 std::list<AGTrip>::iterator itAccT;
244 std::list<AGTrip>::iterator itDriT;
245 std::list<AGAdult>::iterator itA;
248 if (itAccT->getArrTime(this->timePerKm) < itDriT->getArrTime(this->
timePerKm)) {
253 if (!itA->isWorking()) {
255 }
else if (itAccT->getRideBackArrTime(this->timePerKm) < itA->getWorkPosition().getOpening()) {
270 std::list<AGTrip>::iterator itAccT;
271 std::list<AGTrip>::iterator itDriT;
272 std::list<AGAdult>::iterator itA;
282 if (itAccT->getArrTime(this->timePerKm) < itDriT->getArrTime(this->
timePerKm) && !alreadyDone) {
284 if (itAccT->getRideBackArrTime(this->timePerKm) < itDriT->getTime()) {
286 itAccT->setVehicleName(itDriT->getVehicleName());
287 itAccT->addLayOver(itAccT->getArr());
293 arrTime = itDriT->getArrTime(this->
timePerKm);
294 itDriT->addLayOver(*itAccT);
295 itDriT->setDepTime(itDriT->estimateDepTime(arrTime, this->timePerKm));
305 if (!itA->isWorking() && !alreadyDone) {
307 if (nameC.size() != 0) {
309 itAccT->addLayOver(itAccT->getArr());
314 }
else if (itAccT->getRideBackArrTime(this->timePerKm) < itA->getWorkPosition().getOpening() && !alreadyDone) {
316 if (nameC.size() != 0) {
318 itAccT->addLayOver(itAccT->getArr());
339 if (itA->getWorkPosition().getPosition() == itDriT->getArr()) {
340 AGTrip trip(itA->getWorkPosition().getPosition(),
myHousehold->
getPosition(), itDriT->getVehicleName(), itA->getWorkPosition().getClosing());
351 std::string nameCar =
"";
352 std::string nameCarUsed =
"";
355 nameCarUsed =
tempTrip.front().getVehicleName();
360 if (nameCarUsed.size() != 0) {
374 std::list<AGAdult>::const_iterator itUA;
376 if (! itUA->isWorking()) {
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
AGHousehold * myHousehold
std::list< AGTrip > myPartialActivityTrips
int availableTranspMeans(AGPosition from, AGPosition to)
int possibleTranspMean(AGPosition destination)
int depHour(AGPosition from, AGPosition to, int arrival)
const std::list< AGCar > & getCars() const
const std::list< AGChild > & getChildren() const
const std::list< AGAdult > & getAdults() const
double getPosition() const
Provides the relative position of this AGPosition on the street.
const AGStreet & getStreet() const
Provides the street this AGPosition is located on.
bool allows(const SUMOVehicleClass vclass) const
Returns whether the given vehicle class is allowed on this street.
std::list< AGAdult > personsDrivingCars
bool checkAndBuildTripConsistancy()
void buildWorkDestinations()
std::list< AGTrip > tempTrip
std::list< AGAdult > adultNeedingCarAccompaniment
std::list< AGAdult > notNeedingDrivers
std::list< AGTrip > tempAccTrip
std::list< AGAdult > workingPeoplePossCar
std::list< AGChild > childrenNeedingCarAccompaniment
void makePossibleDriversDrive()
bool checkDriversScheduleMatching()
void buildChildrenAccompaniment()
std::string getUnusedCar()