Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGActivities Class Reference

#include <AGActivities.h>

Collaboration diagram for AGActivities:
[legend]

Public Member Functions

void addTrip (AGTrip t, std::list< AGTrip > *tripSet)
 
void addTrips (std::list< AGTrip > t, std::list< AGTrip > *tripSet)
 
 AGActivities (AGCity *city, int days)
 
void generateActivityTrips ()
 

Data Fields

std::list< AGTriptrips
 

Private Member Functions

bool generateBusTraffic (AGBusLine bl)
 
bool generateInOutTraffic ()
 
std::string generateName (int i, std::string prefix)
 
bool generateRandomTraffic ()
 
bool generateTrips (AGHousehold &hh)
 

Private Attributes

AGCitymyCity
 
int nbrDays
 

Detailed Description

Definition at line 38 of file AGActivities.h.

Constructor & Destructor Documentation

◆ AGActivities()

AGActivities::AGActivities ( AGCity city,
int  days 
)
inline

Definition at line 40 of file AGActivities.h.

Member Function Documentation

◆ addTrip()

void AGActivities::addTrip ( AGTrip  t,
std::list< AGTrip > *  tripSet 
)

Definition at line 42 of file AGActivities.cpp.

◆ addTrips()

void AGActivities::addTrips ( std::list< AGTrip t,
std::list< AGTrip > *  tripSet 
)

Definition at line 47 of file AGActivities.cpp.

Referenced by generateTrips().

Here is the caller graph for this function:

◆ generateActivityTrips()

void AGActivities::generateActivityTrips ( )

trips due to public transportation

trips due to activities in the city @NOTICE: includes people working in work positions out of the city

trips due to incoming and outgoing traffic @WARNING: the outgoing traffic is already done: households in which someone works on a work position that is out of the city.

random traffic trips @NOTICE: this includes uniform and proportional random traffic

Definition at line 55 of file AGActivities.cpp.

References AGCity::busLines, generateBusTraffic(), generateInOutTraffic(), generateRandomTraffic(), generateTrips(), AGCity::households, myCity, and trips.

Referenced by AGActivityGen::makeActivityTrips().

Here is the caller graph for this function:

◆ generateBusTraffic()

bool AGActivities::generateBusTraffic ( AGBusLine  bl)
private

Buses in the first direction

Buses in the return direction

Definition at line 152 of file AGActivities.cpp.

References AGTrip::addLayOver(), AGBusLine::buses, AGTrip::getArr(), AGTrip::getDep(), AGBusLine::revBuses, AGBusLine::revStations, AGBusLine::stations, and trips.

Referenced by generateActivityTrips().

Here is the caller graph for this function:

◆ generateInOutTraffic()

bool AGActivities::generateInOutTraffic ( )
private

outgoing traffic already done by generateTrips(): people who work out of the city. Here are people from outside the city coming to work.

Definition at line 195 of file AGActivities.cpp.

References AGCity::cityGates, AGTrip::estimateDepTime(), generateName(), AGDataAndStatistics::getRandomCityGateByIncoming(), AGTrip::getTime(), myCity, AGCity::peopleIncoming, AGTrip::setDepTime(), AGDataAndStatistics::speedTimePerKm, AGCity::statData, and trips.

Referenced by generateActivityTrips().

Here is the caller graph for this function:

◆ generateName()

std::string AGActivities::generateName ( int  i,
std::string  prefix 
)
private

generates car names, given the unique (number, prefix)

Definition at line 225 of file AGActivities.cpp.

Referenced by generateInOutTraffic(), and generateRandomTraffic().

Here is the caller graph for this function:

◆ generateRandomTraffic()

bool AGActivities::generateRandomTraffic ( )
private

Definition at line 232 of file AGActivities.cpp.

References generateName(), AGTime::getDay(), AGCity::getRandomStreet(), AGTime::getTime(), myCity, nbrDays, RandHelper::rand(), AGTrip::setType(), AGCity::statData, trips, and AGDataAndStatistics::uniformRandomTrafficRate.

Referenced by generateActivityTrips().

Here is the caller graph for this function:

◆ generateTrips()

bool AGActivities::generateTrips ( AGHousehold hh)
private

Definition at line 117 of file AGActivities.cpp.

References addTrips(), AGFreeTime::generateTrips(), AGWorkAndSchool::generateTrips(), AGActivity::getPartialActivityTrips(), myCity, nbrDays, REBUILD_ITERATION_LIMIT, AGHousehold::regenerate(), AGCity::statData, and trips.

Referenced by generateActivityTrips().

Here is the caller graph for this function:

Field Documentation

◆ myCity

AGCity* AGActivities::myCity
private

◆ nbrDays

int AGActivities::nbrDays
private

Definition at line 68 of file AGActivities.h.

Referenced by generateRandomTraffic(), and generateTrips().

◆ trips

std::list<AGTrip> AGActivities::trips

trips contains trips as well for one day as for every day, these trips will be regenerated with small variations by ActivityGen at the end of the simulation before generating the trip file

Definition at line 53 of file AGActivities.h.

Referenced by generateActivityTrips(), generateBusTraffic(), generateInOutTraffic(), generateRandomTraffic(), generateTrips(), and AGActivityGen::makeActivityTrips().


The documentation for this class was generated from the following files: