/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGFreeTime.h16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @author Michael Behrisch20/// @date July 201021///22// Generates trips related to after-work activities23// like visiting the family or party.24/****************************************************************************/25#pragma once26#include <config.h>2728#include <activitygen/city/AGHousehold.h>29#include "AGActivity.h"303132// ===========================================================================33// class definitions34// ===========================================================================35class AGFreeTime : public AGActivity {36public:37AGFreeTime(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips, int days = 1) :38AGActivity(hh, das, prevTrips, 2),39freqOut(das->freeTimeActivityRate),40nbrDays(days) {};4142/**43* @Overwrite44*/45bool generateTrips();4647/**48* returns the type of trip that will be done on this household49* there is also the case: no free time trip50* 0 = non51* 1 = during the day52* 2 = in the evening53* 4 = during the night54* (combinations using '+' are available for possibleTypeOfTrip())55*/56int possibleTypeOfTrip();57int decideTypeOfTrip();58/**59* The different type of trips that are available:60* one function is called among all the following61*/62bool typeFromHomeDay(int day);63bool typeFromHomeEvening(int day);64bool typeFromHomeNight(int day);6566/**67* returns the moment when everybody is back home and ready68* to do some thing else using everyday trips69*/70int whenBackHome();71/**72* moment when everybody is back home using all trips applicable for the given day73* if no car is used: return 074*/75int whenBackHomeThisDay(int day);76/**77* moment when the first person takes the car to go somewhere78* id no car is used: return 2400 (midnight at the end of the given day)79*/80int whenBeginActivityNextDay(int day);8182private:83/**84* frequency of going out or see family is assumed to be once a week (in mean)85*/86double freqOut;87/**88* number of days for the simulation89* households are likely to go out some days but not others90*/91int nbrDays;92/**93* time ready to do something else94* everybody is back home95*/96int tReady = 0;97/**98* possible type of trips for this household99*/100int possibleType = 0;101102static const int DAY;// = 1;103static const int EVENING;// = 2;104static const int NIGHT;// = 4;105106static const int TB_DAY;// = 800;107static const int TE_DAY;// = 1800;108static const int TB_EVENING;// = 1900;109static const int TE_EVENING;// = 2400;110static const int TB_NIGHT;// = 2300;111static const int TE_NIGHT;// = 500;112113};114115116