![]() |
Eclipse 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 (double rate) |
| void | generatePeople (int numAdults, int numChilds, bool firstRetired) |
| int | getAdultNbr () |
| const std::list< AGAdult > & | getAdults () const |
| int | getCarNbr () |
| const std::list< AGCar > & | getCars () const |
| const std::list< AGChild > & | getChildren () const |
| 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 49 of file AGHousehold.h.
|
inline |
Definition at line 51 of file AGHousehold.h.
Definition at line 55 of file AGHousehold.h.
| void AGHousehold::addACar | ( | ) |
generates one (more) car in this household
Definition at line 77 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 172 of file AGHousehold.cpp.
References myAdults, 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 159 of file AGHousehold.cpp.
References myChildren, myCity, myLocation, and AGCity::schools.
| void AGHousehold::generateCars | ( | double | rate | ) |
function allocating cars to this household in relation to the given rate for each adult
Definition at line 66 of file AGHousehold.cpp.
References addACar(), myAdults, myCars, and RandHelper::rand().
| 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 40 of file AGHousehold.cpp.
References AGDataAndStatistics::getRandomPopDistributed(), AGDataAndStatistics::limitAgeChildren, AGDataAndStatistics::limitAgeRetirement, AGDataAndStatistics::limitEndAge, myAdults, myChildren, myCity, and AGCity::statData.
| int AGHousehold::getAdultNbr | ( | ) |
Definition at line 93 of file AGHousehold.cpp.
References myAdults.
Referenced by AGWorkAndSchool::carAllocation(), AGWorkAndSchool::makePossibleDriversDrive(), and AGFreeTime::possibleTypeOfTrip().
| const std::list< AGAdult > & AGHousehold::getAdults | ( | ) | const |
Definition at line 98 of file AGHousehold.cpp.
References myAdults.
Referenced by AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::carAllocation(), AGFreeTime::decideTypeOfTrip(), AGWorkAndSchool::makePossibleDriversDrive(), and AGFreeTime::possibleTypeOfTrip().
| int AGHousehold::getCarNbr | ( | ) |
Definition at line 83 of file AGHousehold.cpp.
References myCars.
Referenced by AGWorkAndSchool::buildWorkDestinations(), AGWorkAndSchool::generateTrips(), AGWorkAndSchool::isThereUnusedCar(), and AGActivity::possibleTranspMean().
| const std::list< AGCar > & AGHousehold::getCars | ( | ) | const |
Definition at line 108 of file AGHousehold.cpp.
References myCars.
Referenced by AGWorkAndSchool::carsToTrips(), AGWorkAndSchool::getUnusedCar(), AGFreeTime::typeFromHomeDay(), AGFreeTime::typeFromHomeEvening(), and AGFreeTime::typeFromHomeNight().
| const std::list< AGChild > & AGHousehold::getChildren | ( | ) | const |
Definition at line 103 of file AGHousehold.cpp.
References myChildren.
Referenced by AGWorkAndSchool::buildChildrenAccompaniment().
| int AGHousehold::getPeopleNbr | ( | ) |
Definition at line 88 of file AGHousehold.cpp.
References myAdults, and myChildren.
Referenced by AGFreeTime::possibleTypeOfTrip().
| AGPosition AGHousehold::getPosition | ( | ) |
returns the position of the household and other private entities
Definition at line 187 of file AGHousehold.cpp.
References myLocation.
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 192 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 113 of file AGHousehold.cpp.
References AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, myLocation, and AGCity::statData.
| bool AGHousehold::isCloseFromPubTransport | ( | std::map< int, AGPosition > * | pubTransport | ) |
Definition at line 122 of file AGHousehold.cpp.
References AGDataAndStatistics::maxFootDistance, AGPosition::minDistanceTo(), myCity, myLocation, and AGCity::statData.
| 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 131 of file AGHousehold.cpp.
References getPosition(), myAdults, myChildren, 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 197 of file AGHousehold.cpp.
References AGDataAndStatistics::limitAgeRetirement, myAdults, myCity, and AGCity::statData.
|
private |
Definition at line 119 of file AGHousehold.h.
Referenced by allocateAdultsWork(), generateCars(), generatePeople(), getAdultNbr(), getAdults(), getPeopleNbr(), regenerate(), and retiredHouseholders().
|
private |
Definition at line 121 of file AGHousehold.h.
Referenced by addACar(), generateCars(), getCarNbr(), and getCars().
|
private |
Definition at line 120 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), generatePeople(), getChildren(), getPeopleNbr(), and regenerate().
|
private |
Definition at line 114 of file AGHousehold.h.
Referenced by allocateAdultsWork(), allocateChildrenSchool(), generatePeople(), getTheCity(), isCloseFromPubTransport(), isCloseFromPubTransport(), regenerate(), and retiredHouseholders().
|
private |
Definition at line 116 of file AGHousehold.h.
Referenced by addACar().
|
private |
Definition at line 115 of file AGHousehold.h.
Referenced by allocateChildrenSchool(), getPosition(), isCloseFromPubTransport(), and isCloseFromPubTransport().