SUMO - Simulation of Urban MObility
AGActivityGen.h
Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Main class that handles City, Activities and Trips
00010 /****************************************************************************/
00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00013 // activitygen module
00014 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00015 /****************************************************************************/
00016 //
00017 //   This file is part of SUMO.
00018 //   SUMO is free software: you can redistribute it and/or modify
00019 //   it under the terms of the GNU General Public License as published by
00020 //   the Free Software Foundation, either version 3 of the License, or
00021 //   (at your option) any later version.
00022 //
00023 /****************************************************************************/
00024 #ifndef AGACTIVITYGEN_H
00025 #define AGACTIVITYGEN_H
00026 
00027 
00028 // ===========================================================================
00029 // included modules
00030 // ===========================================================================
00031 #include <iostream>
00032 #include <list>
00033 #include <string>
00034 #include <router/RONet.h>
00035 #include "city/AGCity.h"
00036 #include "activities/AGTrip.h"
00037 #include "activities/AGActivities.h"
00038 #include "city/AGStreet.h"
00039 #include "city/AGPosition.h"
00040 
00041 
00042 // ===========================================================================
00043 // class definitions
00044 // ===========================================================================
00049 class AGActivityGen {
00050 public:
00051     //AGActivityGen() {};
00058     AGActivityGen(std::string input, std::string output, RONet* net) :
00059         inputFile(input),
00060         outputFile(output),
00061         net(net),
00062         //activities(),
00063         city(net) {};
00069     void importInfoCity();
00070 
00084     void makeActivityTrips(int days = 1, int beginTime = 0, int endTime = 0);
00085 
00086 protected:
00087     // @brief xml files: statistics on the city and generated routes
00088     std::string inputFile, outputFile;
00089     //Activities activities;
00090     // @brief city object containing all households and vehicles
00091     AGCity city;
00092     // @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)
00093     int durationInDays, beginTime, endTime;
00094     // @brief network of the city
00095     RONet* net;
00096 
00105     bool timeTripValidation(AGTrip);
00111     void generateOutputFile(std::list<AGTrip>& trips);
00117     void varDepTime(AGTrip& trip);
00118 };
00119 
00120 #endif
00121 
00122 /****************************************************************************/
00123 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines