SUMO - Simulation of Urban MObility
AGStreet.h
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 #ifndef AGSTREET_H
26 #define AGSTREET_H
27 
28 
29 // ===========================================================================
30 // included modules
31 // ===========================================================================
32 #ifdef _MSC_VER
33 #include <windows_config.h>
34 #else
35 #include <config.h>
36 #endif
37 
38 #include <string>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class ROEdge;
45 class AGPosition;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
58 class AGStreet {
59 public:
60  AGStreet(const ROEdge* edge, SUMOReal popD = 0, SUMOReal workD = 0);
61 
66  SUMOReal getLength() const;
67 
72  const std::string& getName() const;
73 
78  SUMOReal getPopulation() const;
79 
84  void setPopulation(const SUMOReal pop);
85 
91 
96  void setWorkplaceNumber(const SUMOReal work);
97 
101  void print() const;
102 
103 private:
104  friend class AGPosition;
105 
106  const ROEdge* edge;
109 };
110 
111 #endif
112 
113 /****************************************************************************/
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:58
SUMOReal getLength() const
Provides the length of this edge.
Definition: AGStreet.cpp:58
SUMOReal work
Definition: AGStreet.h:108
const std::string & getName() const
Provides the id of this edge.
Definition: AGStreet.cpp:64
SUMOReal getWorkplaceNumber() const
Provides the number of work places in this street.
Definition: AGStreet.cpp:82
A basic edge for routing applications.
Definition: ROEdge.h:69
SUMOReal pop
Definition: AGStreet.h:107
AGStreet(const ROEdge *edge, SUMOReal popD=0, SUMOReal workD=0)
Definition: AGStreet.cpp:44
const ROEdge * edge
Definition: AGStreet.h:106
void print() const
Prints a summary of the properties of this street to standard output.
Definition: AGStreet.cpp:52
SUMOReal getPopulation() const
Provides the number of persons living in this street.
Definition: AGStreet.cpp:70
void setWorkplaceNumber(const SUMOReal work)
Modifies the number of work places in this street.
Definition: AGStreet.cpp:88
#define SUMOReal
Definition: config.h:215
void setPopulation(const SUMOReal pop)
Modifies the number of persons living in this street.
Definition: AGStreet.cpp:76