/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-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 AGBusLine.h16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @date July 201020///21// Bus line of the city: contains all the buses of this line22/****************************************************************************/23#pragma once24#include <config.h>2526#include <iostream>27#include <string>28#include <list>29#include "AGBus.h"30#include "AGPosition.h"31#include "AGDataAndStatistics.h"323334// ===========================================================================35// class definitions36// ===========================================================================37class AGBusLine {38public:39AGBusLine(std::string lineNr) :40lineNumber(lineNr) {};41void setMaxTripTime(int time);42void setBusNames();43int nbrBuses();44void locateStation(AGPosition pos);45void locateRevStation(AGPosition pos);46void generateBuses(int start, int stop, int rate);47void printBuses();4849std::list<AGPosition> stations;50std::list<AGPosition> revStations;51std::list<AGBus> buses;52std::list<AGBus> revBuses;5354private:55/**56* @return: a name for a new Bus. unique for the city.57*/58std::string createName();5960/**61* @param time: time of departure of the bus in one direction (current time)62* @return: time at which it will be ready for going in the opposite direction63*/64int getReady(int time);6566std::string lineNumber;67int maxTripTime;68int busNbr;69};707172