Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGFreeTime.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2010-2024 German Aerospace Center (DLR) and others.
4// activitygen module
5// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6// This program and the accompanying materials are made available under the
7// terms of the Eclipse Public License 2.0 which is available at
8// https://www.eclipse.org/legal/epl-2.0/
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License 2.0 are satisfied: GNU General Public License, version 2
12// or later which is available at
13// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15/****************************************************************************/
23// Generates trips related to after-work activities
24// like visiting the family or party.
25/****************************************************************************/
26#pragma once
27#include <config.h>
28
30#include "AGActivity.h"
31
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36class AGFreeTime : public AGActivity {
37public:
38 AGFreeTime(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
39 AGActivity(hh, das, prevTrips, 2),
40 freqOut(das->freeTimeActivityRate),
41 nbrDays(1) {};
42 AGFreeTime(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips, int days) :
43 AGActivity(hh, das, prevTrips, 2),
44 freqOut(das->freeTimeActivityRate),
45 nbrDays(days) {};
46
50 bool generateTrips();
51
62 int decideTypeOfTrip();
67 bool typeFromHomeDay(int day);
68 bool typeFromHomeEvening(int day);
69 bool typeFromHomeNight(int day);
70
75 int whenBackHome();
80 int whenBackHomeThisDay(int day);
85 int whenBeginActivityNextDay(int day);
86
87private:
91 double freqOut;
106
107 static const int DAY;// = 1;
108 static const int EVENING;// = 2;
109 static const int NIGHT;// = 4;
110
111 static const int TB_DAY;// = 800;
112 static const int TE_DAY;// = 1800;
113 static const int TB_EVENING;// = 1900;
114 static const int TE_EVENING;// = 2400;
115 static const int TB_NIGHT;// = 2300;
116 static const int TE_NIGHT;// = 500;
117
118};
static const int TB_NIGHT
Definition AGFreeTime.h:115
AGFreeTime(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips, int days)
Definition AGFreeTime.h:42
int whenBackHome()
double freqOut
Definition AGFreeTime.h:91
int decideTypeOfTrip()
static const int DAY
Definition AGFreeTime.h:107
bool typeFromHomeDay(int day)
static const int TB_EVENING
Definition AGFreeTime.h:113
bool typeFromHomeEvening(int day)
static const int NIGHT
Definition AGFreeTime.h:109
bool generateTrips()
static const int EVENING
Definition AGFreeTime.h:108
int whenBackHomeThisDay(int day)
int possibleType
Definition AGFreeTime.h:105
static const int TE_EVENING
Definition AGFreeTime.h:114
int whenBeginActivityNextDay(int day)
static const int TE_NIGHT
Definition AGFreeTime.h:116
static const int TE_DAY
Definition AGFreeTime.h:112
int possibleTypeOfTrip()
bool typeFromHomeNight(int day)
static const int TB_DAY
Definition AGFreeTime.h:111
AGFreeTime(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips)
Definition AGFreeTime.h:38