SUMO - Simulation of Urban MObility
AGCity Class Reference

#include <AGCity.h>

Collaboration diagram for AGCity:
Collaboration graph

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::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 More...
 

Private Attributes

int nbrCars
 
RONetnet
 
bool streetsCompleted
 

Detailed Description

Definition at line 53 of file AGCity.h.

Constructor & Destructor Documentation

◆ AGCity()

Member Function Documentation

◆ carAllocation()

◆ closestSchoolTo()

AGSchool AGCity::closestSchoolTo ( AGPosition  pos)
private

◆ completeBusLines()

void AGCity::completeBusLines ( )

Definition at line 152 of file AGCity.cpp.

References busLines.

Referenced by AGCity(), and AGActivityGen::importInfoCity().

◆ completeStreets()

◆ generateIncomingPopulation()

void AGCity::generateIncomingPopulation ( )
private

generates people from outside the city for incoming traffic generation

Definition at line 255 of file AGCity.cpp.

References AGDataAndStatistics::getRandomPopDistributed(), AGDataAndStatistics::incomingTraffic, AGDataAndStatistics::limitAgeChildren, AGDataAndStatistics::limitAgeRetirement, peopleIncoming, and statData.

Referenced by generatePopulation().

◆ 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 124 of file AGCity.cpp.

References cityGates, AGDataAndStatistics::getPeopleYoungerThan(), AGDataAndStatistics::getRandomCityGateByOutgoing(), getStreet(), AGDataAndStatistics::limitAgeChildren, AGDataAndStatistics::limitAgeRetirement, AGDataAndStatistics::outgoingTraffic, statData, AGDataAndStatistics::unemployement, workPositions, and AGDataAndStatistics::workPositions.

Referenced by generateWorkPositions().

◆ generatePopulation()

◆ generateWorkPositions()

void AGCity::generateWorkPositions ( )

◆ getRandomStreet()

const AGStreet & AGCity::getRandomStreet ( )

◆ 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 394 of file AGCity.cpp.

References completeStreets(), AGDataAndStatistics::consolidateStat(), statData, streets, and streetsCompleted.

Referenced by AGCity(), generateOutgoingWP(), AGActivityGenHandler::parseBusStation(), AGActivityGenHandler::parseCityGates(), and AGActivityGenHandler::parseSchool().

◆ operator=()

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

invalidated assignment operator

◆ schoolAllocation()

void AGCity::schoolAllocation ( )

Definition at line 263 of file AGCity.cpp.

References households.

Referenced by AGCity(), and AGActivityGen::importInfoCity().

◆ workAllocation()

void AGCity::workAllocation ( )

Field Documentation

◆ busLines

std::list<AGBusLine> AGCity::busLines

◆ cityGates

std::vector<AGPosition> AGCity::cityGates

◆ households

std::list<AGHousehold> AGCity::households

◆ nbrCars

int AGCity::nbrCars
private

Definition at line 109 of file AGCity.h.

Referenced by carAllocation(), and generatePopulation().

◆ net

RONet* AGCity::net
private

Definition at line 102 of file AGCity.h.

Referenced by completeStreets().

◆ peopleIncoming

std::list<AGAdult> AGCity::peopleIncoming

◆ schools

std::list<AGSchool> AGCity::schools

◆ statData

◆ streets

◆ 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 107 of file AGCity.h.

Referenced by completeStreets(), and getStreet().

◆ workPositions

std::vector<AGWorkPosition> AGCity::workPositions

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