![]() |
SUMO - Simulation of Urban MObility
|
assignment methods More...
#include <ROMAAssignments.h>
Public Member Functions | |
double | capacityConstraintFunction (const ROEdge *edge, const double flow) const |
ROVehicle * | getDefaultVehicle () |
void | incremental (const int numIter, const bool verbose) |
void | resetFlows () |
ROMAAssignments (const SUMOTime begin, const SUMOTime end, const bool additiveTraffic, const double adaptionFactor, RONet &net, ODMatrix &matrix, SUMOAbstractRouter< ROEdge, ROVehicle > &router) | |
Constructor. More... | |
void | sue (const int maxOuterIteration, const int maxInnerIteration, const int kPaths, const double penalty, const double tolerance, const std::string routeChoiceMethod) |
void | ue () |
~ROMAAssignments () | |
Destructor. More... | |
Static Public Member Functions | |
static double | getCapacity (const ROEdge *edge) |
static double | getPenalizedEffort (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the effort to pass an edge including penalties. More... | |
static double | getPenalizedTT (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the traveltime on an edge including penalties. More... | |
static double | getTravelTime (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the traveltime on an edge without penalties. More... | |
Private Member Functions | |
bool | addRoute (ConstROEdgeVector &edges, std::vector< RORoute *> &paths, std::string routeId, double prob) |
add a route and check for duplicates More... | |
void | getKPaths (const int kPaths, const double penalty) |
get the k shortest paths More... | |
ROMAAssignments & | operator= (const ROMAAssignments &src) |
Invalidated assignment operator. More... | |
Private Attributes | |
const double | myAdaptionFactor |
const bool | myAdditiveTraffic |
const SUMOTime | myBegin |
ROVehicle * | myDefaultVehicle |
const SUMOTime | myEnd |
ODMatrix & | myMatrix |
RONet & | myNet |
SUMOAbstractRouter< ROEdge, ROVehicle > & | myRouter |
Static Private Attributes | |
static std::map< const ROEdge *const, double > | myPenalties |
assignment methods
Definition at line 51 of file ROMAAssignments.h.
ROMAAssignments::ROMAAssignments | ( | const SUMOTime | begin, |
const SUMOTime | end, | ||
const bool | additiveTraffic, | ||
const double | adaptionFactor, | ||
RONet & | net, | ||
ODMatrix & | matrix, | ||
SUMOAbstractRouter< ROEdge, ROVehicle > & | router | ||
) |
Constructor.
Definition at line 50 of file ROMAAssignments.cpp.
References DEFAULT_VTYPE_ID, RONet::getVehicleTypeSecure(), and myDefaultVehicle.
ROMAAssignments::~ROMAAssignments | ( | ) |
|
private |
add a route and check for duplicates
Definition at line 168 of file ROMAAssignments.cpp.
Referenced by getDefaultVehicle(), getKPaths(), incremental(), and sue().
double ROMAAssignments::capacityConstraintFunction | ( | const ROEdge * | edge, |
const double | flow | ||
) | const |
Definition at line 116 of file ROMAAssignments.cpp.
References getCapacity(), ROEdge::getLength(), ROEdge::getNumLanes(), ROEdge::getPriority(), ROEdge::getSpeedLimit(), and ROEdge::isTazConnector().
Referenced by getDefaultVehicle(), incremental(), and sue().
|
static |
Definition at line 64 of file ROMAAssignments.cpp.
References ROEdge::getNumLanes(), ROEdge::getPriority(), ROEdge::getSpeedLimit(), and ROEdge::isTazConnector().
Referenced by capacityConstraintFunction(), getDefaultVehicle(), and writeInterval().
|
inline |
Definition at line 60 of file ROMAAssignments.h.
References addRoute(), capacityConstraintFunction(), getCapacity(), getKPaths(), getPenalizedEffort(), getPenalizedTT(), getTravelTime(), incremental(), myDefaultVehicle, resetFlows(), sue(), and ue().
|
private |
get the k shortest paths
Definition at line 186 of file ROMAAssignments.cpp.
References addRoute(), SUMOAbstractRouter< E, V >::compute(), ODCell::destination, ODMatrix::getCells(), RONet::getEdge(), myDefaultVehicle, myMatrix, myNet, myPenalties, myRouter, ODCell::origin, ODCell::pathsVector, and toString().
Referenced by getDefaultVehicle(), and sue().
|
static |
Returns the effort to pass an edge including penalties.
This method is given to the used router in order to obtain the efforts to pass an edge from the internal edge weights container.
[in] | e | The edge for which the effort to be passed shall be returned |
[in] | v | The (default) vehicle that is routed |
[in] | t | The time for which the effort shall be returned |
Definition at line 419 of file ROMAAssignments.cpp.
References ROEdge::getEffort(), and myPenalties.
Referenced by computeRoutes(), and getDefaultVehicle().
|
static |
Returns the traveltime on an edge including penalties.
This method is given to the used router in order to obtain the efforts to pass an edge from the internal edge weights container.
[in] | e | The edge for which the effort to be passed shall be returned |
[in] | v | The (default) vehicle that is routed |
[in] | t | The time for which the effort shall be returned |
Definition at line 426 of file ROMAAssignments.cpp.
References ROEdge::getTravelTime(), and myPenalties.
Referenced by computeRoutes(), and getDefaultVehicle().
|
static |
Returns the traveltime on an edge without penalties.
This method is given to the used router in order to obtain the efforts to pass an edge from the internal edge weights container.
[in] | e | The edge for which the effort to be passed shall be returned |
[in] | v | The (default) vehicle that is routed |
[in] | t | The time for which the effort shall be returned |
Definition at line 433 of file ROMAAssignments.cpp.
References ROEdge::getTravelTime(), myBegin, and toString().
Referenced by computeRoutes(), and getDefaultVehicle().
void ROMAAssignments::incremental | ( | const int | numIter, |
const bool | verbose | ||
) |
Definition at line 215 of file ROMAAssignments.cpp.
References addRoute(), ROEdge::addTravelTime(), ODCell::begin, NamedObjectCont< T >::begin(), capacityConstraintFunction(), SUMOAbstractRouter< E, V >::compute(), ODCell::destination, ODCell::end, NamedObjectCont< T >::end(), ODMatrix::getCells(), RONet::getEdge(), RONet::getEdgeMap(), ROMAEdge::getFlow(), ROEdge::getTravelTime(), ROEdge::hasLoadedTravelTime(), myAdaptionFactor, myAdditiveTraffic, myBegin, myDefaultVehicle, myEnd, myMatrix, myNet, myRouter, ODCell::origin, ODCell::pathsVector, SUMOAbstractRouter< E, V >::setBulkMode(), ROMAEdge::setFlow(), STEPS2TIME, time2string(), toString(), ODCell::vehicleNumber, and WRITE_MESSAGE.
Referenced by getDefaultVehicle().
|
private |
Invalidated assignment operator.
void ROMAAssignments::resetFlows | ( | ) |
Definition at line 204 of file ROMAAssignments.cpp.
References NamedObjectCont< T >::begin(), NamedObjectCont< T >::end(), ODMatrix::getCells(), RONet::getEdgeMap(), MIN2(), myBegin, myEnd, myMatrix, myNet, ROMAEdge::setFlow(), ROMAEdge::setHelpFlow(), and STEPS2TIME.
Referenced by computeRoutes(), and getDefaultVehicle().
void ROMAAssignments::sue | ( | const int | maxOuterIteration, |
const int | maxInnerIteration, | ||
const int | kPaths, | ||
const double | penalty, | ||
const double | tolerance, | ||
const std::string | routeChoiceMethod | ||
) |
Definition at line 313 of file ROMAAssignments.cpp.
References addRoute(), ROEdge::addTravelTime(), ODCell::begin, NamedObjectCont< T >::begin(), capacityConstraintFunction(), SUMOAbstractRouter< E, V >::compute(), ODCell::destination, ODCell::end, NamedObjectCont< T >::end(), RouteCostCalculator< R, E, V >::getCalculator(), ODMatrix::getCells(), RONet::getEdge(), RONet::getEdgeMap(), RORoute::getEdgeVector(), ROMAEdge::getFlow(), ROMAEdge::getHelpFlow(), getKPaths(), RORoute::getProbability(), myAdditiveTraffic, myBegin, myDefaultVehicle, myEnd, myMatrix, myNet, myRouter, ODCell::origin, ODCell::pathsVector, SUMOAbstractRouter< E, V >::recomputeCosts(), RORoute::setCosts(), ROMAEdge::setFlow(), ROMAEdge::setHelpFlow(), RORoute::setProbability(), STEPS2TIME, toString(), and ODCell::vehicleNumber.
Referenced by getDefaultVehicle().
void ROMAAssignments::ue | ( | ) |
Referenced by getDefaultVehicle().
|
private |
Definition at line 132 of file ROMAAssignments.h.
Referenced by incremental().
|
private |
Definition at line 131 of file ROMAAssignments.h.
Referenced by incremental(), and sue().
|
private |
Definition at line 129 of file ROMAAssignments.h.
Referenced by getTravelTime(), incremental(), resetFlows(), and sue().
|
private |
Definition at line 137 of file ROMAAssignments.h.
Referenced by getDefaultVehicle(), getKPaths(), incremental(), ROMAAssignments(), sue(), and ~ROMAAssignments().
|
private |
Definition at line 130 of file ROMAAssignments.h.
Referenced by incremental(), resetFlows(), and sue().
|
private |
Definition at line 134 of file ROMAAssignments.h.
Referenced by getKPaths(), incremental(), resetFlows(), and sue().
|
private |
Definition at line 133 of file ROMAAssignments.h.
Referenced by getKPaths(), incremental(), resetFlows(), and sue().
|
staticprivate |
Definition at line 136 of file ROMAAssignments.h.
Referenced by getKPaths(), getPenalizedEffort(), and getPenalizedTT().
|
private |
Definition at line 135 of file ROMAAssignments.h.
Referenced by getKPaths(), incremental(), and sue().