SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AGTrip Class Reference

#include <AGTrip.h>

Collaboration diagram for AGTrip:
Collaboration graph

Public Member Functions

void addLayOver (AGPosition by)
 
void addLayOver (AGTrip &trip)
 
void addLayOverWithoutDestination (AGTrip &trip)
 
 AGTrip (AGPosition from, AGPosition to, int at)
 
 AGTrip (AGPosition from, AGPosition to, AGCar c, int at)
 
 AGTrip (AGPosition from, AGPosition to, AGBus b, 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, SUMOReal secPerKm) const
 
AGPosition getArr () const
 
int getArrTime (SUMOReal secPerKm) const
 
int getDay () const
 
AGPosition getDep () const
 
const std::list< AGPosition > * getPassed () const
 
int getRideBackArrTime (SUMOReal secPerKm) const
 
int getTime () const
 
int getTimeTrip (SUMOReal 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 48 of file AGTrip.h.

Constructor & Destructor Documentation

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

Definition at line 50 of file AGTrip.h.

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

Definition at line 56 of file AGTrip.h.

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

Definition at line 63 of file AGTrip.h.

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

Definition at line 70 of file AGTrip.h.

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

Definition at line 77 of file AGTrip.h.

Member Function Documentation

void AGTrip::addLayOver ( AGPosition  by)

Definition at line 68 of file AGTrip.cpp.

References myPassBy.

Referenced by AGActivities::generateBusTraffic().

void AGTrip::addLayOver ( AGTrip trip)

Definition at line 73 of file AGTrip.cpp.

References myPassBy, and myTo.

void AGTrip::addLayOverWithoutDestination ( AGTrip trip)

Definition at line 82 of file AGTrip.cpp.

References myPassBy.

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

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

Definition at line 154 of file AGTrip.cpp.

References getTimeTrip().

AGPosition AGTrip::getArr ( ) const

Definition at line 110 of file AGTrip.cpp.

References myTo.

Referenced by AGActivityTripWriter::addTrip().

int AGTrip::getArrTime ( SUMOReal  secPerKm) const

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

Definition at line 139 of file AGTrip.cpp.

References getTimeTrip(), and myDepTime.

Referenced by getRideBackArrTime().

int AGTrip::getDay ( ) const
AGPosition AGTrip::getDep ( ) const

Definition at line 105 of file AGTrip.cpp.

References myFrom.

Referenced by AGActivityTripWriter::addTrip().

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

Definition at line 90 of file AGTrip.cpp.

References myPassBy.

Referenced by AGActivityTripWriter::addTrip().

int AGTrip::getRideBackArrTime ( SUMOReal  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 144 of file AGTrip.cpp.

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

int AGTrip::getTime ( ) const
int AGTrip::getTimeTrip ( SUMOReal  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 120 of file AGTrip.cpp.

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

Referenced by estimateDepTime(), and getArrTime().

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

Definition at line 95 of file AGTrip.cpp.

References myType.

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

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

Definition at line 159 of file AGTrip.cpp.

References myVehicle.

Referenced by AGActivityTripWriter::addTrip().

bool AGTrip::isDaily ( ) const

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

Definition at line 179 of file AGTrip.cpp.

References myDay.

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

Definition at line 44 of file AGTrip.cpp.

References getDay(), and getTime().

void AGTrip::print ( ) const

Definition at line 56 of file AGTrip.cpp.

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

void AGTrip::setArr ( AGPosition  arrival)

Definition at line 169 of file AGTrip.cpp.

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

void AGTrip::setDay ( int  day)

Definition at line 189 of file AGTrip.cpp.

References myDay.

Referenced by AGActivityGen::varDepTime().

void AGTrip::setDep ( AGPosition  departure)

Definition at line 174 of file AGTrip.cpp.

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

void AGTrip::setDepTime ( int  time)

Definition at line 149 of file AGTrip.cpp.

References myDepTime.

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

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

Definition at line 100 of file AGTrip.cpp.

References myType.

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

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

Definition at line 164 of file AGTrip.cpp.

References myVehicle.

Field Documentation

int AGTrip::myDay
private

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

Definition at line 146 of file AGTrip.h.

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

int AGTrip::myDepTime
private

Definition at line 135 of file AGTrip.h.

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

AGPosition AGTrip::myFrom
private

Definition at line 133 of file AGTrip.h.

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

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

Definition at line 147 of file AGTrip.h.

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

AGPosition AGTrip::myTo
private

Definition at line 134 of file AGTrip.h.

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

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 141 of file AGTrip.h.

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

std::string AGTrip::myVehicle
private

Definition at line 136 of file AGTrip.h.

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


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