Eclipse SUMO - Simulation of Urban MObility
|
assignment methods More...
#include <ROMAAssignments.h>
Public Member Functions | |
double | capacityConstraintFunction (const ROEdge *edge, const double flow) const |
double | getCapacity (const ROEdge *edge) const |
ROVehicle * | getDefaultVehicle () const |
void | incremental (const int numIter, const bool verbose) |
void | resetFlows () |
ROMAAssignments (const SUMOTime begin, const SUMOTime end, const bool additiveTraffic, const double adaptionFactor, const int maxAlternatives, const bool defaultCapacities, RONet &net, ODMatrix &matrix, SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice *netloadOutput) | |
Constructor. | |
void | sue (const int maxOuterIteration, const int maxInnerIteration, const int kPaths, const double penalty, const double tolerance, const std::string routeChoiceMethod) |
void | ue () |
void | writeInterval (const SUMOTime begin, const SUMOTime end) |
~ROMAAssignments () | |
Destructor. | |
Static Public Member Functions | |
static double | getPenalizedEffort (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the effort to pass an edge including penalties. | |
static double | getPenalizedTT (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the traveltime on an edge including penalties. | |
static double | getTravelTime (const ROEdge *const e, const ROVehicle *const v, double t) |
Returns the traveltime on an edge without penalties. | |
Private Member Functions | |
bool | addRoute (const ConstROEdgeVector &edges, std::vector< RORoute * > &paths, std::string routeId, double prob) |
add a route and check for duplicates | |
const ConstROEdgeVector | computePath (ODCell *cell, const SUMOTime time=0, const double probability=0., SUMOAbstractRouter< ROEdge, ROVehicle > *router=nullptr, bool setBulkMode=false) |
void | getKPaths (const int kPaths, const double penalty) |
get the k shortest paths | |
ROMAAssignments & | operator= (const ROMAAssignments &src)=delete |
Invalidated assignment operator. | |
Private Attributes | |
const double | myAdaptionFactor |
const bool | myAdditiveTraffic |
const SUMOTime | myBegin |
ROVehicle * | myDefaultVehicle |
const SUMOTime | myEnd |
ODMatrix & | myMatrix |
const int | myMaxAlternatives |
RONet & | myNet |
OutputDevice *const | myNetloadOutput |
SUMOAbstractRouter< ROEdge, ROVehicle > & | myRouter |
const bool | myUseDefaultCapacities |
Static Private Attributes | |
static std::map< const ROEdge *const, double > | myPenalties |
assignment methods
Definition at line 48 of file ROMAAssignments.h.
ROMAAssignments::ROMAAssignments | ( | const SUMOTime | begin, |
const SUMOTime | end, | ||
const bool | additiveTraffic, | ||
const double | adaptionFactor, | ||
const int | maxAlternatives, | ||
const bool | defaultCapacities, | ||
RONet & | net, | ||
ODMatrix & | matrix, | ||
SUMOAbstractRouter< ROEdge, ROVehicle > & | router, | ||
OutputDevice * | netloadOutput | ||
) |
Constructor.
Definition at line 48 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 169 of file ROMAAssignments.cpp.
Referenced by computePath().
double ROMAAssignments::capacityConstraintFunction | ( | const ROEdge * | edge, |
const double | flow | ||
) | const |
Definition at line 117 of file ROMAAssignments.cpp.
References getCapacity(), ROEdge::getLength(), ROEdge::getNumLanes(), ROEdge::getPriority(), ROEdge::getSpeedLimit(), ROEdge::isTazConnector(), and myUseDefaultCapacities.
Referenced by incremental(), and sue().
|
private |
Definition at line 187 of file ROMAAssignments.cpp.
References RORoute::addProbability(), addRoute(), SUMOAbstractRouter< E, V >::compute(), ODCell::destination, ODCell::destinationIsEdge, RONet::getEdge(), myDefaultVehicle, myMaxAlternatives, myNet, myRouter, ODCell::origin, ODCell::originIsEdge, ODCell::pathsVector, SUMOAbstractRouter< E, V >::recomputeCosts(), SUMOAbstractRouter< E, V >::setBulkMode(), TLF, and toString().
Referenced by getKPaths(), incremental(), and sue().
double ROMAAssignments::getCapacity | ( | const ROEdge * | edge | ) | const |
Definition at line 65 of file ROMAAssignments.cpp.
References ROEdge::getNumLanes(), ROEdge::getPriority(), ROEdge::getSpeedLimit(), ROEdge::isTazConnector(), and myUseDefaultCapacities.
Referenced by capacityConstraintFunction(), and writeInterval().
|
inline |
Definition at line 59 of file ROMAAssignments.h.
References myDefaultVehicle.
Referenced by writeInterval().
|
private |
get the k shortest paths
Definition at line 225 of file ROMAAssignments.cpp.
References computePath(), ODMatrix::getCells(), myMatrix, and myPenalties.
Referenced by 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 487 of file ROMAAssignments.cpp.
References ROEdge::getEffort(), and myPenalties.
|
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 494 of file ROMAAssignments.cpp.
References ROEdge::getTravelTime(), and myPenalties.
Referenced by computeRoutes().
|
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 501 of file ROMAAssignments.cpp.
References ROEdge::getTravelTime().
void ROMAAssignments::incremental | ( | const int | numIter, |
const bool | verbose | ||
) |
Definition at line 280 of file ROMAAssignments.cpp.
References ROEdge::addTravelTime(), ODCell::begin, NamedObjectCont< T >::begin(), capacityConstraintFunction(), computePath(), ROEdge::disableTimelineWarning(), 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 >::reset(), SUMOAbstractRouter< E, V >::setBulkMode(), ROMAEdge::setFlow(), STEPS2TIME, time2string(), toString(), ODCell::vehicleNumber, WRITE_MESSAGE, and writeInterval().
|
privatedelete |
Invalidated assignment operator.
void ROMAAssignments::resetFlows | ( | ) |
Definition at line 239 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().
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 381 of file ROMAAssignments.cpp.
References ROEdge::addTravelTime(), NamedObjectCont< T >::begin(), capacityConstraintFunction(), computePath(), 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, SUMOAbstractRouter< E, V >::recomputeCosts(), RORoute::setCosts(), ROMAEdge::setFlow(), ROMAEdge::setHelpFlow(), RORoute::setProbability(), STEPS2TIME, and writeInterval().
void ROMAAssignments::ue | ( | ) |
Definition at line 250 of file ROMAAssignments.cpp.
References NamedObjectCont< T >::begin(), OutputDevice::closeTag(), NamedObjectCont< T >::end(), getCapacity(), getDefaultVehicle(), RONet::getEdgeMap(), ROMAEdge::getFlow(), ROEdge::getFunction(), Named::getID(), ROEdge::getLength(), ROEdge::getNumLanes(), ROEdge::getSpeedLimit(), ROEdge::getTravelTime(), myNet, myNetloadOutput, NORMAL, OutputDevice::openTag(), STEPS2TIME, SUMO_ATTR_BEGIN, SUMO_ATTR_DENSITY, SUMO_ATTR_END, SUMO_ATTR_ENTERED, SUMO_ATTR_ID, SUMO_ATTR_LANEDENSITY, SUMO_ATTR_SPEED, SUMO_ATTR_SPEEDREL, SUMO_ATTR_TRAVELTIME, SUMO_TAG_EDGE, SUMO_TAG_INTERVAL, time2string(), and OutputDevice::writeAttr().
Referenced by incremental(), and sue().
|
private |
Definition at line 136 of file ROMAAssignments.h.
Referenced by incremental().
|
private |
Definition at line 135 of file ROMAAssignments.h.
Referenced by incremental(), and sue().
|
private |
Definition at line 133 of file ROMAAssignments.h.
Referenced by incremental(), resetFlows(), and sue().
|
private |
Definition at line 143 of file ROMAAssignments.h.
Referenced by computePath(), getDefaultVehicle(), incremental(), ROMAAssignments(), sue(), and ~ROMAAssignments().
|
private |
Definition at line 134 of file ROMAAssignments.h.
Referenced by incremental(), resetFlows(), and sue().
|
private |
Definition at line 140 of file ROMAAssignments.h.
Referenced by getKPaths(), incremental(), resetFlows(), and sue().
|
private |
Definition at line 137 of file ROMAAssignments.h.
Referenced by computePath().
|
private |
Definition at line 139 of file ROMAAssignments.h.
Referenced by computePath(), incremental(), resetFlows(), sue(), and writeInterval().
|
private |
Definition at line 144 of file ROMAAssignments.h.
Referenced by writeInterval().
|
staticprivate |
Definition at line 142 of file ROMAAssignments.h.
Referenced by getKPaths(), getPenalizedEffort(), and getPenalizedTT().
|
private |
Definition at line 141 of file ROMAAssignments.h.
Referenced by computePath(), incremental(), and sue().
|
private |
Definition at line 138 of file ROMAAssignments.h.
Referenced by capacityConstraintFunction(), and getCapacity().