SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AGCity.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // City class that contains all other objects of the city: in particular
10 // streets, households, bus lines, work positions and schools
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
14 // activitygen module
15 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
16 /****************************************************************************/
17 //
18 // This file is part of SUMO.
19 // SUMO is free software: you can redistribute it and/or modify
20 // it under the terms of the GNU General Public License as published by
21 // the Free Software Foundation, either version 3 of the License, or
22 // (at your option) any later version.
23 //
24 /****************************************************************************/
25 #ifndef AGCITY_H
26 #define AGCITY_H
27 
28 
29 // ===========================================================================
30 // included modules
31 // ===========================================================================
32 #ifdef _MSC_VER
33 #include <windows_config.h>
34 #else
35 #include <config.h>
36 #endif
37 
38 #include <iostream>
39 #include <vector>
40 #include <list>
41 #include <router/RONet.h>
42 #include "AGPosition.h"
43 #include "AGDataAndStatistics.h"
44 #include "AGSchool.h"
45 #include "AGBusLine.h"
46 #include "AGWorkPosition.h"
47 #include "AGHousehold.h"
48 
49 
50 // ===========================================================================
51 // class declarations
52 // ===========================================================================
53 class AGHousehold;
54 
55 
56 // ===========================================================================
57 // class definitions
58 // ===========================================================================
59 class AGCity {
60 public:
62  statData(AGDataAndStatistics::getDataAndStatistics()),
63  net(net),
64  streetsCompleted(false) {};
65 
69  void completeStreets();
70  void generateWorkPositions();
71  void completeBusLines();
72  //void generateSchools();
73  void generatePopulation();
74  void schoolAllocation();
75  void workAllocation();
76  void carAllocation();
77 
81  const AGStreet& getStreet(const std::string& edge);
85  const AGStreet& getRandomStreet();
86 
88  std::vector<AGStreet> streets;
89  std::vector<AGWorkPosition> workPositions;
90  std::list<AGSchool> schools;
91  std::list<AGBusLine> busLines;
92  std::list<AGHousehold> households;
93  std::vector<AGPosition> cityGates;
94  std::list<AGAdult> peopleIncoming;
95 
96 private:
101  void generateOutgoingWP();
106 
107  // @brief network of the city
114 
115  int nbrCars;
116 
117 private:
119  AGCity& operator=(const AGCity&);
120 };
121 
122 #endif
123 
124 /****************************************************************************/