Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGStreet.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2010-2024 German Aerospace Center (DLR) and others.
4// activitygen module
5// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6// This program and the accompanying materials are made available under the
7// terms of the Eclipse Public License 2.0 which is available at
8// https://www.eclipse.org/legal/epl-2.0/
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License 2.0 are satisfied: GNU General Public License, version 2
12// or later which is available at
13// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15/****************************************************************************/
23// Represents a SUMO edge and contains people and work densities
24/****************************************************************************/
25#pragma once
26#include <config.h>
27
28#include <string>
31#include <router/ROEdge.h>
32
33
34// ===========================================================================
35// class declarations
36// ===========================================================================
37class AGPosition;
38
39
40// ===========================================================================
41// class definitions
42// ===========================================================================
50class AGStreet : public ROEdge {
51public:
53 public:
62 ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) {
63 return new AGStreet(name, from, to, getNextIndex(), priority);
64 }
65 };
66
67 AGStreet(const std::string& id, RONode* from, RONode* to, int index, const int priority);
68
73 double getPopulation() const;
74
79 void setPopulation(const double pop);
80
85 double getWorkplaceNumber() const;
86
91 void setWorkplaceNumber(const double work);
92
96 void print() const;
97
103 bool allows(const SUMOVehicleClass vclass) const;
104
105private:
108};
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
A location in the 2D plane freely positioned on a street.
Definition AGPosition.h:53
ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)
Builds an edge with the given name.
Definition AGStreet.h:62
A model of the street in the city.
Definition AGStreet.h:50
void setWorkplaceNumber(const double work)
Modifies the number of work places in this street.
Definition AGStreet.cpp:65
void print() const
Prints a summary of the properties of this street to standard output.
Definition AGStreet.cpp:41
double myPopulation
Definition AGStreet.h:106
double getPopulation() const
Provides the number of persons living in this street.
Definition AGStreet.cpp:47
void setPopulation(const double pop)
Modifies the number of persons living in this street.
Definition AGStreet.cpp:53
double getWorkplaceNumber() const
Provides the number of work places in this street.
Definition AGStreet.cpp:59
bool allows(const SUMOVehicleClass vclass) const
Returns whether the given vehicle class is allowed on this street.
Definition AGStreet.cpp:71
double myNumWorkplaces
Definition AGStreet.h:107
Interface for building instances of router-edges.
int getNextIndex()
Returns the index of the edge to built.
A basic edge for routing applications.
Definition ROEdge.h:70
Base class for nodes used by the router.
Definition RONode.h:43