SUMO - Simulation of Urban MObility
|
#include <AGHousehold.h>
Public Member Functions | |
void | addACar () |
AGHousehold (AGPosition pos, AGCity *city, int idHouseholds) | |
AGHousehold (AGStreet *str, AGCity *city, int idHouseholds) | |
bool | allocateAdultsWork () |
bool | allocateChildrenSchool () |
void | generateCars (SUMOReal rate) |
void | generatePeople () |
int | getAdultNbr () |
int | getCarNbr () |
int | getPeopleNbr () |
AGPosition | getPosition () |
AGCity * | getTheCity () |
bool | isCloseFromPubTransport (std::list< AGPosition > *pubTransport) |
bool | isCloseFromPubTransport (std::map< int, AGPosition > *pubTransport) |
void | regenerate () |
bool | retiredHouseholders () |
Data Fields | |
std::list< AGAdult > | adults |
std::list< AGCar > | cars |
std::list< AGChild > | children |
Private Member Functions | |
bool | decisionProba (SUMOReal p) |
Private Attributes | |
int | idHH |
AGPosition | location |
AGCity * | myCity |
int | numberOfCars |
int | numberOfPeople |
Definition at line 58 of file AGHousehold.h.
|
inline |
Definition at line 60 of file AGHousehold.h.
Definition at line 64 of file AGHousehold.h.
void AGHousehold::addACar | ( | ) |
generates one (more) car in this household
Definition at line 86 of file AGHousehold.cpp.
Referenced by generateCars().
bool AGHousehold::allocateAdultsWork | ( | ) |
associates a work position to every working adult is taken in account the unemployment and the number of work positions
Definition at line 166 of file AGHousehold.cpp.
References adults, myCity, AGCity::statData, AGDataAndStatistics::unemployement, AGCity::workPositions, and AGDataAndStatistics::workPositions.
bool AGHousehold::allocateChildrenSchool | ( | ) |
associates a school to each children. return false if not done (not enough place at school in the city...
Definition at line 153 of file AGHousehold.cpp.
References children, location, myCity, and AGCity::schools.
Definition at line 181 of file AGHousehold.cpp.
References RandHelper::rand().
Referenced by generateCars(), and generatePeople().
void AGHousehold::generateCars | ( | SUMOReal | rate | ) |
function allocating cars to this household in relation to the given rate for each adult
Definition at line 75 of file AGHousehold.cpp.
References addACar(), adults, cars, and decisionProba().
void AGHousehold::generatePeople | ( | ) |
Definition at line 46 of file AGHousehold.cpp.
References adults, children, decisionProba(), AGDataAndStatistics::getPoissonsNumberOfChildren(), AGDataAndStatistics::getRandomPopDistributed(), AGDataAndStatistics::limitAgeChildren, AGDataAndStatistics::limitAgeRetirement, AGDataAndStatistics::limitEndAge, AGDataAndStatistics::meanNbrChildren, myCity, AGDataAndStatistics::secondPersProb, and AGCity::statData.
int AGHousehold::getAdultNbr | ( | ) |
Definition at line 102 of file AGHousehold.cpp.
References adults.
Referenced by AGWorkAndSchool::carAllocation(), AGWorkAndSchool::makePossibleDriversDrive(), and AGFreeTime::possibleTypeOfTrip().
int AGHousehold::getCarNbr | ( | ) |
Definition at line 92 of file AGHousehold.cpp.
References cars.
Referenced by AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::generateTrips(), AGWorkAndSchool::isThereUnusedCar(), and AGActivity::possibleTranspMean().
int AGHousehold::getPeopleNbr | ( | ) |
Definition at line 97 of file AGHousehold.cpp.
References adults, and children.
Referenced by AGFreeTime::possibleTypeOfTrip().
AGPosition AGHousehold::getPosition | ( | ) |
returns the position of the household and other private entities
Definition at line 186 of file AGHousehold.cpp.
References location.
Referenced by AGWorkAndSchool::buildChildrenAccompaniment(), AGWorkAndSchool::carsToTrips(), AGWorkAndSchool::generateListTrips(), AGActivity::possibleTranspMean(), regenerate(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
AGCity * AGHousehold::getTheCity | ( | ) |
returns the city pointer in which the household is.
Definition at line 191 of file AGHousehold.cpp.
References myCity.
Referenced by AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
bool AGHousehold::isCloseFromPubTransport | ( | std::list< AGPosition > * | pubTransport | ) |
function returning true if the household is close to the given stations stations
Definition at line 107 of file AGHousehold.cpp.
References location, AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, AGCity::statData, and SUMOReal.
bool AGHousehold::isCloseFromPubTransport | ( | std::map< int, AGPosition > * | pubTransport | ) |
Definition at line 116 of file AGHousehold.cpp.
References location, AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, AGCity::statData, and SUMOReal.
void AGHousehold::regenerate | ( | ) |
function regenerating the household: –> work positions and schools are resigned –> cars and people are deleted –> number of people are MAINTAINED –> work positions, schools and cars are reallocated
Definition at line 125 of file AGHousehold.cpp.
References adults, children, getPosition(), myCity, AGCity::schools, AGCity::statData, AGDataAndStatistics::unemployement, AGCity::workPositions, and AGDataAndStatistics::workPositions.
Referenced by AGActivities::generateTrips().
bool AGHousehold::retiredHouseholders | ( | ) |
returns if adults are retired or in working age
Definition at line 196 of file AGHousehold.cpp.
References adults, AGDataAndStatistics::limitAgeRetirement, myCity, and AGCity::statData.
std::list<AGAdult> AGHousehold::adults |
Definition at line 123 of file AGHousehold.h.
Referenced by allocateAdultsWork(), AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::carAllocation(), AGFreeTime::decideTypeOfTrip(), generateCars(), generatePeople(), getAdultNbr(), getPeopleNbr(), AGWorkAndSchool::makePossibleDriversDrive(), AGFreeTime::possibleTypeOfTrip(), regenerate(), and retiredHouseholders().
std::list<AGCar> AGHousehold::cars |
Definition at line 125 of file AGHousehold.h.
Referenced by addACar(), AGWorkAndSchool::carsToTrips(), generateCars(), getCarNbr(), AGWorkAndSchool::getUnusedCar(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
std::list<AGChild> AGHousehold::children |
Definition at line 124 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), AGWorkAndSchool::buildChildrenAccompaniment(), generatePeople(), getPeopleNbr(), and regenerate().
|
private |
Definition at line 135 of file AGHousehold.h.
Referenced by addACar().
|
private |
Definition at line 132 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), getPosition(), and isCloseFromPubTransport().
|
private |
Definition at line 131 of file AGHousehold.h.
Referenced by allocateAdultsWork(), allocateChildrenSchool(), generatePeople(), getTheCity(), isCloseFromPubTransport(), regenerate(), and retiredHouseholders().
|
private |
Definition at line 134 of file AGHousehold.h.
|
private |
Definition at line 133 of file AGHousehold.h.