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