Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSDispatch_TraCI Class Reference

A dispatch algorithm that services customers in reservation order and always sends the closest available taxi. More...

#include <MSDispatch_TraCI.h>

Inheritance diagram for MSDispatch_TraCI:
[legend]
Collaboration diagram for MSDispatch_TraCI:
[legend]

Public Types

typedef std::map< std::string, std::string > Map
 parameters map
 

Public Member Functions

ReservationaddReservation (MSTransportable *person, SUMOTime reservationTime, SUMOTime pickupTime, SUMOTime earliestPickupTime, const MSEdge *from, double fromPos, const MSStoppingPlace *fromStop, const MSEdge *to, double toPos, const MSStoppingPlace *toStop, std::string group, const std::string &line, int maxCapacity, int maxContainerCapacity) override
 add a new reservation
 
void clearParameter ()
 Clears the parameter map.
 
void computeDispatch (SUMOTime, const std::vector< MSDevice_Taxi * > &) override
 do nothing (dispatch happens via TraCI calls)
 
void fulfilledReservation (const Reservation *res) override
 erase reservation from storage
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double.
 
std::vector< double > getDoubles (const std::string &key, std::vector< double > defaultValue=std::vector< double >()) const
 Returns the value for a given key converted to a list of doubles.
 
virtual const std::string getParameter (const std::string &key, const std::string defaultValue="") const
 Returns the value for a given key.
 
const Parameterised::MapgetParametersMap () const
 Returns the inner key/value map.
 
std::string getParametersStr (const std::string kvsep="=", const std::string sep="|") const
 Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
 
std::vector< Reservation * > getReservations ()
 retrieve all reservations
 
virtual std::vector< const Reservation * > getRunningReservations ()
 retrieve all reservations that were already dispatched and are still active
 
bool hasParameter (const std::string &key) const
 Returns whether the parameter is set.
 
bool hasServableReservations ()
 check whether there are still (servable) reservations in the system
 
void interpretDispatch (MSDevice_Taxi *taxi, const std::vector< std::string > &reservationsIDs)
 trigger taxi dispatch.
 
void mergeParameters (const Parameterised::Map &mapArg, const std::string separator=" ", bool uniqueValues=true)
 Adds or appends all given parameters from the map.
 
 MSDispatch_TraCI (const Parameterised::Map &params)
 
std::string removeReservation (MSTransportable *person, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, std::string group) override
 remove person from reservation. If the whole reservation is removed, return its id
 
virtual void setParameter (const std::string &key, const std::string &value)
 Sets a parameter.
 
void setParameters (const Parameterised &params)
 set the inner key/value map in map<string, string> format
 
void setParametersStr (const std::string &paramsString, const std::string kvsep="=", const std::string sep="|")
 set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
 
std::string splitReservation (std::string resID, std::vector< std::string > personIDs)
 split existing reservations and return the new reservation id
 
void unsetParameter (const std::string &key)
 Removes a parameter.
 
void updateParameters (const Parameterised::Map &mapArg)
 Adds or updates all given parameters from the map.
 
virtual ReservationupdateReservationFromPos (MSTransportable *person, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, std::string group, double newFromPos)
 update fromPos of the person's reservation. TODO: if there is already a reservation with the newFromPos, add to this reservation TODO: if there are other persons in this reservation, create a new reservation for the updated one
 
void writeParams (OutputDevice &device) const
 write Params in the given outputdevice
 

Static Public Member Functions

