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, int days = 1) :
39 AGActivity(hh, das, prevTrips, 2),
40 freqOut(das->freeTimeActivityRate),
41 nbrDays(days) {};
42
46 bool generateTrips();
47
58 int decideTypeOfTrip();
63 bool typeFromHomeDay(int day);
64 bool typeFromHomeEvening(int day);
65 bool typeFromHomeNight(int day);
66
71 int whenBackHome();
76 int whenBackHomeThisDay(int day);
81 int whenBeginActivityNextDay(int day);
82
83private:
87 double freqOut;
97 int tReady = 0;
102
103 static const int DAY;// = 1;
104 static const int EVENING;// = 2;
105 static const int NIGHT;// = 4;
106
107 static const int TB_DAY;// = 800;
108 static const int TE_DAY;// = 1800;
109 static const int TB_EVENING;// = 1900;
110 static const int TE_EVENING;// = 2400;
111 static const int TB_NIGHT;// = 2300;
112 static const int TE_NIGHT;// = 500;
113
114};
static const int TB_NIGHT
Definition AGFreeTime.h:111
int whenBackHome()
double freqOut
Definition AGFreeTime.h:87
int decideTypeOfTrip()
static const int DAY
Definition AGFreeTime.h:103
bool typeFromHomeDay(int day)
static const int TB_EVENING
Definition AGFreeTime.h:109
bool typeFromHomeEvening(int day)
static const int NIGHT
Definition AGFreeTime.h:105
bool generateTrips()
static const int EVENING
Definition AGFreeTime.h:104
int whenBackHomeThisDay(int day)
int possibleType
Definition AGFreeTime.h:101
static const int TE_EVENING
Definition AGFreeTime.h:110
int whenBeginActivityNextDay(int day)
static const int TE_NIGHT
Definition AGFreeTime.h:112
static const int TE_DAY
Definition AGFreeTime.h:108
int possibleTypeOfTrip()
bool typeFromHomeNight(int day)
AGFreeTime(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips, int days=1)
Definition AGFreeTime.h:38
static const int TB_DAY
Definition AGFreeTime.h:107