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
AGDataAndStatistics.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Contains various data, statistical values and functions from input used
11
// by various objects
12
/****************************************************************************/
13
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
14
// Copyright (C) 2001-2013 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 AGDATAANDSTATISTICS_H
27
#define AGDATAANDSTATISTICS_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 <map>
41
#include "
AGSchool.h
"
42
#include "
AGPosition.h
"
43
44
45
// ===========================================================================
46
// class definitions
47
// ===========================================================================
48
class
AGDataAndStatistics
{
49
public
:
53
SUMOReal
speedTimePerKm
;
//number of seconds for one km
54
SUMOReal
carPreference
;
//prob. to choose the car (compared to the bus)
55
59
int
inhabitants
;
60
int
households
;
61
int
limitAgeChildren
;
62
int
limitAgeRetirement
;
63
int
limitEndAge
;
64
SUMOReal
carRate
;
65
SUMOReal
unemployement
;
66
SUMOReal
maxFootDistance
;
67
int
incomingTraffic
;
68
int
outgoingTraffic
;
69
SUMOReal
freeTimeActivityRate
;
70
SUMOReal
uniformRandomTrafficRate
;
71
SUMOReal
departureVariation
;
72
73
std::map<int, SUMOReal>
beginWorkHours
;
//<hour, probability> (number only used in term of PROPORTION: it should be normalized)
74
std::map<int, SUMOReal>
endWorkHours
;
//<hour, probability> (number only used in term of PROPORTION: it should be normalized)
75
std::map<int, AGPosition>
busStations
;
//<id, position>
76
//std::map<SchoolType, int> schoolCapacity;
77
std::map<int, SUMOReal>
population
;
//<bracket's end age, number> (number only used in term of PROPORTION: it should be normalized)
78
//std::map<int, SUMOReal> childrenAccompagniment; //<bracket's end age, probability>
83
std::map<int, SUMOReal>
incoming
;
84
std::map<int, SUMOReal>
outgoing
;
85
89
int
workPositions
;
90
SUMOReal
factorInhabitants
;
91
SUMOReal
factorWorkPositions
;
92
97
//probability of picking an old-people household (compared to working and have children adults)
98
SUMOReal
oldAgeHhProb
;
99
//probability of having a second adult (old in case of old householders) in the household.
100
SUMOReal
secondPersProb
;
101
//this s the mean number of children pro household (not old). This value is used in the Poisson-lay for determining the number of children in each family
102
SUMOReal
meanNbrChildren
;
103
107
//int childrenNbr;
108
//int oldPeopleNbr;
109
int
AdultNbr
;
110
int
householdsNbr
;
111
//households far from public transports
112
int
hhFarFromPT
;
113
114
static
AGDataAndStatistics
&
getDataAndStatistics
();
115
120
int
getRandom
(
int
n,
int
m);
128
int
getRandomPopDistributed
(
int
n,
int
m);
136
int
getPoissonsNumberOfChildren
(
SUMOReal
mean);
143
int
getPeopleOlderThan
(
int
age);
144
int
getPeopleYoungerThan
(
int
age);
145
SUMOReal
getPropYoungerThan
(
int
age);
151
void
consolidateStat
();
160
SUMOReal
getInverseExpRandomValue
(
SUMOReal
mean,
SUMOReal
maxVar);
166
int
getRandomCityGateByIncoming
();
167
int
getRandomCityGateByOutgoing
();
168
169
private
:
170
AGDataAndStatistics
() {}
171
179
SUMOReal
poisson
(
SUMOReal
mean,
int
occ);
183
int
factorial
(
int
n);
184
185
//function normalizing the map's probabilities: Sum(floats) = 1
186
void
normalizeMapProb
(std::map<int, SUMOReal>* myMap);
187
};
188
189
#endif
190
191
/****************************************************************************/
build
buildd
sumo-0.18~dfsg
src
activitygen
city
AGDataAndStatistics.h
Generated on Wed Oct 23 2013 01:15:07 for SUMO - Simulation of Urban MObility by
1.8.4