74 int decision = (int)floor(alea * (
double)num_poss);
109 std::list<AGAdult>::const_iterator itA;
110 bool noBodyWorks =
true;
112 if (itA->isWorking()) {
137 if (depTime < 0 || retTime < 0) {
158 if (depTime < 0 || retTime < 0) {
184 if (depTime < 0 || retTime < 0) {
188 AGTime departureTime(depTime);
189 nextDay = departureTime.
getDay();
193 AGTime returnTime(depTime);
194 nextDay = returnTime.getDay();
195 returnTime.setDay(0);
209 for (
int day = 1; day <=
nbrDays; ++day) {
213 }
else if (type ==
DAY) {
221 }
else if (type ==
NIGHT) {
235 if (timeBack < itT->getArrTime(this->
timePerKm) && itT->isDaily()) {
236 timeBack = itT->getArrTime(this->
timePerKm);
246 if (timeBack < itT->getArrTime(this->
timePerKm) && (itT->getDay() == day || itT->isDaily())) {
247 timeBack = itT->getArrTime(this->
timePerKm);
257 if (timeBack.
getTime() > itT->getTime() && (itT->getDay() == (day + 1) || itT->isDaily())) {
258 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