SUMO - Simulation of Urban MObility

AGCity Class Reference

#include <AGCity.h>

Public Member Functions

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

Data Fields

std::list< AGBusLine > busLines
std::vector< AGPosition > cityGates
std::list< AGHousehold > households
std::list< AGAdult > peopleIncoming
std::list< AGSchool > schools
AGDataAndStatistics & statData
std::vector< AGStreet > streets
std::vector< AGWorkPosition > workPositions

Private Member Functions

AGSchool closestSchoolTo (AGPosition pos)
void generateIncomingPopulation ()
void generateOutgoingWP ()

Private Attributes

int nbrCars
RONet * net
int NrStreets
bool streetsCompleted

Detailed Description

Definition at line 59 of file AGCity.h.


Constructor & Destructor Documentation

AGCity::AGCity ( RONet *  net) [inline]

Definition at line 61 of file AGCity.h.


Member Function Documentation

AGSchool AGCity::closestSchoolTo ( AGPosition  pos) [private]
void AGCity::completeBusLines ( )

Definition at line 161 of file AGCity.cpp.

References busLines.

Referenced by AGActivityGen::importInfoCity().

void AGCity::generateIncomingPopulation ( ) [private]

generates people from outside the city for incoming traffic generation

Definition at line 238 of file AGCity.cpp.

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

Referenced by generatePopulation().

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

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

Referenced by generateWorkPositions().

void AGCity::generateWorkPositions ( )
const AGStreet & AGCity::getRandomStreet ( )
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 364 of file AGCity.cpp.

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

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

void AGCity::schoolAllocation ( )

Definition at line 246 of file AGCity.cpp.

References households.

Referenced by AGActivityGen::importInfoCity().

void AGCity::workAllocation ( )

people from the city

people from outside

Definition at line 267 of file AGCity.cpp.

References AGDataAndStatistics::AdultNbr, households, peopleIncoming, statData, workPositions, and AGDataAndStatistics::workPositions.

Referenced by AGActivityGen::importInfoCity().


Field Documentation

int AGCity::nbrCars [private]

Definition at line 116 of file AGCity.h.

Referenced by carAllocation(), and generatePopulation().

RONet* AGCity::net [private]

Definition at line 108 of file AGCity.h.

Referenced by completeStreets().

int AGCity::NrStreets [private]

Definition at line 115 of file AGCity.h.

Referenced by completeStreets().

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

Definition at line 113 of file AGCity.h.

Referenced by completeStreets(), and getStreet().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines