80 int decision = (int)floor(alea * (
SUMOReal)num_poss);
115 std::list<AGAdult>::const_iterator itA;
116 bool noBodyWorks =
true;
118 if (itA->isWorking()) {
143 if (depTime < 0 || retTime < 0) {
164 if (depTime < 0 || retTime < 0) {
190 if (depTime < 0 || retTime < 0) {
194 AGTime departureTime(depTime);
195 nextDay = departureTime.
getDay();
199 AGTime returnTime(depTime);
200 nextDay = returnTime.getDay();
201 returnTime.setDay(0);
215 for (
int day = 1; day <=
nbrDays; ++day) {
219 }
else if (type ==
DAY) {
227 }
else if (type ==
NIGHT) {
241 if (timeBack < itT->getArrTime(this->
timePerKm) && itT->isDaily()) {
242 timeBack = itT->getArrTime(this->
timePerKm);
252 if (timeBack < itT->getArrTime(this->
timePerKm) && (itT->getDay() == day || itT->isDaily())) {
253 timeBack = itT->getArrTime(this->
timePerKm);
263 if (timeBack.
getTime() > itT->getTime() && (itT->getDay() == (day + 1) || itT->isDaily())) {
264 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