![]() |
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 numAdults, int numChilds, bool firstRetired) |
unsigned int | getAdultNbr () |
const std::list< AGAdult > & | getAdults () const |
int | getCarNbr () |
const std::list< AGCar > & | getCars () const |
const std::list< AGChild > & | getChildren () const |
unsigned int | getPeopleNbr () |
AGPosition | getPosition () |
AGCity * | getTheCity () |
bool | isCloseFromPubTransport (std::list< AGPosition > *pubTransport) |
bool | isCloseFromPubTransport (std::map< int, AGPosition > *pubTransport) |
void | regenerate () |
bool | retiredHouseholders () |
Private Attributes | |
std::list< AGAdult > | myAdults |
std::list< AGCar > | myCars |
std::list< AGChild > | myChildren |
AGCity * | myCity |
int | myId |
AGPosition | myLocation |
Definition at line 59 of file AGHousehold.h.
|
inline |
Definition at line 61 of file AGHousehold.h.
Definition at line 65 of file AGHousehold.h.
References addACar(), allocateAdultsWork(), allocateChildrenSchool(), generateCars(), generatePeople(), getAdultNbr(), getAdults(), getCarNbr(), getCars(), getChildren(), getPeopleNbr(), getPosition(), getTheCity(), isCloseFromPubTransport(), regenerate(), retiredHouseholders(), and SUMOReal.
void AGHousehold::addACar | ( | ) |
generates one (more) car in this household
Definition at line 83 of file AGHousehold.cpp.
Referenced by AGHousehold(), and 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 178 of file AGHousehold.cpp.
References myAdults, myCity, AGCity::statData, AGDataAndStatistics::unemployement, AGDataAndStatistics::workPositions, and AGCity::workPositions.
Referenced by AGHousehold().
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 165 of file AGHousehold.cpp.
References myChildren, myCity, myLocation, and AGCity::schools.
Referenced by AGHousehold().
void AGHousehold::generateCars | ( | SUMOReal | rate | ) |
function allocating cars to this household in relation to the given rate for each adult
Definition at line 72 of file AGHousehold.cpp.
References addACar(), myAdults, myCars, and RandHelper::rand().
Referenced by AGHousehold().
void AGHousehold::generatePeople | ( | int | numAdults, |
int | numChilds, | ||
bool | firstRetired | ||
) |
function generating the given number of adults (1 or 2) and possibly children
Definition at line 46 of file AGHousehold.cpp.
References AGDataAndStatistics::getRandomPopDistributed(), AGDataAndStatistics::limitAgeChildren, AGDataAndStatistics::limitAgeRetirement, AGDataAndStatistics::limitEndAge, myAdults, myChildren, myCity, and AGCity::statData.
Referenced by AGHousehold().
unsigned int AGHousehold::getAdultNbr | ( | ) |
Definition at line 99 of file AGHousehold.cpp.
References myAdults.
Referenced by AGHousehold(), AGWorkAndSchool::carAllocation(), AGWorkAndSchool::makePossibleDriversDrive(), and AGFreeTime::possibleTypeOfTrip().
const std::list< AGAdult > & AGHousehold::getAdults | ( | ) | const |
Definition at line 104 of file AGHousehold.cpp.
References myAdults.
Referenced by AGHousehold(), AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::carAllocation(), AGFreeTime::decideTypeOfTrip(), AGWorkAndSchool::makePossibleDriversDrive(), and AGFreeTime::possibleTypeOfTrip().
int AGHousehold::getCarNbr | ( | ) |
Definition at line 89 of file AGHousehold.cpp.
References myCars.
Referenced by AGHousehold(), AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::generateTrips(), AGWorkAndSchool::isThereUnusedCar(), and AGActivity::possibleTranspMean().
const std::list< AGCar > & AGHousehold::getCars | ( | ) | const |
Definition at line 114 of file AGHousehold.cpp.
References myCars.
Referenced by AGHousehold(), AGWorkAndSchool::carsToTrips(), AGWorkAndSchool::getUnusedCar(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
const std::list< AGChild > & AGHousehold::getChildren | ( | ) | const |
Definition at line 109 of file AGHousehold.cpp.
References myChildren.
Referenced by AGHousehold(), and AGWorkAndSchool::buildChildrenAccompaniment().
unsigned int AGHousehold::getPeopleNbr | ( | ) |
Definition at line 94 of file AGHousehold.cpp.
References myAdults, and myChildren.
Referenced by AGHousehold(), and AGFreeTime::possibleTypeOfTrip().
AGPosition AGHousehold::getPosition | ( | ) |
returns the position of the household and other private entities
Definition at line 193 of file AGHousehold.cpp.
References myLocation.
Referenced by AGHousehold(), 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 198 of file AGHousehold.cpp.
References myCity.
Referenced by AGHousehold(), 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 119 of file AGHousehold.cpp.
References AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, myLocation, AGCity::statData, and SUMOReal.
Referenced by AGHousehold().
bool AGHousehold::isCloseFromPubTransport | ( | std::map< int, AGPosition > * | pubTransport | ) |
Definition at line 128 of file AGHousehold.cpp.
References AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, myLocation, 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 137 of file AGHousehold.cpp.
References getPosition(), myAdults, myChildren, myCity, AGCity::schools, AGCity::statData, AGDataAndStatistics::unemployement, AGDataAndStatistics::workPositions, and AGCity::workPositions.
Referenced by AGHousehold(), and AGActivities::generateTrips().
bool AGHousehold::retiredHouseholders | ( | ) |
returns if adults are retired or in working age
Definition at line 203 of file AGHousehold.cpp.
References AGDataAndStatistics::limitAgeRetirement, myAdults, myCity, and AGCity::statData.
Referenced by AGHousehold().
|
private |
Definition at line 129 of file AGHousehold.h.
Referenced by allocateAdultsWork(), generateCars(), generatePeople(), getAdultNbr(), getAdults(), getPeopleNbr(), regenerate(), and retiredHouseholders().
|
private |
Definition at line 131 of file AGHousehold.h.
Referenced by addACar(), generateCars(), getCarNbr(), and getCars().
|
private |
Definition at line 130 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), generatePeople(), getChildren(), getPeopleNbr(), and regenerate().
|
private |
Definition at line 124 of file AGHousehold.h.
Referenced by allocateAdultsWork(), allocateChildrenSchool(), generatePeople(), getTheCity(), isCloseFromPubTransport(), regenerate(), and retiredHouseholders().
|
private |
Definition at line 126 of file AGHousehold.h.
Referenced by addACar().
|
private |
Definition at line 125 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), getPosition(), and isCloseFromPubTransport().