72 int decision = (int)floor(alea * (
double)num_poss);
107 std::list<AGAdult>::const_iterator itA;
108 bool noBodyWorks =
true;
110 if (itA->isWorking()) {
135 if (depTime < 0 || retTime < 0) {
156 if (depTime < 0 || retTime < 0) {
182 if (depTime < 0 || retTime < 0) {
186 AGTime departureTime(depTime);
187 nextDay = departureTime.
getDay();
191 AGTime returnTime(depTime);
192 nextDay = returnTime.
getDay();
207 for (
int day = 1; day <=
nbrDays; ++day) {
211 }
else if (type ==
DAY) {
219 }
else if (type ==
NIGHT) {
233 if (timeBack < itT->getArrTime(this->
timePerKm) && itT->isDaily()) {
234 timeBack = itT->getArrTime(this->
timePerKm);
244 if (timeBack < itT->getArrTime(this->
timePerKm) && (itT->getDay() == day || itT->isDaily())) {
245 timeBack = itT->getArrTime(this->
timePerKm);
255 if (timeBack.
getTime() > itT->getTime() && (itT->getDay() == (day + 1) || itT->isDaily())) {
256 timeBack.
setTime(itT->getTime());
std::list< AGTrip > * myPreviousTrips
AGHousehold * myHousehold
std::list< AGTrip > myPartialActivityTrips
AGDataAndStatistics * myStatData
int depHour(AGPosition from, AGPosition to, int arrival)
int arrHour(AGPosition from, AGPosition to, int departure)
int randomTimeBetween(int begin, int end)
const AGStreet & getRandomStreet()
static const int TB_NIGHT
bool typeFromHomeDay(int day)
static const int TB_EVENING
bool typeFromHomeEvening(int day)
int whenBackHomeThisDay(int day)
static const int TE_EVENING
int whenBeginActivityNextDay(int day)
static const int TE_NIGHT
bool typeFromHomeNight(int day)
const std::list< AGCar > & getCars() const
const std::list< AGAdult > & getAdults() const
A location in the 2D plane freely positioned on a street.
int getTime()
: returns the number of seconds from the beginning of the first day of simulation this includes
void setTime(int sec)
: sets the time from the beginning of the first day of simulation in seconds
void addDays(int days)
addition of days to the current moment
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)