/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2026 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.cpp16/// @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#include <config.h>2526#include "AGStreet.h"27#include "router/ROEdge.h"28#include <iostream>293031// ===========================================================================32// method definitions33// ===========================================================================34AGStreet::AGStreet(const std::string& id, RONode* from, RONode* to, int index, const int priority, const std::string& type, const std::string& routingType) :35ROEdge(id, from, to, index, priority, type, routingType),36myPopulation(0.), myNumWorkplaces(0.) {37}383940void41AGStreet::print() const {42std::cout << "- AGStreet: Name=" << getID() << " Length=" << getLength() << " pop=" << myPopulation << " work=" << myNumWorkplaces << std::endl;43}444546double47AGStreet::getPopulation() const {48return myPopulation;49}505152void53AGStreet::setPopulation(const double population) {54myPopulation = population;55}565758double59AGStreet::getWorkplaceNumber() const {60return myNumWorkplaces;61}626364void65AGStreet::setWorkplaceNumber(const double workPositions) {66myNumWorkplaces = workPositions;67}686970bool71AGStreet::allows(const SUMOVehicleClass vclass) const {72return (getPermissions() & vclass) == vclass;73}747576/****************************************************************************/777879