SUMO - Simulation of Urban MObility
|
#include <AGActivity.h>
Public Member Functions | |
AGActivity (AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips, int prio) | |
int | arrHour (AGPosition from, AGPosition to, int departure) |
int | availableTranspMeans (AGPosition from, AGPosition to) |
int | depHour (AGPosition from, AGPosition to, int arrival) |
bool | generateTrips () |
bool | isGenerated () |
int | possibleTranspMean (AGPosition destination) |
int | randomTimeBetween (int begin, int end) |
int | timeToDrive (AGPosition from, AGPosition to) |
Data Fields | |
int | activityPriority |
SUMOReal | carPreference |
AGDataAndStatistics * | ds |
bool | genDone |
AGHousehold * | hh |
std::list< AGTrip > | partialActivityTrips |
std::list< AGTrip > * | previousTrips |
SUMOReal | timePerKm |
Definition at line 46 of file AGActivity.h.
AGActivity::AGActivity | ( | AGHousehold * | hh, |
AGDataAndStatistics * | das, | ||
std::list< AGTrip > * | prevTrips, | ||
int | prio | ||
) | [inline] |
Definition at line 48 of file AGActivity.h.
int AGActivity::arrHour | ( | AGPosition | from, |
AGPosition | to, | ||
int | departure | ||
) |
Definition at line 122 of file AGActivity.cpp.
References timeToDrive().
Referenced by AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
int AGActivity::availableTranspMeans | ( | AGPosition | from, |
AGPosition | to | ||
) |
determine the possible means for a trip from one position to a destination. whether CAR is necessary or not, BUS available or not... 1 = by foot possible. 2 = by bus possible. 0 = by bus or foot NOT possible => only by car. : 4 is useless because it is always possible : 3 = 2 + 1 = means bus and foot possible.
Definition at line 92 of file AGActivity.cpp.
References AGDataAndStatistics::busStations, AGPosition::distanceTo(), ds, AGDataAndStatistics::maxFootDistance, and AGPosition::minDistanceTo().
Referenced by AGWorkAndSchool::buildChildrenAccompaniment().
int AGActivity::depHour | ( | AGPosition | from, |
AGPosition | to, | ||
int | arrival | ||
) |
estimates the departure/arrival time given the departure location the arrival location and the wished arrival/departure time
Definition at line 115 of file AGActivity.cpp.
References timeToDrive().
Referenced by AGWorkAndSchool::carsToTrips(), and AGFreeTime::typeFromHomeNight().
main function called for trip generation this function is overwritten in every child-class (every activity) BE OVERWRITEN
Reimplemented in AGFreeTime, and AGWorkAndSchool.
Definition at line 50 of file AGActivity.cpp.
returns whether the generation could have been well done
Definition at line 45 of file AGActivity.cpp.
References genDone.
int AGActivity::possibleTranspMean | ( | AGPosition | destination | ) |
determine the possible transportation means, what would be chosen: 1 = foot 2 = bus 4 = car any combination is possible by simply addition of these values (ex. 7 means: 4+2+1 <=> foot, bus and car possible / 5 means: 4+1 <=> only foot and car are possible)
Definition at line 55 of file AGActivity.cpp.
References AGDataAndStatistics::busStations, AGPosition::distanceTo(), ds, AGHousehold::getCarNbr(), AGHousehold::getPosition(), hh, AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), and SUMOReal.
Referenced by AGWorkAndSchool::buildWorkDestinations().
int AGActivity::randomTimeBetween | ( | int | begin, |
int | end | ||
) |
evaluates a random time between the given two time instants
Definition at line 127 of file AGActivity.cpp.
References RandHelper::rand().
Referenced by AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
int AGActivity::timeToDrive | ( | AGPosition | from, |
AGPosition | to | ||
) |
evaluation of the needed time for going from one point to an other using the car
Definition at line 109 of file AGActivity.cpp.
References AGPosition::distanceTo(), SUMOReal, and timePerKm.
Definition at line 111 of file AGActivity.h.
rate of taking the car instead of the bus because of personal preference
Definition at line 116 of file AGActivity.h.
Referenced by AGWorkAndSchool::buildWorkDestinations().
Definition at line 120 of file AGActivity.h.
Referenced by availableTranspMeans(), possibleTranspMean(), and AGFreeTime::possibleTypeOfTrip().
Definition at line 110 of file AGActivity.h.
Referenced by AGWorkAndSchool::generateTrips(), AGFreeTime::generateTrips(), and isGenerated().
Definition at line 118 of file AGActivity.h.
Referenced by AGWorkAndSchool::buildChildrenAccompaniment(), AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::carAllocation(), AGWorkAndSchool::carsToTrips(), AGFreeTime::decideTypeOfTrip(), AGWorkAndSchool::generateListTrips(), AGWorkAndSchool::generateTrips(), AGWorkAndSchool::getUnusedCar(), AGWorkAndSchool::isThereUnusedCar(), AGWorkAndSchool::makePossibleDriversDrive(), possibleTranspMean(), AGFreeTime::possibleTypeOfTrip(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
std::list<AGTrip> AGActivity::partialActivityTrips |
Definition at line 108 of file AGActivity.h.
Referenced by AGWorkAndSchool::generateListTrips(), AGActivities::generateTrips(), AGWorkAndSchool::getUnusedCar(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
std::list<AGTrip>* AGActivity::previousTrips |
Definition at line 109 of file AGActivity.h.
Referenced by AGFreeTime::whenBackHome(), AGFreeTime::whenBackHomeThisDay(), and AGFreeTime::whenBeginActivityNextDay().
Definition at line 112 of file AGActivity.h.
Referenced by AGWorkAndSchool::checkAndBuildTripConsistancy(), AGWorkAndSchool::checkDriversScheduleMatching(), AGWorkAndSchool::generateListTrips(), timeToDrive(), AGFreeTime::whenBackHome(), and AGFreeTime::whenBackHomeThisDay().