73 int decision = (int)floor(alea * (
double)num_poss);
108 std::list<AGAdult>::const_iterator itA;
109 bool noBodyWorks =
true;
111 if (itA->isWorking()) {
136 if (depTime < 0 || retTime < 0) {
157 if (depTime < 0 || retTime < 0) {
183 if (depTime < 0 || retTime < 0) {
187 AGTime departureTime(depTime);
188 nextDay = departureTime.
getDay();
192 AGTime returnTime(depTime);
193 nextDay = returnTime.getDay();
194 returnTime.setDay(0);
208 for (
int day = 1; day <=
nbrDays; ++day) {
212 }
else if (type ==
DAY) {
220 }
else if (type ==
NIGHT) {
234 if (timeBack < itT->getArrTime(this->
timePerKm) && itT->isDaily()) {
235 timeBack = itT->getArrTime(this->
timePerKm);
245 if (timeBack < itT->getArrTime(this->
timePerKm) && (itT->getDay() == day || itT->isDaily())) {
246 timeBack = itT->getArrTime(this->
timePerKm);
256 if (timeBack.
getTime() > itT->getTime() && (itT->getDay() == (day + 1) || itT->isDaily())) {
257 timeBack.
setTime(itT->getTime());
int depHour(AGPosition from, AGPosition to, int arrival)
const std::list< AGAdult > & getAdults() const
bool typeFromHomeDay(int day)
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
A location in the 2D plane freely positioned on a street.
bool typeFromHomeEvening(int day)
AGDataAndStatistics * myStatData
void addDays(int days)
addition of days to the current moment
const AGStreet & getRandomStreet()
int whenBeginActivityNextDay(int day)
std::list< AGTrip > * myPreviousTrips
static const int TB_EVENING
int randomTimeBetween(int begin, int end)
AGHousehold * myHousehold
int whenBackHomeThisDay(int day)
int arrHour(AGPosition from, AGPosition to, int departure)
std::list< AGTrip > myPartialActivityTrips
bool typeFromHomeNight(int day)
static const int TE_EVENING
int getTime()
: returns the number of seconds from the beginning of the first day of simulation this includes ...
static const int TE_NIGHT
void setTime(int sec)
: sets the time from the beginning of the first day of simulation in seconds
static const int TB_NIGHT
const std::list< AGCar > & getCars() const