Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGBusLine Class Reference

#include <AGBusLine.h>

Public Member Functions

 AGBusLine (std::string lineNr)
 
void generateBuses (int start, int stop, int rate)
 
void locateRevStation (AGPosition pos)
 
void locateStation (AGPosition pos)
 
int nbrBuses ()
 
void printBuses ()
 
void setBusNames ()
 
void setMaxTripTime (int time)
 

Data Fields

std::list< AGBusbuses
 
std::list< AGBusrevBuses
 
std::list< AGPositionrevStations
 
std::list< AGPositionstations
 

Private Member Functions

std::string createName ()
 
int getReady (int time)
 

Private Attributes

int busNbr
 
std::string lineNumber
 
int maxTripTime
 

Detailed Description

Definition at line 38 of file AGBusLine.h.

Constructor & Destructor Documentation

◆ AGBusLine()

AGBusLine::AGBusLine ( std::string  lineNr)
inline

Definition at line 40 of file AGBusLine.h.

Member Function Documentation

◆ createName()

std::string AGBusLine::createName ( )
private
Returns
: a name for a new Bus. unique for the city.

Definition at line 110 of file AGBusLine.cpp.

References busNbr, and lineNumber.

Referenced by setBusNames().

Here is the caller graph for this function:

◆ generateBuses()

void AGBusLine::generateBuses ( int  start,
int  stop,
int  rate 
)

Definition at line 141 of file AGBusLine.cpp.

References buses, and revBuses.

Referenced by AGActivityGenHandler::parseFrequency().

Here is the caller graph for this function:

◆ getReady()

int AGBusLine::getReady ( int  time)
private
Parameters
timetime of departure of the bus in one direction (current time)
Returns
: time at which it will be ready for going in the opposite direction

Definition at line 118 of file AGBusLine.cpp.

References AGTime::addMinutes(), AGTime::addSeconds(), AGTime::getTime(), maxTripTime, and PAUSE_TIME.

Referenced by setBusNames().

Here is the caller graph for this function:

◆ locateRevStation()

void AGBusLine::locateRevStation ( AGPosition  pos)

Definition at line 136 of file AGBusLine.cpp.

References revStations.

Referenced by AGActivityGenHandler::parseStation().

Here is the caller graph for this function:

◆ locateStation()

void AGBusLine::locateStation ( AGPosition  pos)

Definition at line 131 of file AGBusLine.cpp.

References stations.

Referenced by AGActivityGenHandler::parseStation().

Here is the caller graph for this function:

◆ nbrBuses()

int AGBusLine::nbrBuses ( )

Definition at line 126 of file AGBusLine.cpp.

References buses.

◆ printBuses()

void AGBusLine::printBuses ( )

Definition at line 152 of file AGBusLine.cpp.

References buses, lineNumber, and revBuses.

◆ setBusNames()

void AGBusLine::setBusNames ( )

Definition at line 51 of file AGBusLine.cpp.

References buses, busNbr, createName(), getReady(), and revBuses.

◆ setMaxTripTime()

void AGBusLine::setMaxTripTime ( int  time)

Definition at line 46 of file AGBusLine.cpp.

References maxTripTime.

Referenced by AGActivityGenHandler::parseBusLine().

Here is the caller graph for this function:

Field Documentation

◆ buses

std::list<AGBus> AGBusLine::buses

◆ busNbr

int AGBusLine::busNbr
private

Definition at line 69 of file AGBusLine.h.

Referenced by createName(), and setBusNames().

◆ lineNumber

std::string AGBusLine::lineNumber
private

Definition at line 67 of file AGBusLine.h.

Referenced by createName(), and printBuses().

◆ maxTripTime

int AGBusLine::maxTripTime
private

Definition at line 68 of file AGBusLine.h.

Referenced by getReady(), and setMaxTripTime().

◆ revBuses

std::list<AGBus> AGBusLine::revBuses

◆ revStations

std::list<AGPosition> AGBusLine::revStations

Definition at line 51 of file AGBusLine.h.

Referenced by AGActivities::generateBusTraffic(), and locateRevStation().

◆ stations

std::list<AGPosition> AGBusLine::stations

Definition at line 50 of file AGBusLine.h.

Referenced by AGActivities::generateBusTraffic(), and locateStation().


The documentation for this class was generated from the following files: