|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // Main class that manages activities taken in account and generates the 00008 // inhabitants' trip list. 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00012 // activitygen module 00013 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) 00014 /****************************************************************************/ 00015 // 00016 // This program is free software; you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation; either version 2 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef AGACTIVITIES_H 00023 #define AGACTIVITIES_H 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <list> 00036 #include "AGTrip.h" 00037 #include "../city/AGCity.h" 00038 #include "../city/AGBusLine.h" 00039 #include "../city/AGHousehold.h" 00040 00041 00042 // =========================================================================== 00043 // class definitions 00044 // =========================================================================== 00045 class AGActivities { 00046 public: 00047 AGActivities(AGCity* city, int days) : 00048 myCity(city), 00049 nbrDays(days) {}; 00050 void addTrip(AGTrip t, std::list<AGTrip> *tripSet); 00051 void addTrips(std::list<AGTrip> t, std::list<AGTrip> *tripSet); 00052 void generateActivityTrips(); 00053 00060 std::list<AGTrip> trips; 00061 00062 private: 00063 bool generateTrips(AGHousehold& hh); 00064 bool generateBusTraffic(AGBusLine bl); 00065 bool generateInOutTraffic(); 00066 bool generateRandomTraffic(); 00067 00071 std::string generateName(int i, std::string prefix); 00072 00073 AGCity* myCity; 00074 00075 int nbrDays; 00076 00077 }; 00078 00079 #endif 00080 00081 /****************************************************************************/