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
AGStreet.cpp
Go to the documentation of this file.
1
/****************************************************************************/
10
// Represents a SUMO edge and contains people and work densities
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2010-2014 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
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include "
AGStreet.h
"
37
#include "
router/ROEdge.h
"
38
#include <iostream>
39
40
41
// ===========================================================================
42
// method definitions
43
// ===========================================================================
44
AGStreet::AGStreet
(
const
ROEdge
* edge,
SUMOReal
popDensity,
SUMOReal
workDensity) :
45
edge(edge) {
46
pop
= popDensity * edge->
getLength
();
47
work
= workDensity * edge->
getLength
();
48
}
49
50
51
void
52
AGStreet::print
()
const
{
53
std::cout <<
"- AGStreet: Name="
<<
edge
->
getID
() <<
" Length="
<<
edge
->
getLength
() <<
" pop="
<<
pop
<<
" work="
<<
work
<< std::endl;
54
}
55
56
57
SUMOReal
58
AGStreet::getLength
()
const
{
59
return
edge
->
getLength
();
60
}
61
62
63
const
std::string&
64
AGStreet::getName
()
const
{
65
return
edge
->
getID
();
66
}
67
68
69
SUMOReal
70
AGStreet::getPopulation
()
const
{
71
return
pop
;
72
}
73
74
75
void
76
AGStreet::setPopulation
(
const
SUMOReal
population) {
77
pop
= population;
78
}
79
80
81
SUMOReal
82
AGStreet::getWorkplaceNumber
()
const
{
83
return
work
;
84
}
85
86
87
void
88
AGStreet::setWorkplaceNumber
(
const
SUMOReal
workPositions) {
89
work
= workPositions;
90
}
91
92
/****************************************************************************/
tmp
buildd
sumo-0.21.0+dfsg
src
activitygen
city
AGStreet.cpp
Generated on Thu Nov 20 2014 19:49:52 for SUMO - Simulation of Urban MObility by
1.8.1.2