![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <AGTrip.h>
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, 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< AGPosition > | myPassBy |
AGPosition | myTo |
std::string | myType |
std::string | myVehicle |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 70 of file AGTrip.h.
References addLayOver(), addLayOverWithoutDestination(), estimateDepTime(), getArr(), getArrTime(), getDay(), getDep(), getPassed(), getRideBackArrTime(), getTime(), getTimeTrip(), getType(), getVehicleName(), isDaily(), operator<(), print(), setArr(), setDay(), setDep(), setDepTime(), setType(), and setVehicleName().
void AGTrip::addLayOver | ( | AGPosition | by | ) |
Definition at line 61 of file AGTrip.cpp.
References myPassBy.
Referenced by AGTrip(), and AGActivities::generateBusTraffic().
void AGTrip::addLayOver | ( | AGTrip & | trip | ) |
Definition at line 66 of file AGTrip.cpp.
void AGTrip::addLayOverWithoutDestination | ( | AGTrip & | trip | ) |
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 147 of file AGTrip.cpp.
References getTimeTrip().
Referenced by AGTrip().
AGPosition AGTrip::getArr | ( | ) | const |
Definition at line 103 of file AGTrip.cpp.
References myTo.
Referenced by AGActivityTripWriter::addTrip(), and AGTrip().
int AGTrip::getArrTime | ( | double | secPerKm | ) | const |
returns the estimated arrival time given the time to make one kilometer
Definition at line 132 of file AGTrip.cpp.
References getTimeTrip(), and myDepTime.
Referenced by AGTrip(), and getRideBackArrTime().
int AGTrip::getDay | ( | ) | const |
Definition at line 177 of file AGTrip.cpp.
References myDay.
Referenced by AGActivityTripWriter::addTrip(), AGTrip(), operator<(), AGActivityGen::timeTripValidation(), and AGActivityGen::varDepTime().
AGPosition AGTrip::getDep | ( | ) | const |
Definition at line 98 of file AGTrip.cpp.
References myFrom.
Referenced by AGActivityTripWriter::addTrip(), and AGTrip().
const std::list< AGPosition > * AGTrip::getPassed | ( | ) | const |
Definition at line 83 of file AGTrip.cpp.
References myPassBy.
Referenced by AGActivityTripWriter::addTrip(), and AGTrip().
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 137 of file AGTrip.cpp.
References AGPosition::distanceTo(), getArrTime(), myFrom, and myTo.
Referenced by AGTrip().
int AGTrip::getTime | ( | ) | const |
Definition at line 108 of file AGTrip.cpp.
References myDepTime.
Referenced by AGActivityTripWriter::addTrip(), AGTrip(), operator<(), AGActivityGen::timeTripValidation(), and AGActivityGen::varDepTime().
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 113 of file AGTrip.cpp.
References AGPosition::distanceTo(), myFrom, myPassBy, and myTo.
Referenced by AGTrip(), estimateDepTime(), and getArrTime().
const std::string & AGTrip::getType | ( | ) | const |
Definition at line 88 of file AGTrip.cpp.
References myType.
Referenced by AGActivityTripWriter::addTrip(), AGTrip(), and AGActivityGen::varDepTime().
const std::string & AGTrip::getVehicleName | ( | ) | const |
Definition at line 152 of file AGTrip.cpp.
References myVehicle.
Referenced by AGActivityTripWriter::addTrip(), and AGTrip().
bool AGTrip::isDaily | ( | ) | const |
returns whether this is a daily trip or a one day trip
Definition at line 172 of file AGTrip.cpp.
References myDay.
Referenced by AGTrip().
bool AGTrip::operator< | ( | const AGTrip & | trip | ) | const |
Definition at line 37 of file AGTrip.cpp.
References getDay(), and getTime().
Referenced by AGTrip().
void AGTrip::print | ( | ) | const |
Definition at line 49 of file AGTrip.cpp.
References myDay, myDepTime, myFrom, myTo, myType, myVehicle, and AGPosition::print().
Referenced by AGTrip().
void AGTrip::setArr | ( | AGPosition | arrival | ) |
Definition at line 162 of file AGTrip.cpp.
References AGPosition::getPosition(), AGPosition::getStreet(), and myTo.
Referenced by AGTrip().
void AGTrip::setDay | ( | int | day | ) |
Definition at line 182 of file AGTrip.cpp.
References myDay.
Referenced by AGTrip(), and AGActivityGen::varDepTime().
void AGTrip::setDep | ( | AGPosition | departure | ) |
Definition at line 167 of file AGTrip.cpp.
References AGPosition::getPosition(), AGPosition::getStreet(), and myFrom.
Referenced by AGTrip().
void AGTrip::setDepTime | ( | int | time | ) |
Definition at line 142 of file AGTrip.cpp.
References myDepTime.
Referenced by AGTrip(), AGActivities::generateInOutTraffic(), and AGActivityGen::varDepTime().
void AGTrip::setType | ( | std::string | type | ) |
Definition at line 93 of file AGTrip.cpp.
References myType.
Referenced by AGTrip(), AGActivities::generateRandomTraffic(), and AGActivityGen::makeActivityTrips().
void AGTrip::setVehicleName | ( | std::string | name | ) |
|
private |
|
private |
Definition at line 128 of file AGTrip.h.
Referenced by getArrTime(), getTime(), print(), and setDepTime().
|
private |
Definition at line 126 of file AGTrip.h.
Referenced by getDep(), getRideBackArrTime(), getTimeTrip(), print(), and setDep().
|
private |
Definition at line 140 of file AGTrip.h.
Referenced by addLayOver(), addLayOverWithoutDestination(), getPassed(), and getTimeTrip().
|
private |
Definition at line 127 of file AGTrip.h.
Referenced by addLayOver(), getArr(), getRideBackArrTime(), getTimeTrip(), print(), and setArr().
|
private |
|
private |
Definition at line 129 of file AGTrip.h.
Referenced by getVehicleName(), print(), and setVehicleName().