SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Main class that manages activities taken in account and generates the 00010 // inhabitants' trip list. 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 AGACTIVITIES_H 00026 #define AGACTIVITIES_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 <list> 00039 #include "AGTrip.h" 00040 #include "../city/AGCity.h" 00041 #include "../city/AGBusLine.h" 00042 #include "../city/AGHousehold.h" 00043 00044 00045 // =========================================================================== 00046 // class definitions 00047 // =========================================================================== 00048 class AGActivities { 00049 public: 00050 AGActivities(AGCity* city, int days) : 00051 myCity(city), 00052 nbrDays(days) {}; 00053 void addTrip(AGTrip t, std::list<AGTrip> *tripSet); 00054 void addTrips(std::list<AGTrip> t, std::list<AGTrip> *tripSet); 00055 void generateActivityTrips(); 00056 00063 std::list<AGTrip> trips; 00064 00065 private: 00066 bool generateTrips(AGHousehold& hh); 00067 bool generateBusTraffic(AGBusLine bl); 00068 bool generateInOutTraffic(); 00069 bool generateRandomTraffic(); 00070 00074 std::string generateName(int i, std::string prefix); 00075 00076 AGCity* myCity; 00077 00078 int nbrDays; 00079 00080 }; 00081 00082 #endif 00083 00084 /****************************************************************************/