Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGBusLine.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-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/****************************************************************************/
22// Bus line of the city: contains all the buses of this line
23/****************************************************************************/
24#pragma once
25#include <config.h>
26
27#include <iostream>
28#include <string>
29#include <list>
30#include "AGBus.h"
31#include "AGPosition.h"
32#include "AGDataAndStatistics.h"
33
34
35// ===========================================================================
36// class definitions
37// ===========================================================================
38class AGBusLine {
39public:
40 AGBusLine(std::string lineNr) :
41 lineNumber(lineNr) {};
42 void setMaxTripTime(int time);
43 void setBusNames();
44 int nbrBuses();
45 void locateStation(AGPosition pos);
47 void generateBuses(int start, int stop, int rate);
48 void printBuses();
49
50 std::list<AGPosition> stations;
51 std::list<AGPosition> revStations;
52 std::list<AGBus> buses;
53 std::list<AGBus> revBuses;
54
55private:
59 std::string createName();
60
65 int getReady(int time);
66
67 std::string lineNumber;
69 int busNbr;
70};
void locateRevStation(AGPosition pos)
int busNbr
Definition AGBusLine.h:69
void locateStation(AGPosition pos)
int maxTripTime
Definition AGBusLine.h:68
AGBusLine(std::string lineNr)
Definition AGBusLine.h:40
int nbrBuses()
void printBuses()
std::list< AGPosition > stations
Definition AGBusLine.h:50
int getReady(int time)
std::string lineNumber
Definition AGBusLine.h:67
std::list< AGBus > buses
Definition AGBusLine.h:52
void generateBuses(int start, int stop, int rate)
void setBusNames()
Definition AGBusLine.cpp:51
std::string createName()
std::list< AGBus > revBuses
Definition AGBusLine.h:53
std::list< AGPosition > revStations
Definition AGBusLine.h:51
void setMaxTripTime(int time)
Definition AGBusLine.cpp:46
A location in the 2D plane freely positioned on a street.
Definition AGPosition.h:53