Eclipse SUMO - Simulation of Urban MObility
AGTrip Class Reference

#include <AGTrip.h>

Collaboration diagram for AGTrip:
[legend]

Public Member Functions

void addLayOver (AGPosition by)
 
void addLayOver (AGTrip &trip)
 
void addLayOverWithoutDestination (AGTrip &trip)
 
 AGTrip (AGPosition from, AGPosition to, AGBus b, int at)
 
 AGTrip (AGPosition from, AGPosition to, AGCar c, int at)
 
 AGTrip (AGPosition from, AGPosition to, int at)
 
 AGTrip (AGPosition from, AGPosition to, std::string v, int at)
 
 AGTrip (AGPosition from, AGPosition to, std::string v, int at, int day)
 
int estimateDepTime (int arrTime, double secPerKm) const
 
AGPosition getArr () const
 
int getArrTime (double secPerKm) const
 
int getDay () const
 
AGPosition getDep () const
 
const std::list< AGPosition > * getPassed () const
 
int getRideBackArrTime (double secPerKm) const
 
int getTime () const
 
int getTimeTrip (double secPerKm) const
 
const std::string & getType () const
 
const std::string & getVehicleName () const
 
bool isDaily () const
 
bool operator< (const AGTrip &trip) const
 
void print () const
 
void setArr (AGPosition arrival)
 
void setDay (int day)
 
void setDep (AGPosition departure)
 
void setDepTime (int time)
 
void setType (std::string type)
 
void setVehicleName (std::string name)
 

Private Attributes

int myDay
 
int myDepTime
 
AGPosition myFrom
 
std::list< AGPositionmyPassBy
 
AGPosition myTo
 
std::string myType
 
std::string myVehicle
 

Detailed Description

Definition at line 38 of file AGTrip.h.

Constructor & Destructor Documentation

◆ AGTrip() [1/5]

AGTrip::AGTrip ( AGPosition  from,
AGPosition  to,
int  at 
)
inline

Definition at line 40 of file AGTrip.h.

◆ AGTrip() [2/5]

AGTrip::AGTrip ( AGPosition  from,
AGPosition  to,
AGCar  c,
int  at 
)
inline

Definition at line 46 of file AGTrip.h.

◆ AGTrip() [3/5]

AGTrip::AGTrip ( AGPosition  from,
AGPosition  to,
AGBus  b,
int  at 
)
inline

Definition at line 53 of file AGTrip.h.

◆ AGTrip() [4/5]

AGTrip::AGTrip ( AGPosition  from,
AGPosition  to,
std::string  v,
int  at 
)
inline

Definition at line 60 of file AGTrip.h.

◆ AGTrip() [5/5]

AGTrip::AGTrip ( AGPosition  from,
AGPosition  to,
std::string  v,
int  at,
int  day 
)
inline

Definition at line 67 of file AGTrip.h.

Member Function Documentation

◆ addLayOver() [1/2]

void AGTrip::addLayOver ( AGPosition  by)

Definition at line 59 of file AGTrip.cpp.

References myPassBy.

Referenced by AGActivities::generateBusTraffic().

Here is the caller graph for this function:

◆ addLayOver() [2/2]

void AGTrip::addLayOver ( AGTrip trip)

Definition at line 64 of file AGTrip.cpp.

References myPassBy, and myTo.

◆ addLayOverWithoutDestination()

void AGTrip::addLayOverWithoutDestination ( AGTrip trip)

Definition at line 73 of file AGTrip.cpp.

References myPassBy.

Referenced by AGActivityGen::makeActivityTrips().

Here is the caller graph for this function:

◆ estimateDepTime()

int AGTrip::estimateDepTime ( int  arrTime,
double  secPerKm 
) const

estimate the departure time needed for a given arrival time and a speed in seconds per kilometer

Definition at line 145 of file AGTrip.cpp.

References getTimeTrip().

Referenced by AGActivities::generateInOutTraffic().

Here is the caller graph for this function:

◆ getArr()

AGPosition AGTrip::getArr ( ) const

Definition at line 101 of file AGTrip.cpp.

References myTo.

Referenced by AGActivityTripWriter::addTrip(), and AGActivities::generateBusTraffic().

Here is the caller graph for this function:

◆ getArrTime()

int AGTrip::getArrTime ( double  secPerKm) const

returns the estimated arrival time given the time to make one kilometer

Definition at line 130 of file AGTrip.cpp.

References getTimeTrip(), and myDepTime.

Referenced by getRideBackArrTime().

Here is the caller graph for this function:

◆ getDay()

int AGTrip::getDay ( ) const

Definition at line 175 of file AGTrip.cpp.

References myDay.

Referenced by AGActivityTripWriter::addTrip(), operator<(), AGActivityGen::timeTripValidation(), and AGActivityGen::varDepTime().

Here is the caller graph for this function:

◆ getDep()

AGPosition AGTrip::getDep ( ) const

Definition at line 96 of file AGTrip.cpp.

References myFrom.

Referenced by AGActivityTripWriter::addTrip(), and AGActivities::generateBusTraffic().

Here is the caller graph for this function:

◆ getPassed()

const std::list< AGPosition > * AGTrip::getPassed ( ) const

Definition at line 81 of file AGTrip.cpp.

