79 int decision = (
int)floor(alea * (
SUMOReal)num_poss);
114 std::list<AGAdult>::const_iterator itA;
115 bool noBodyWorks =
true;
117 if (itA->isWorking()) {
142 if (depTime < 0 || retTime < 0) {
163 if (depTime < 0 || retTime < 0) {
189 if (depTime < 0 || retTime < 0) {
193 AGTime departureTime(depTime);
194 nextDay = departureTime.
getDay();
198 AGTime returnTime(depTime);
199 nextDay = returnTime.getDay();
200 returnTime.setDay(0);
214 for (
int day = 1; day <=
nbrDays; ++day) {
218 }
else if (type ==
DAY) {
226 }
else if (type ==
NIGHT) {
240 if (timeBack < itT->getArrTime(this->
timePerKm) && itT->isDaily()) {
241 timeBack = itT->getArrTime(this->
timePerKm);
251 if (timeBack < itT->getArrTime(this->
timePerKm) && (itT->getDay() == day || itT->isDaily())) {
252 timeBack = itT->getArrTime(this->
timePerKm);
262 if (timeBack.
getTime() > itT->getTime() && (itT->getDay() == (day + 1) || itT->isDaily())) {
263 timeBack.
setTime(itT->getTime());
int depHour(AGPosition from, AGPosition to, int arrival)
bool typeFromHomeDay(int day)
const std::list< AGCar > & getCars() const
A location in the 2D plane freely positioned on a street.
static SUMOReal rand()
Returns a random real number in [0, 1)
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
const std::list< AGAdult > & getAdults() const
int whenBackHomeThisDay(int day)
unsigned int getPeopleNbr()
int arrHour(AGPosition from, AGPosition to, int departure)
std::list< AGTrip > myPartialActivityTrips
bool typeFromHomeNight(int day)
unsigned int getAdultNbr()
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