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

#include <AGCity.h>

Collaboration diagram for AGCity:
[legend]

Public Member Functions

 AGCity (RONet *net)
void carAllocation ()
void completeBusLines ()
void completeStreets ()
void generatePopulation ()
void generateWorkPositions ()
const AGStreetgetRandomStreet ()
const AGStreetgetStreet (const std::string &edge)
void schoolAllocation ()
void workAllocation ()

Data Fields

std::list< AGBusLinebusLines
std::vector< AGPositioncityGates
std::list< AGHouseholdhouseholds
std::vector< AGStreet * > passengerStreets
std::list< AGAdultpeopleIncoming
std::list< AGSchoolschools
AGDataAndStatisticsstatData
std::vector< AGStreet * > streets
std::vector< AGWorkPositionworkPositions

Private Member Functions

AGSchool closestSchoolTo (AGPosition pos)
void generateIncomingPopulation ()
void generateOutgoingWP ()
AGCityoperator= (const AGCity &)
 invalidated assignment operator

Private Attributes

int nbrCars
RONetnet
bool streetsCompleted

Detailed Description

Definition at line 50 of file AGCity.h.

Constructor & Destructor Documentation

◆ AGCity()

AGCity::AGCity ( RONet * net)
inline

Definition at line 52 of file AGCity.h.

References net, statData, and streetsCompleted.

Referenced by operator=().

Here is the caller graph for this function:

Member Function Documentation

◆ carAllocation()

void AGCity::carAllocation ( )

Definition at line 344 of file AGCity.cpp.

References households, nbrCars, and statData.

◆ closestSchoolTo()

AGSchool AGCity::closestSchoolTo ( AGPosition pos)
private

◆ completeBusLines()

void AGCity::completeBusLines ( )

Definition at line 156 of file AGCity.cpp.

References busLines.

◆ completeStreets()

void AGCity::completeStreets ( )

generates streets: complete the "streets" vector using the DataAndStat's map edges.

Definition at line 50 of file AGCity.cpp.

References net, passengerStreets, statData, streets, streetsCompleted, and SVC_PASSENGER.

Referenced by getStreet().

Here is the caller graph for this function:

◆ generateIncomingPopulation()

void AGCity::generateIncomingPopulation ( )
private

generates people from outside the city for incoming traffic generation

Definition at line 249 of file AGCity.cpp.

References peopleIncoming, and statData.

Referenced by generatePopulation().

Here is the caller graph for this function:

◆ generateOutgoingWP()

void AGCity::generateOutgoingWP ( )
private

generates workpositions on the city's gates (entrances) for the outgoing work traffic.

N_out = N_in * (ProportionOut / (1 - ProportionOut)) = N_out = N_in * (Noutworkers / (Nworkers - Noutworkers))

Definition at line 127 of file AGCity.cpp.

References cityGates, getStreet(), statData, and workPositions.

Referenced by generateWorkPositions().

Here is the caller graph for this function:

◆ generatePopulation()

void AGCity::generatePopulation ( )

◆ generateWorkPositions()

void AGCity::generateWorkPositions ( )

Definition at line 102 of file AGCity.cpp.

References generateOutgoingWP(), statData, streets, and workPositions.

◆ getRandomStreet()

const AGStreet & AGCity::getRandomStreet ( )

returns a random street

Definition at line 413 of file AGCity.cpp.

References RandHelper::getRandomFrom(), passengerStreets, and TL.

◆ getStreet()

const AGStreet & AGCity::getStreet ( const std::string & edge)

manipulation functions

verify if it is the first time this function is called in this case, we have to complete the streets with the network edges this means that streets are completely loaded (no any more to be read from stat-file)

Definition at line 388 of file AGCity.cpp.

References completeStreets(), statData, streets, and streetsCompleted.

Referenced by generateOutgoingWP().

Here is the caller graph for this function:

◆ operator=()

AGCity & AGCity::operator= ( const AGCity & )
private

invalidated assignment operator

References AGCity().

◆ schoolAllocation()

void AGCity::schoolAllocation ( )

Definition at line 257 of file AGCity.cpp.

References households.

◆ workAllocation()

void AGCity::workAllocation ( )

people from the city

people from outside

Definition at line 278 of file AGCity.cpp.

References OptionsCont::getBool(), OptionsCont::getOptions(), households, peopleIncoming, statData, and workPositions.

Field Documentation

◆ busLines

std::list<AGBusLine> AGCity::busLines

Definition at line 83 of file AGCity.h.

Referenced by completeBusLines().

◆ cityGates

std::vector<AGPosition> AGCity::cityGates

Definition at line 85 of file AGCity.h.

Referenced by generateOutgoingWP().

◆ households

std::list<AGHousehold> AGCity::households

Definition at line 84 of file AGCity.h.

Referenced by carAllocation(), generatePopulation(), schoolAllocation(), and workAllocation().

◆ nbrCars

int AGCity::nbrCars
private

Definition at line 107 of file AGCity.h.

Referenced by carAllocation(), and generatePopulation().

◆ net

RONet* AGCity::net
private

Definition at line 100 of file AGCity.h.

Referenced by AGCity(), and completeStreets().

◆ passengerStreets

std::vector<AGStreet*> AGCity::passengerStreets

Definition at line 80 of file AGCity.h.

Referenced by completeStreets(), and getRandomStreet().

◆ peopleIncoming

std::list<AGAdult> AGCity::peopleIncoming

Definition at line 86 of file AGCity.h.

Referenced by generateIncomingPopulation(), and workAllocation().

◆ schools

std::list<AGSchool> AGCity::schools

Definition at line 82 of file AGCity.h.

◆ statData

◆ streets

std::vector<AGStreet*> AGCity::streets

Definition at line 79 of file AGCity.h.

Referenced by completeStreets(), generatePopulation(), generateWorkPositions(), and getStreet().

◆ streetsCompleted

bool AGCity::streetsCompleted
private

false until the function completeStreets is called this function completes streets and turn this parameter to true

Definition at line 105 of file AGCity.h.

Referenced by AGCity(), completeStreets(), and getStreet().

◆ workPositions

std::vector<AGWorkPosition> AGCity::workPositions

Definition at line 81 of file AGCity.h.

Referenced by generateOutgoingWP(), generateWorkPositions(), and workAllocation().


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