static bool areAttributesValid (const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
 check if given string can be parsed to an attributes map "key1=value1|key2=value2|...|keyN=valueN" (used in generic datas)
 
static bool areParametersValid (const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
 check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN"
 
static double computeDetourTime (SUMOTime t, SUMOTime viaTime, const MSDevice_Taxi *taxi, const MSEdge *from, double fromPos, const MSEdge *via, double viaPos, const MSEdge *to, double toPos, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, double &timeDirect)
 compute directTime and detourTime
 
static SUMOTime computePickupTime (SUMOTime t, const MSDevice_Taxi *taxi, const Reservation &res, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router)
 compute time to pick up the given reservation
 

Data Fields

bool myHasServableReservations = false
 whether the last call to computeDispatch has left servable reservations
 

Protected Member Functions

int remainingCapacity (const MSDevice_Taxi *taxi, const Reservation *res)
 whether the given taxi has sufficient capacity to serve the reservation
 
void servedReservation (const Reservation *res)
 

Protected Attributes

std::map< std::string, std::vector< Reservation * > > myGroupReservations
 
OutputDevicemyOutput
 optional file output for dispatch information
 
int myReservationCount
 
std::set< const Reservation * > myRunningReservations
 

Private Member Functions

MSDispatch_TraCIoperator= (const MSDispatch_TraCI &)=delete
 Invalidated assignment operator.
 

Static Private Member Functions

static bool isParameterValid (const std::string &value, const std::string &kvsep, const std::string &sep)
 check if given string can be parsed to a parameter of type "key=value"
 

Private Attributes

Parameterised::Map myMap
 The key->value map.
 
StringBijection< const Reservation * > myReservationLookup
 

Detailed Description

A dispatch algorithm that services customers in reservation order and always sends the closest available taxi.

Definition at line 40 of file MSDispatch_TraCI.h.

Member Typedef Documentation

◆ Map

typedef std::map<std::string, std::string> Parameterised::Map
inherited

parameters map

Definition at line 45 of file Parameterised.h.

Constructor & Destructor Documentation

◆ MSDispatch_TraCI()

MSDispatch_TraCI::MSDispatch_TraCI ( const Parameterised::Map params)
inline

Definition at line 42 of file MSDispatch_TraCI.h.

Member Function Documentation

◆ addReservation()

Reservation * MSDispatch_TraCI::addReservation ( MSTransportable person,
SUMOTime  reservationTime,
SUMOTime  pickupTime,
SUMOTime  earliestPickupTime,
const MSEdge from,
double  fromPos,
const MSStoppingPlace fromStop,
const MSEdge to,
double  toPos,
const MSStoppingPlace toStop,
std::string  group,
const std::string &  line,
int  maxCapacity,
int  maxContainerCapacity 
)
overridevirtual

◆ areAttributesValid()

bool Parameterised::areAttributesValid ( const std::string &  value,
bool  report = false,
const std::string  kvsep = "=",
const std::string  sep = "|" 
)
staticinherited

check if given string can be parsed to an attributes map "key1=value1|key2=value2|...|keyN=valueN" (used in generic datas)

Definition at line 219 of file Parameterised.cpp.

References StringTokenizer::getVector(), Parameterised::isParameterValid(), TL, and WRITE_WARNINGF.

Referenced by GNEFrameAttributeModules::GenericDataAttributes::areAttributesValid(), GNEEdgeData::isValid(), GNEEdgeRelData::isValid(), and GNETAZRelData::isValid().

Here is the caller graph for this function:

◆ areParametersValid()

bool Parameterised::areParametersValid ( const std::string &  value,
bool  report = false,
const std::string  kvsep = "=",
const std::string  sep = "|" 
)
staticinherited

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 139 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::beginEdgeParsing(), and GNESingleParametersDialog::onCmdAccept().

Here is the caller graph for this function:

◆ computeDetourTime()

double MSDispatch::computeDetourTime ( SUMOTime  t,
SUMOTime  viaTime,
const MSDevice_Taxi taxi,
const MSEdge from,
double  fromPos,
const MSEdge via,
double  viaPos,
const MSEdge to,
double  toPos,
SUMOAbstractRouter< MSEdge, SUMOVehicle > &  router,
double &  timeDirect 
)
staticinherited

compute directTime and detourTime

Definition at line 280 of file MSDispatch.cpp.

References SUMOAbstractRouter< E, V >::compute(), MSVehicleDevice::getHolder(), Named::getID(), MAX2(), SUMOAbstractRouter< E, V >::recomputeCostsPos(), STEPS2TIME, TIME2STEPS, and toString().

Referenced by MSDispatch_GreedyShared::dispatch().

Here is the caller graph for this function:

◆ computeDispatch()

void MSDispatch_TraCI::computeDispatch ( SUMOTime  ,
const std::vector< MSDevice_Taxi * > &   
)
inlineoverridevirtual

do nothing (dispatch happens via TraCI calls)

Implements MSDispatch.

Definition at line 67 of file MSDispatch_TraCI.h.

◆ computePickupTime()

SUMOTime MSDispatch::computePickupTime ( SUMOTime  t,
const MSDevice_Taxi taxi,
const Reservation res,
SUMOAbstractRouter< MSEdge, SUMOVehicle > &  router 
)
staticinherited

compute time to pick up the given reservation

Definition at line 271 of file MSDispatch.cpp.

References SUMOAbstractRouter< E, V >::compute(), Reservation::from, Reservation::fromPos, SUMOTrafficObject::getEdge(), MSVehicleDevice::getHolder(), SUMOTrafficObject::getPositionOnLane(), SUMOAbstractRouter< E, V >::recomputeCosts(), and TIME2STEPS.

Referenced by MSDispatch_Greedy::computeDispatch(), and MSDispatch_GreedyClosest::computeDispatch().

Here is the caller graph for this function:

◆ fulfilledReservation()

void MSDispatch_TraCI::fulfilledReservation ( const Reservation res)
overridevirtual

erase reservation from storage

Reimplemented from MSDispatch.

Definition at line 74 of file MSDispatch_TraCI.cpp.

References MSDispatch::fulfilledReservation(), Reservation::id, myReservationLookup, and StringBijection< T >::remove().

◆ getDouble()

double Parameterised::getDouble ( const std::string &  key,
const double  defaultValue 
) const
inherited

◆ getDoubles()

std::vector< double > Parameterised::getDoubles ( const std::string &  key,
std::vector< double >  defaultValue = std::vector<double>() 
) const
inherited

Returns the value for a given key converted to a list of doubles.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 118 of file Parameterised.cpp.

References StringTokenizer::getVector(), Parameterised::myMap, TL, StringUtils::toDouble(), WRITE_WARNING, and WRITE_WARNINGF.

Referenced by EnergyParams::EnergyParams().

Here is the caller graph for this function:

◆ getParameter()

const std::string Parameterised::getParameter ( const std::string &  key,
const std::string  defaultValue = "" 
) const
virtualinherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Reimplemented in MSActuatedTrafficLightLogic, MSSimpleTrafficLightLogic, and NEMALogic.

Definition at line 90 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSPModel_JuPedSim::add(), NBRailwayTopologyAnalyzer::addBidiEdge(), NBEdge::addRestrictedLane(), FareModul::addStop(), GUIInductLoop::buildDetectorGUIRepresentation(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), ROEdge::cacheParamRestrictions(), SUMOVTypeParameter::cacheParamRestrictions(), MSVehicleType::check(), MSRailSignal::constraintsAllow(), GUINet::createTLWrapper(), GNEEdge::drawEdgeName(), GNEConnection::drawEdgeValues(), GNEGenericData::drawFilteredAttribute(), GUIEdge::drawGL(), EnergyParams::EnergyParams(), MSDevice_SSM::filterByConflictType(), LIBSUMO_NAMESPACE::TrafficLight::findConstraintsDeadLocks(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), GUIVehicle::getColorValue(), GNEEdgeData::getColorValue(), GNEEdgeRelData::getColorValue(), GNETAZRelData::getColorValue(), GNELane::getColorValue(), GUIEdge::getColorValue(), GUILane::getColorValue(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), LIBSUMO_NAMESPACE::TrafficLight::getFutureTripIds(), MSTLLogicControl::WAUTSwitchProcedure::getGSPTime(), RORoutable::getMaxSpeed(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), GUIBaseVehicle::getOptionalName(), GUITrafficLightLogicWrapper::getOptionalName(), MSDevice_SSM::getOutputFilename(), MSSimpleTrafficLightLogic::getParameter(), NEMALogic::getParameter(), LIBSUMO_NAMESPACE::Simulation::getParameter(), MSBaseVehicle::getPrefixedParameter(), GUIBaseVehicle::getScaleValue(), LIBSUMO_NAMESPACE::Vehicle::getStopParameter(), SUMOTrafficObject::getStringParam(), MSRailSignalConstraint::getVeh(), LIBSUMO_NAMESPACE::TrafficLight::getVehicleByTripId(), MSStoppingPlaceRerouter::getWeight(), MSRailSignal::hasInsertionConstraint(), MSRailSignalControl::haveDeadlock(), MSLink::ignoreFoe(), MSSOTLPhasePolicy::init(), MSStageDriving::init(), PushButtonLogic::init(), SigmoidLogic::init(), SUMOVTypeParameter::initRailVisualizationParameters(), NIImporter_OpenStreetMap::insertNodeChecking(), MSAbstractLaneChangeModel::laneChangeOutput(), NWWriter_OpenDrive::mapmatchRoadObjects(), Parameterised::mergeParameters(), MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSDevice_GLOSA::notifyEnter(), MSRailSignalConstraint_Predecessor::PassedTracker::notifyEnter(), GNEVType::overwriteVType(), NWWriter_OpenDrive::parseTrafficSign(), NBTrafficLightDefinition::railSignalUncontrolled(), MSDevice_Battery::readParameterValue(), MSDevice_SSM::requestsTrajectories(), MSDevice_Bluelight::resetVehicle(), GNEEdgeData::setColor(), GNEEdgeRelData::setColor(), NBTrafficLightLogicCont::setOpenDriveSignalParameters(), NBEdge::setOrigID(), MSVehicle::slowDownForSchedule(), NBEdgeCont::splitAt(), LIBSUMO_NAMESPACE::TrafficLight::swapParameters(), LIBSUMO_NAMESPACE::TrafficLight::updateConstraints(), MSDevice_SSM::useGeoCoords(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::WAUTSwitchProcedure_Stretch(), MSDevice_SSM::writeLanesPositions(), NWWriter_DlrNavteq::writeLinksUnsplitted(), MSDevice_SSM::writePositions(), NWWriter_OpenDrive::writeRoadObjectPOI(), NWWriter_OpenDrive::writeRoadObjectPoly(), NWWriter_OpenDrive::writeRoadObjects(), and NWWriter_OpenDrive::writeSignals().

◆ getParametersMap()

const Parameterised::Map & Parameterised::getParametersMap ( ) const
inherited

Returns the inner key/value map.

Definition at line 145 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), NBNode::addCrossing(), NBEdge::addLane(), NBEdge::append(), LIBSUMO_NAMESPACE::TrafficLight::buildConstraint(), GUIParameterTableWindow::closeBuilding(), NLHandler::closeEdge(), NBTrafficLightDefinition::compute(), GNEGenericData::drawAttribute(), GNEGenericData::drawFilteredAttribute(), NLDetectorBuilder::endE3Detector(), GNEAccess::getACParametersMap(), GNECalibrator::getACParametersMap(), GNEDetector::getACParametersMap(), GNEMultiEntryExitDetector::getACParametersMap(), GNEOverheadWire::getACParametersMap(), GNEParkingSpace::getACParametersMap(), GNERerouter::getACParametersMap(), GNERouteProbe::getACParametersMap(), GNEStoppingPlace::getACParametersMap(), GNETAZ::getACParametersMap(), GNEVaporizer::getACParametersMap(), GNEVariableSpeedSign::getACParametersMap(), GNEDataInterval::getACParametersMap(), GNEDataSet::getACParametersMap(), GNEGenericData::getACParametersMap(), GNEContainer::getACParametersMap(), GNEPerson::getACParametersMap(), GNEPersonTrip::getACParametersMap(), GNERide::getACParametersMap(), GNERoute::getACParametersMap(), GNEStop::getACParametersMap(), GNEStopPlan::getACParametersMap(), GNETranship::getACParametersMap(), GNETransport::getACParametersMap(), GNEVehicle::getACParametersMap(), GNEVType::getACParametersMap(), GNEWalk::getACParametersMap(), GNEConnection::getACParametersMap(), GNECrossing::getACParametersMap(), GNEEdge::getACParametersMap(), GNEEdgeType::getACParametersMap(), GNEJunction::getACParametersMap(), GNELane::getACParametersMap(), GNELaneType::getACParametersMap(), GNEPOI::getACParametersMap(), GNEPoly::getACParametersMap(), MSRailSignalConstraint_Predecessor::getDescription(), NWWriter_OpenDrive::getDividerType(), GUILane::getParameterWindow(), GNESingleParametersDialog::GNESingleParametersDialog(), MSRailCrossing::init(), MSActuatedTrafficLightLogic::init(), MSDevice_Taxi::initDispatch(), MSPModel_JuPedSim::initialize(), MSBaseVehicle::initTransientModelParams(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), GNEEdgeData::isGenericDataVisible(), GNEEdgeRelData::isGenericDataVisible(), GNETAZRelData::isGenericDataVisible(), GNEGenericData::isVisibleInspectDeleteSelect(), NBEdge::NBEdge(), NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), NBTrafficLightLogic::NBTrafficLightLogic(), GUIParameterTableWindow::numParams(), GNESingleParametersDialog::onCmdReset(), GNEVType::overwriteVType(), TraCIServerAPI_TrafficLight::processGet(), Parameterised::setParameters(), LIBSUMO_NAMESPACE::TrafficLight::swapConstraints(), GNEEdgeData::writeGenericData(), GNEEdgeRelData::writeGenericData(), and GNETAZRelData::writeGenericData().

◆ getParametersStr()

std::string Parameterised::getParametersStr ( const std::string  kvsep = "=",
const std::string  sep = "|" 
) const
inherited

◆ getReservations()

std::vector< Reservation * > MSDispatch::getReservations ( )
inherited

retrieve all reservations

Definition at line 226 of file MSDispatch.cpp.

References MSDispatch::myGroupReservations.

Referenced by MSDispatch_Greedy::computeDispatch(), MSDispatch_GreedyClosest::computeDispatch(), and LIBSUMO_NAMESPACE::Person::getTaxiReservations().

Here is the caller graph for this function:

◆ getRunningReservations()

std::vector< const Reservation * > MSDispatch::getRunningReservations ( )
virtualinherited

retrieve all reservations that were already dispatched and are still active

Definition at line 236 of file MSDispatch.cpp.

References MSDispatch::myRunningReservations.

Referenced by LIBSUMO_NAMESPACE::Person::getTaxiReservations().

Here is the caller graph for this function:

◆ hasParameter()

bool Parameterised::hasParameter ( const std::string &  key) const
inherited

Returns whether the parameter is set.

Parameters
[in]keyThe key to ask for
Returns
Whether the key is known

Definition at line 84 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSStageWalking::activateEntryReminders(), NBEdge::append(), MSVehicleType::build(), GUIInductLoop::buildDetectorGUIRepresentation(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), GUINet::createTLWrapper(), EnergyParams::EnergyParams(), MSDevice_SSM::filterByConflictType(), NWWriter_DlrNavteq::getBrunnelType(), GNEEdgeData::getColorValue(), GNEEdgeRelData::getColorValue(), GNETAZRelData::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_SSM::getOutputFilename(), LIBSUMO_NAMESPACE::Simulation::getParameter(), MSStoppingPlaceRerouter::getWeight(), MSStageDriving::init(), SUMOVTypeParameter::initRailVisualizationParameters(), MSEdge::insertVehicle(), NIImporter_OpenStreetMap::load(), NWWriter_OpenDrive::mapmatchRoadObjects(), Parameterised::mergeParameters(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic(), GNEVType::overwriteVType(), NWWriter_OpenDrive::parseTrafficSign(), NBTrafficLightDefinition::railSignalUncontrolled(), MSDevice_Battery::readParameterValue(), MSDevice_SSM::requestsTrajectories(), NBTrafficLightLogicCont::setOpenDriveSignalParameters(), MSVehicle::slowDownForSchedule(), MSDevice_SSM::useGeoCoords(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::WAUTSwitchProcedure_Stretch(), MSDevice_SSM::writeLanesPositions(), MSDevice_SSM::writePositions(), NWWriter_OpenDrive::writeRoadObjectPoly(), NWWriter_OpenDrive::writeRoadObjects(), and NWWriter_OpenDrive::writeSignals().

Here is the caller graph for this function:

◆ hasServableReservations()

bool MSDispatch::hasServableReservations ( )
inlineinherited

check whether there are still (servable) reservations in the system

Definition at line 174 of file MSDispatch.h.

References MSDispatch::myHasServableReservations.

Referenced by MSDevice_Taxi::hasServableReservations().

Here is the caller graph for this function:

◆ interpretDispatch()

void MSDispatch_TraCI::interpretDispatch ( MSDevice_Taxi taxi,
const std::vector< std::string > &  reservationsIDs 
)

trigger taxi dispatch.

Note
: method exists so subclasses can inject code at this point (ride sharing)

Definition at line 80 of file MSDispatch_TraCI.cpp.

References MSDevice_Taxi::dispatch(), MSDevice_Taxi::dispatchShared(), StringBijection< T >::get(), StringBijection< T >::hasString(), myReservationLookup, and MSDispatch::servedReservation().

Referenced by LIBSUMO_NAMESPACE::Vehicle::dispatchTaxi().

Here is the caller graph for this function:

◆ isParameterValid()

bool Parameterised::isParameterValid ( const std::string &  value,
const std::string &  kvsep,
const std::string &  sep 
)
staticprivateinherited

check if given string can be parsed to a parameter of type "key=value"

Definition at line 254 of file Parameterised.cpp.

References StringTokenizer::getVector(), and SUMOXMLDefinitions::isValidParameterKey().

Referenced by Parameterised::areAttributesValid(), and Parameterised::areParametersValid().

Here is the caller graph for this function:

◆ mergeParameters()

void Parameterised::mergeParameters ( const Parameterised::Map mapArg,
const std::string  separator = " ",
bool  uniqueValues = true 
)
inherited

Adds or appends all given parameters from the map.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 65 of file Parameterised.cpp.

References Parameterised::getParameter(), Parameterised::hasParameter(), and Parameterised::setParameter().

Referenced by NBEdge::append().

Here is the caller graph for this function:

◆ operator=()

MSDispatch_TraCI & MSDispatch_TraCI::operator= ( const MSDispatch_TraCI )
privatedelete

Invalidated assignment operator.

◆ remainingCapacity()

int MSDispatch::remainingCapacity ( const MSDevice_Taxi taxi,
const Reservation res 
)
protectedinherited

whether the given taxi has sufficient capacity to serve the reservation

Definition at line 316 of file MSDispatch.cpp.

References MSVehicleType::getContainerCapacity(), MSVehicleDevice::getHolder(), MSVehicleType::getPersonCapacity(), SUMOTrafficObject::getVehicleType(), and Reservation::persons.

Referenced by MSDispatch_Greedy::computeDispatch(), MSDispatch_GreedyClosest::computeDispatch(), MSDispatch_GreedyShared::dispatch(), and MSDispatch_RouteExtension::dispatch().

Here is the caller graph for this function:

◆ removeReservation()

std::string MSDispatch_TraCI::removeReservation ( MSTransportable person,
const MSEdge from,
double  fromPos,
const MSEdge to,
double  toPos,
std::string  group 
)
overridevirtual

remove person from reservation. If the whole reservation is removed, return its id

Reimplemented from MSDispatch.

Definition at line 59 of file MSDispatch_TraCI.cpp.

References StringBijection< T >::get(), StringBijection< T >::hasString(), myReservationLookup, StringBijection< T >::remove(), and MSDispatch::removeReservation().

◆ servedReservation()

void MSDispatch::servedReservation ( const Reservation res)
protectedinherited

Definition at line 242 of file MSDispatch.cpp.

References Reservation::ASSIGNED, Reservation::group, MSDispatch::myGroupReservations, MSDispatch::myRunningReservations, Reservation::state, and TL.

Referenced by MSDispatch_Greedy::dispatch(), MSDispatch_GreedyShared::dispatch(), MSDispatch_RouteExtension::dispatch(), and interpretDispatch().

Here is the caller graph for this function:

◆ setParameter()

void Parameterised::setParameter ( const std::string &  key,
const std::string &  value 
)
virtualinherited

Sets a parameter.

Parameters
[in]keyThe parameter's name
[in]valueThe parameter's value

Reimplemented in MSRailCrossing, MSActuatedTrafficLightLogic, MSRailSignal, MSSimpleTrafficLightLogic, and NEMALogic.

Definition at line 45 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdge(), NLHandler::addDistrict(), RONetHandler::addParam(), ShapeHandler::addPOI(), NBOwnTLDef::buildNemaPhases(), MSParkingArea::enter(), NIImporter_MATSim::EdgesHandler::insertEdge(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), MSLane::isInsertionSuccess(), NBNodeCont::joinNodeCluster(), NBEdge::Lane::Lane(), NWWriter_OpenDrive::mapmatchRoadObjects(), Parameterised::mergeParameters(), MSStateHandler::myStartElement(), NIXMLConnectionsHandler::myStartElement(), NIXMLNodesHandler::myStartElement(), NIXMLTrafficLightsHandler::myStartElement(), ShapeHandler::myStartElement(), MSDevice_Bluelight::notifyMove(), GNESingleParametersDialog::onCmdAccept(), NBRailwayTopologyAnalyzer::reverseEdges(), GNEVType::setAttribute(), NBEdge::setJunctionPriority(), NIImporter_OpenDrive::setLaneAttributes(), MSRailCrossing::setParameter(), MSActuatedTrafficLightLogic::setParameter(), MSRailSignal::setParameter(), MSSimpleTrafficLightLogic::setParameter(), NEMALogic::setParameter(), LIBSUMO_NAMESPACE::Simulation::setParameter(), Parameterised::setParametersStr(), LIBSUMO_NAMESPACE::Vehicle::setStopParameter(), LIBSUMO_NAMESPACE::TrafficLight::swapParameters(), Parameterised::updateParameters(), NWWriter_OpenDrive::writeNetwork(), and NIImporter_OpenDrive::writeRoadObjects().

Here is the caller graph for this function:

◆ setParameters()

void Parameterised::setParameters ( const Parameterised params)
inherited

set the inner key/value map in map<string, string> format

Definition at line 167 of file Parameterised.cpp.

References Parameterised::getParametersMap(), and Parameterised::myMap.

Referenced by MSStageDriving::clone(), MSStageTranship::clone(), MSStageTrip::clone(), MSStageWaiting::clone(), MSStageWalking::clone(), and MSStageTrip::reroute().

Here is the caller graph for this function:

◆ setParametersStr()

void Parameterised::setParametersStr ( const std::string &  paramsString,
const std::string  kvsep = "=",
const std::string  sep = "|" 
)
inherited

set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"

Parameters
[in]paramsStringA serialized key-value map
[in]kvsepThe separater between key and value
[in]sepThe separater between map entries

Definition at line 173 of file Parameterised.cpp.

References StringTokenizer::getVector(), Parameterised::myMap, and Parameterised::setParameter().

Referenced by MSDevice_Taxi::initDispatch(), GNEAccess::setAttribute(), GNEBusStop::setAttribute(), GNECalibrator::setAttribute(), GNECalibratorFlow::setAttribute(), GNEChargingStation::setAttribute(), GNEContainerStop::setAttribute(), GNEMultiEntryExitDetector::setAttribute(), GNEOverheadWire::setAttribute(), GNEParkingArea::setAttribute(), GNEParkingSpace::setAttribute(), GNERerouter::setAttribute(), GNERouteProbe::setAttribute(), GNETAZ::setAttribute(), GNETAZSourceSink::setAttribute(), GNETractionSubstation::setAttribute(), GNEVaporizer::setAttribute(), GNEVariableSpeedSign::setAttribute(), GNEEdgeData::setAttribute(), GNEEdgeRelData::setAttribute(), GNETAZRelData::setAttribute(), GNEContainer::setAttribute(), GNEPerson::setAttribute(), GNERoute::setAttribute(), GNEStop::setAttribute(), GNEVehicle::setAttribute(), GNEVType::setAttribute(), GNEConnection::setAttribute(), GNEEdge::setAttribute(), GNEEdgeType::setAttribute(), GNEJunction::setAttribute(), GNELane::setAttribute(), GNELaneType::setAttribute(), GNEPOI::setAttribute(), GNEPoly::setAttribute(), and GNEDetector::setDetectorAttribute().

Here is the caller graph for this function:

◆ splitReservation()

std::string MSDispatch_TraCI::splitReservation ( std::string  resID,
std::vector< std::string >  personIDs 
)

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 51 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_OpenStreetMap::insertEdge(), MSLane::isInsertionSuccess(), NIImporter_OpenStreetMap::load(), GNEVType::setAttribute(), and LIBSUMO_NAMESPACE::TrafficLight::swapParameters().

Here is the caller graph for this function:

◆ updateParameters()

void Parameterised::updateParameters ( const Parameterised::Map mapArg)
inherited

◆ updateReservationFromPos()

Reservation * MSDispatch::updateReservationFromPos ( MSTransportable person,
const MSEdge from,
double  fromPos,
const MSEdge to,
double  toPos,
std::string  group,
double  newFromPos 
)
virtualinherited

update fromPos of the person's reservation. TODO: if there is already a reservation with the newFromPos, add to this reservation TODO: if there are other persons in this reservation, create a new reservation for the updated one

Definition at line 181 of file MSDispatch.cpp.

References DEBUG_COND2, Reservation::from, Reservation::fromPos, Named::getID(), Reservation::id, MSDispatch::myGroupReservations, Reservation::persons, SIMTIME, Reservation::to, and Reservation::toPos.

Referenced by MSDevice_Taxi::updateReservationFromPos().

Here is the caller graph for this function:

◆ writeParams()

void Parameterised::writeParams ( OutputDevice device) const
inherited

write Params in the given outputdevice

Definition at line 188 of file Parameterised.cpp.

References OutputDevice::closeTag(), StringUtils::escapeXML(), Parameterised::myMap, OutputDevice::openTag(), SUMO_ATTR_KEY, SUMO_ATTR_VALUE, SUMO_TAG_PARAM, and OutputDevice::writeAttr().

Referenced by MSStageWaiting::routeOutput(), MSTransportable::routeOutput(), ROPerson::saveAsXML(), ROVehicle::saveAsXML(), MEVehicle::saveState(), MSVehicle::saveState(), MSStop::write(), SUMOVTypeParameter::write(), SUMOVehicleParameter::Stop::write(), NBPTStop::write(), MSRailSignalConstraint_Predecessor::write(), GNEBusStop::writeAdditional(), GNECalibrator::writeAdditional(), GNECalibratorFlow::writeAdditional(), GNEChargingStation::writeAdditional(), GNEContainerStop::writeAdditional(), GNEEntryExitDetector::writeAdditional(), GNEInductionLoopDetector::writeAdditional(), GNEInstantInductionLoopDetector::writeAdditional(), GNELaneAreaDetector::writeAdditional(), GNEMultiEntryExitDetector::writeAdditional(), GNEOverheadWire::writeAdditional(), GNEParkingArea::writeAdditional(), GNEParkingSpace::writeAdditional(), GNERerouter::writeAdditional(), GNERouteProbe::writeAdditional(), GNETAZ::writeAdditional(), GNETractionSubstation::writeAdditional(), GNEVaporizer::writeAdditional(), GNEVariableSpeedSign::writeAdditional(), NWWriter_SUMO::writeConnection(), GNEContainer::writeDemandElement(), GNEPerson::writeDemandElement(), GNERoute::writeDemandElement(), GNEVehicle::writeDemandElement(), NWWriter_SUMO::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeJunction(), NWWriter_SUMO::writeLane(), NWWriter_XML::writeNodes(), MSDevice_Vehroutes::writeOutput(), NWWriter_SUMO::writeTrafficLight(), SUMOPolygon::writeXML(), and PointOfInterest::writeXML().

Here is the caller graph for this function:

Field Documentation

◆ myGroupReservations

std::map<std::string, std::vector<Reservation*> > MSDispatch::myGroupReservations
protectedinherited

◆ myHasServableReservations

bool MSDispatch::myHasServableReservations = false
inherited

whether the last call to computeDispatch has left servable reservations

Definition at line 191 of file MSDispatch.h.

Referenced by MSDispatch::addReservation(), MSDispatch_Greedy::computeDispatch(), MSDispatch_GreedyClosest::computeDispatch(), and MSDispatch::hasServableReservations().

◆ myMap

◆ myOutput

OutputDevice* MSDispatch::myOutput
protectedinherited

optional file output for dispatch information

Definition at line 203 of file MSDispatch.h.

Referenced by MSDispatch_GreedyShared::dispatch(), MSDispatch_RouteExtension::dispatch(), and MSDispatch::MSDispatch().

◆ myReservationCount

int MSDispatch::myReservationCount
protectedinherited

Definition at line 205 of file MSDispatch.h.

Referenced by MSDispatch::addReservation(), and splitReservation().

◆ myReservationLookup

StringBijection<const Reservation*> MSDispatch_TraCI::myReservationLookup
private

◆ myRunningReservations

std::set<const Reservation*> MSDispatch::myRunningReservations
protectedinherited

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