Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGCity.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2010-2024 German Aerospace Center (DLR) and others.
4// activitygen module
5// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6// This program and the accompanying materials are made available under the
7// terms of the Eclipse Public License 2.0 which is available at
8// https://www.eclipse.org/legal/epl-2.0/
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License 2.0 are satisfied: GNU General Public License, version 2
12// or later which is available at
13// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15/****************************************************************************/
23// City class that contains all other objects of the city: in particular
24// streets, households, bus lines, work positions and schools
25/****************************************************************************/
26#pragma once
27#include <config.h>
28
29#include <iostream>
30#include <vector>
31#include <list>
32#include "AGPosition.h"
33#include "AGDataAndStatistics.h"
34#include "AGSchool.h"
35#include "AGBusLine.h"
36#include "AGWorkPosition.h"
37#include "AGHousehold.h"
38
39
40// ===========================================================================
41// class declarations
42// ===========================================================================
43class AGHousehold;
44class RONet;
45
46
47// ===========================================================================
48// class definitions
49// ===========================================================================
50class AGCity {
51public:
53 statData(AGDataAndStatistics::getDataAndStatistics()),
54 net(net),
55 streetsCompleted(false) {};
56
60 void completeStreets();
62 void completeBusLines();
63 //void generateSchools();
64 void generatePopulation();
65 void schoolAllocation();
66 void workAllocation();
67 void carAllocation();
68
72 const AGStreet& getStreet(const std::string& edge);
77
79 std::vector<AGStreet*> streets;
80 std::vector<AGStreet*> passengerStreets;
81 std::vector<AGWorkPosition> workPositions;
82 std::list<AGSchool> schools;
83 std::list<AGBusLine> busLines;
84 std::list<AGHousehold> households;
85 std::vector<AGPosition> cityGates;
86 std::list<AGAdult> peopleIncoming;
87
88private:
93 void generateOutgoingWP();
98
99 // @brief network of the city
106
108
109private:
112};
std::vector< AGStreet * > streets
Definition AGCity.h:79
bool streetsCompleted
Definition AGCity.h:105
void workAllocation()
Definition AGCity.cpp:278
std::vector< AGStreet * > passengerStreets
Definition AGCity.h:80
std::list< AGHousehold > households
Definition AGCity.h:84
void completeBusLines()
Definition AGCity.cpp:156
std::vector< AGPosition > cityGates
Definition AGCity.h:85
void carAllocation()
Definition AGCity.cpp:344
std::list< AGSchool > schools
Definition AGCity.h:82
RONet * net
Definition AGCity.h:100
void generateWorkPositions()
Definition AGCity.cpp:102
void generateOutgoingWP()
Definition AGCity.cpp:127
AGDataAndStatistics & statData
Definition AGCity.h:78
std::vector< AGWorkPosition > workPositions
Definition AGCity.h:81
void completeStreets()
Definition AGCity.cpp:50
AGCity(RONet *net)
Definition AGCity.h:52
int nbrCars
Definition AGCity.h:107
std::list< AGBusLine > busLines
Definition AGCity.h:83
AGCity & operator=(const AGCity &)
invalidated assignment operator
void generateIncomingPopulation()
Definition AGCity.cpp:249
const AGStreet & getStreet(const std::string &edge)
Definition AGCity.cpp:388
const AGStreet & getRandomStreet()
Definition AGCity.cpp:413
void schoolAllocation()
Definition AGCity.cpp:257
AGSchool closestSchoolTo(AGPosition pos)
void generatePopulation()
Definition AGCity.cpp:165
std::list< AGAdult > peopleIncoming
Definition AGCity.h:86
A location in the 2D plane freely positioned on a street.
Definition AGPosition.h:53
A model of the street in the city.
Definition AGStreet.h:50
The router's network representation.
Definition RONet.h:63