SUMO - Simulation of Urban MObility
AGFreeTime.h
Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Generates trips related to after-work activities
00010 // like visiting the family or party.
00011 /****************************************************************************/
00012 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00013 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00014 // activitygen module
00015 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00016 /****************************************************************************/
00017 //
00018 //   This file is part of SUMO.
00019 //   SUMO is free software: you can redistribute it and/or modify
00020 //   it under the terms of the GNU General Public License as published by
00021 //   the Free Software Foundation, either version 3 of the License, or
00022 //   (at your option) any later version.
00023 //
00024 /****************************************************************************/
00025 #ifndef AGFREETIME_H
00026 #define AGFREETIME_H
00027 
00028 
00029 // ===========================================================================
00030 // included modules
00031 // ===========================================================================
00032 #ifdef _MSC_VER
00033 #include <windows_config.h>
00034 #else
00035 #include <config.h>
00036 #endif
00037 
00038 #include "../city/AGHousehold.h"
00039 #include "AGActivity.h"
00040 
00041 
00042 // ===========================================================================
00043 // class definitions
00044 // ===========================================================================
00045 class AGFreeTime : public AGActivity {
00046 public:
00047     AGFreeTime(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
00048         AGActivity(hh, das, prevTrips, 2),
00049         freqOut(das->freeTimeActivityRate),
00050         nbrDays(1) {};
00051     AGFreeTime(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips, int days) :
00052         AGActivity(hh, das, prevTrips, 2),
00053         freqOut(das->freeTimeActivityRate),
00054         nbrDays(days) {};
00055 
00059     bool generateTrips();
00060 
00070     int possibleTypeOfTrip();
00071     int decideTypeOfTrip();
00076     bool typeFromHomeDay(int day);
00077     bool typeFromHomeEvening(int day);
00078     bool typeFromHomeNight(int day);
00079 
00084     int whenBackHome();
00089     int whenBackHomeThisDay(int day);
00094     int whenBeginActivityNextDay(int day);
00095 
00096 private:
00101     int nbrDays;
00106     int tReady;
00110     int possibleType;
00114     SUMOReal freqOut;
00115 
00116     static const int DAY;// = 1;
00117     static const int EVENING;// = 2;
00118     static const int NIGHT;// = 4;
00119 
00120     static const int TB_DAY;// = 800;
00121     static const int TE_DAY;// = 1800;
00122     static const int TB_EVENING;// = 1900;
00123     static const int TE_EVENING;// = 2400;
00124     static const int TB_NIGHT;// = 2300;
00125     static const int TE_NIGHT;// = 500;
00126 
00127 };
00128 
00129 #endif
00130 
00131 /****************************************************************************/
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines