/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGStreet.h16/// @author Piotr Woznica17/// @author Walter Bamberger18/// @author Daniel Krajzewicz19/// @author Michael Behrisch20/// @date July 201021///22// Represents a SUMO edge and contains people and work densities23/****************************************************************************/24#pragma once25#include <config.h>2627#include <string>28#include <utils/common/SUMOVehicleClass.h>29#include <router/ROAbstractEdgeBuilder.h>30#include <router/ROEdge.h>313233// ===========================================================================34// class declarations35// ===========================================================================36class AGPosition;373839// ===========================================================================40// class definitions41// ===========================================================================42/**43* @class AGStreet44* @brief A model of the street in the city.45*46* AGStreet represents a street in the city. It contains all model relevant47* properties and is associated with a ROEdge of the routing network.48*/49class AGStreet : public ROEdge {50public:51class Builder : public ROAbstractEdgeBuilder {52public:53/** @brief Builds an edge with the given name54*55* @param[in] name The name of the edge56* @param[in] from The node the edge begins at57* @param[in] to The node the edge ends at58* @param[in] priority The edge priority (road class)59* @return A proper instance of the named edge60*/61ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority, const std::string& type) {62return new AGStreet(name, from, to, getNextIndex(), priority, type);63}64};6566AGStreet(const std::string& id, RONode* from, RONode* to, int index, const int priority, const std::string& type);6768/** @brief Provides the number of persons living in this street.69*70* @return the number of inhabitants71*/72double getPopulation() const;7374/** @brief Modifies the number of persons living in this street.75*76* @param[in] pop the new number of inhabitants77*/78void setPopulation(const double pop);7980/** @brief Provides the number of work places in this street.81*82* @return the number of work places83*/84double getWorkplaceNumber() const;8586/** @brief Modifies the number of work places in this street.87*88* @param[in] work the new number of work places89*/90void setWorkplaceNumber(const double work);9192/** @brief Prints a summary of the properties of this street to standard93* output.94*/95void print() const;9697/** @brief Returns whether the given vehicle class is allowed on this street.98*99* @param[in] vclass the class (passenger or bus) in question100* @return whether it is allowed on any of the lanes101*/102bool allows(const SUMOVehicleClass vclass) const;103104private:105double myPopulation;106double myNumWorkplaces;107};108109110