Eclipse SUMO - Simulation of Urban MObility
|
Central object handling City, Activities and Trips. More...
#include <AGActivityGen.h>
Public Member Functions | |
AGActivityGen (std::string input, OutputDevice &output, RONet *net) | |
Constructor. | |
void | importInfoCity () |
build the internal city | |
void | makeActivityTrips (int days=1, int beginTime=0, int endTime=0) |
build activities and trips of the population and generate routes | |
Protected Member Functions | |
void | generateOutputFile (std::list< AGTrip > &trips) |
generate the output file (trips or routes) using a trip list | |
bool | timeTripValidation (const AGTrip &trip) const |
validation: compatibility of the given trip | |
void | varDepTime (AGTrip &trip) const |
Protected Attributes | |
int | beginTime |
AGCity | city |
int | durationInDays |
int | endTime |
std::string | inputFile |
RONet * | net |
OutputDevice & | outputFile |
The generated routes. | |
Private Member Functions | |
AGActivityGen & | operator= (const AGActivityGen &) |
invalidated assignment operator | |
Central object handling City, Activities and Trips.
Definition at line 46 of file AGActivityGen.h.
|
inline |
Constructor.
[in] | input | input stat-file name (containing information about the city) |
[in] | output | xml file in which we'll write the routes generated |
[in] | net | network of the city |
Definition at line 55 of file AGActivityGen.h.
|
protected |
generate the output file (trips or routes) using a trip list
[in] | trips | generated by the different activities |
Definition at line 132 of file AGActivityGen.cpp.
References AGActivityTripWriter::addTrip(), AGTime::getDay(), AGTime::getHour(), AGTime::getMinute(), AGTime::getSecond(), and outputFile.
Referenced by makeActivityTrips().
void AGActivityGen::importInfoCity | ( | ) |
build the internal city
TO CALL 1: First function to be called: imports the XML input file and generates the whole city.
Definition at line 44 of file AGActivityGen.cpp.
References AGCity::carAllocation(), city, AGCity::completeBusLines(), AGCity::completeStreets(), AGDataAndStatistics::consolidateStat(), AGCity::generatePopulation(), AGCity::generateWorkPositions(), inputFile, net, PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_FAILED_MESSAGE, XMLSubSys::runParser(), AGCity::schoolAllocation(), AGCity::statData, TL, and AGCity::workAllocation().
Referenced by main().
void AGActivityGen::makeActivityTrips | ( | int | days = 1 , |
int | beginTime = 0 , |
||
int | endTime = 0 |
||
) |
build activities and trips of the population and generate routes
TO CALL 2: generates City's Activity and the corresponding trips
[in] | days | : duration of the simulation (>=0) (day of the end - day of the beginning) |
[in] | beginTime | : instant of the simulation beginning (in the first day) |
[in] | endTime | : instant of the simulation ending (in the last day) NOTE: if (days==0) : endTime > beginTime |
EXAMPLE: if days=1, endTime=0, beginTime=0: The duration will be 24 hours from 12am to 12amof the next day
making the activity trips
validating the trips with the simulation's time limits
re-ordering of trips: SUMO needs routes ordered by departure time.
trip file generation
Definition at line 173 of file AGActivityGen.cpp.
References AGTrip::addLayOverWithoutDestination(), beginTime, city, durationInDays, endTime, AGActivities::generateActivityTrips(), generateOutputFile(), AGTrip::getVehicleName(), AGTrip::setType(), AGTrip::setVehicleName(), timeTripValidation(), AGActivities::trips, and varDepTime().
Referenced by main().
|
private |
invalidated assignment operator
|
protected |
validation: compatibility of the given trip
[in] | trip | to be validated |
Definition at line 89 of file AGActivityGen.cpp.
References beginTime, durationInDays, endTime, AGTrip::getDay(), and AGTrip::getTime().
Referenced by makeActivityTrips().
|
protected |
@breif introduce a slight variation into the departure time of "default" vehicles
[in] | trip | on which a random (normally distributed) variation will be tried |
Definition at line 113 of file AGActivityGen.cpp.
References city, AGDataAndStatistics::departureVariation, AGTime::getDay(), AGTrip::getDay(), AGTime::getSecondsInCurrentDay(), AGTrip::getTime(), AGTrip::getType(), RandHelper::randNorm(), AGTrip::setDay(), AGTrip::setDepTime(), and AGCity::statData.
Referenced by makeActivityTrips().
|
protected |
Definition at line 94 of file AGActivityGen.h.
Referenced by makeActivityTrips(), and timeTripValidation().
|
protected |
Definition at line 92 of file AGActivityGen.h.
Referenced by importInfoCity(), makeActivityTrips(), and varDepTime().
|
protected |
Definition at line 94 of file AGActivityGen.h.
Referenced by makeActivityTrips(), and timeTripValidation().
|
protected |
Definition at line 94 of file AGActivityGen.h.
Referenced by makeActivityTrips(), and timeTripValidation().
|
protected |
Definition at line 85 of file AGActivityGen.h.
Referenced by importInfoCity().
|
protected |
Definition at line 89 of file AGActivityGen.h.
Referenced by importInfoCity().
|
protected |
The generated routes.
Definition at line 87 of file AGActivityGen.h.
Referenced by generateOutputFile().