|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // Main class that handles City, Activities and Trips 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00011 // activitygen module 00012 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) 00013 /****************************************************************************/ 00014 // 00015 // This program is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation; either version 2 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef AGACTIVITYGEN_H 00022 #define AGACTIVITYGEN_H 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #include <iostream> 00029 #include <list> 00030 #include <string> 00031 #include <router/RONet.h> 00032 #include "city/AGCity.h" 00033 #include "activities/AGTrip.h" 00034 #include "activities/AGActivities.h" 00035 #include "city/AGStreet.h" 00036 #include "city/AGPosition.h" 00037 00038 00039 // =========================================================================== 00040 // class definitions 00041 // =========================================================================== 00046 class AGActivityGen { 00047 public: 00048 //AGActivityGen() {}; 00055 AGActivityGen(std::string input, std::string output, RONet* net) : 00056 inputFile(input), 00057 outputFile(output), 00058 net(net), 00059 //activities(), 00060 city(net) {}; 00066 void importInfoCity(); 00067 00081 void makeActivityTrips(int days=1, int beginTime=0, int endTime=0); 00082 00083 protected: 00084 // @brief xml files: statistics on the city and generated routes 00085 std::string inputFile, outputFile; 00086 //Activities activities; 00087 // @brief city object containing all households and vehicles 00088 AGCity city; 00089 // @brief time of beginning and ending of the simulation and the duration of the simulation in days (min 1 day (beginning and end in the same day) 00090 int durationInDays, beginTime, endTime; 00091 // @brief network of the city 00092 RONet* net; 00093 00102 bool timeTripValidation(AGTrip); 00108 void generateOutputFile(std::list<AGTrip>& trips); 00114 void varDepTime(AGTrip& trip); 00115 }; 00116 00117 #endif 00118 00119 /****************************************************************************/ 00120