SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AGStreet.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Represents a SUMO edge and contains people and work densities
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
13 // activitygen module
14 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 #ifndef AGSTREET_H
25 #define AGSTREET_H
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 #include <string>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class ROEdge;
44 class AGPosition;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
57 class AGStreet {
58 public:
59  AGStreet(const ROEdge* edge, SUMOReal popD = 0, SUMOReal workD = 0);
60 
65  SUMOReal getLength() const;
66 
71  const std::string& getName() const;
72 
77  SUMOReal getPopulation() const;
78 
83  void setPopulation(const SUMOReal pop);
84 
90 
95  void setWorkplaceNumber(const SUMOReal work);
96 
100  void print() const;
101 
102 private:
103  friend class AGPosition;
104 
105  const ROEdge* edge;
108 };
109 
110 #endif
111 
112 /****************************************************************************/
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:63
A model of the street in the city.
Definition: AGStreet.h:57
SUMOReal getLength() const
Provides the length of this edge.
Definition: AGStreet.cpp:57
SUMOReal work
Definition: AGStreet.h:107
const std::string & getName() const
Provides the id of this edge.
Definition: AGStreet.cpp:63
SUMOReal getWorkplaceNumber() const
Provides the number of work places in this street.
Definition: AGStreet.cpp:81
A basic edge for routing applications.
Definition: ROEdge.h:67
SUMOReal pop
Definition: AGStreet.h:106
AGStreet(const ROEdge *edge, SUMOReal popD=0, SUMOReal workD=0)
Definition: AGStreet.cpp:43
const ROEdge * edge
Definition: AGStreet.h:105
void print() const
Prints a summary of the properties of this street to standard output.
Definition: AGStreet.cpp:51
SUMOReal getPopulation() const
Provides the number of persons living in this street.
Definition: AGStreet.cpp:69
void setWorkplaceNumber(const SUMOReal work)
Modifies the number of work places in this street.
Definition: AGStreet.cpp:87
#define SUMOReal
Definition: config.h:221
void setPopulation(const SUMOReal pop)
Modifies the number of persons living in this street.
Definition: AGStreet.cpp:75