References myPassBy.

Referenced by AGActivityTripWriter::addTrip().

Here is the caller graph for this function:

◆ getRideBackArrTime()

int AGTrip::getRideBackArrTime ( double  secPerKm) const

returns the time regarding the departure time going through the different points and coming back to the initial position given the time to make one kilometer

Definition at line 135 of file AGTrip.cpp.

References AGPosition::distanceTo(), getArrTime(), myFrom, and myTo.

◆ getTime()

int AGTrip::getTime ( ) const

Definition at line 106 of file AGTrip.cpp.

References myDepTime.

Referenced by AGActivityTripWriter::addTrip(), AGActivities::generateInOutTraffic(), operator<(), AGActivityGen::timeTripValidation(), and AGActivityGen::varDepTime().

Here is the caller graph for this function:

◆ getTimeTrip()

int AGTrip::getTimeTrip ( double  secPerKm) const

gives the time in seconds for the trip given a speed in seconds per kilometer (in city, not car speed but time needed to make a distance in the city)

Definition at line 111 of file AGTrip.cpp.

References AGPosition::distanceTo(), myFrom, myPassBy, and myTo.

Referenced by estimateDepTime(), and getArrTime().

Here is the caller graph for this function:

◆ getType()

const std::string & AGTrip::getType ( ) const

Definition at line 86 of file AGTrip.cpp.

References myType.

Referenced by AGActivityTripWriter::addTrip(), and AGActivityGen::varDepTime().

Here is the caller graph for this function:

◆ getVehicleName()

const std::string & AGTrip::getVehicleName ( ) const

Definition at line 150 of file AGTrip.cpp.

References myVehicle.

Referenced by AGActivityTripWriter::addTrip(), and AGActivityGen::makeActivityTrips().

Here is the caller graph for this function:

◆ isDaily()

bool AGTrip::isDaily ( ) const

returns whether this is a daily trip or a one day trip

Definition at line 170 of file AGTrip.cpp.

References myDay.

◆ operator<()

bool AGTrip::operator< ( const AGTrip trip) const

Definition at line 34 of file AGTrip.cpp.

References getDay(), and getTime().

◆ print()

void AGTrip::print ( ) const

Definition at line 47 of file AGTrip.cpp.

References myDay, myDepTime, myFrom, myTo, myType, myVehicle, and AGPosition::print().

◆ setArr()

void AGTrip::setArr ( AGPosition  arrival)

Definition at line 160 of file AGTrip.cpp.

References AGPosition::getPosition(), AGPosition::getStreet(), and myTo.

◆ setDay()

void AGTrip::setDay ( int  day)

Definition at line 180 of file AGTrip.cpp.

References myDay.

Referenced by AGActivityGen::varDepTime().

Here is the caller graph for this function:

◆ setDep()

void AGTrip::setDep ( AGPosition  departure)

Definition at line 165 of file AGTrip.cpp.

References AGPosition::getPosition(), AGPosition::getStreet(), and myFrom.

◆ setDepTime()

void AGTrip::setDepTime ( int  time)

Definition at line 140 of file AGTrip.cpp.

References myDepTime.

Referenced by AGActivities::generateInOutTraffic(), and AGActivityGen::varDepTime().

Here is the caller graph for this function:

◆ setType()

void AGTrip::setType ( std::string  type)

Definition at line 91 of file AGTrip.cpp.

References myType.

Referenced by AGActivities::generateRandomTraffic(), and AGActivityGen::makeActivityTrips().

Here is the caller graph for this function:

◆ setVehicleName()

void AGTrip::setVehicleName ( std::string  name)

Definition at line 155 of file AGTrip.cpp.

References myVehicle.

Referenced by AGActivityGen::makeActivityTrips().

Here is the caller graph for this function:

Field Documentation

◆ myDay

int AGTrip::myDay
private

if everyday : 0 else : number of the day ( != 0 )

Definition at line 136 of file AGTrip.h.

Referenced by getDay(), isDaily(), print(), and setDay().

◆ myDepTime

int AGTrip::myDepTime
private

Definition at line 125 of file AGTrip.h.

Referenced by getArrTime(), getTime(), print(), and setDepTime().

◆ myFrom

AGPosition AGTrip::myFrom
private

Definition at line 123 of file AGTrip.h.

Referenced by getDep(), getRideBackArrTime(), getTimeTrip(), print(), and setDep().

◆ myPassBy

std::list<AGPosition> AGTrip::myPassBy
private

Definition at line 137 of file AGTrip.h.

Referenced by addLayOver(), addLayOverWithoutDestination(), getPassed(), and getTimeTrip().

◆ myTo

AGPosition AGTrip::myTo
private

Definition at line 124 of file AGTrip.h.

Referenced by addLayOver(), getArr(), getRideBackArrTime(), getTimeTrip(), print(), and setArr().

◆ myType

std::string AGTrip::myType
private

indicates if it is a bus or a car (or any type) "bus", "default" or "random" (which is a kind of default)

Definition at line 131 of file AGTrip.h.

Referenced by getType(), print(), and setType().

◆ myVehicle

std::string AGTrip::myVehicle
private

Definition at line 126 of file AGTrip.h.

Referenced by getVehicleName(), print(), and setVehicleName().


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