SUMO - Simulation of Urban MObility
MSSOTLPolicyDesirability Class Referenceabstract

This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a high level policy. More...

#include <MSSOTLPolicyDesirability.h>

Inheritance diagram for MSSOTLPolicyDesirability:
Inheritance graph
Collaboration diagram for MSSOTLPolicyDesirability:
Collaboration graph

Public Member Functions

void clearParameter ()
 Clears the parameter map. More...
 
virtual double computeDesirability (double vehInMeasure, double vehOutMeasure)=0
 Calculates the desirability of the policy. More...
 
virtual double computeDesirability (double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure)=0
 Calculates the desirability of the policy. More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
std::string getKeyPrefix ()
 
virtual std::string getMessage ()=0
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
const std::map< std::string, std::string > & getParametersMap () const
 Returns the inner key/value map. More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
 MSSOTLPolicyDesirability (std::string keyPrefix, const std::map< std::string, std::string > &parameters)
 
void setKeyPrefix (std::string val)
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void writeParams (OutputDevice &device) const
 write Params in the given outputdevice More...
 
virtual ~MSSOTLPolicyDesirability ()
 

Protected Member Functions

double readParameter (std::string parName, double defValue)
 

Private Attributes

std::string myKeyPrefix
 

Detailed Description

This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a high level policy.

Definition at line 36 of file MSSOTLPolicyDesirability.h.

Constructor & Destructor Documentation

◆ MSSOTLPolicyDesirability()

MSSOTLPolicyDesirability::MSSOTLPolicyDesirability ( std::string  keyPrefix,
const std::map< std::string, std::string > &  parameters 
)

Definition at line 20 of file MSSOTLPolicyDesirability.cpp.

Referenced by readParameter().

◆ ~MSSOTLPolicyDesirability()

MSSOTLPolicyDesirability::~MSSOTLPolicyDesirability ( )
virtual

Definition at line 26 of file MSSOTLPolicyDesirability.cpp.

Referenced by readParameter().

Member Function Documentation

◆ clearParameter()

◆ computeDesirability() [1/2]

virtual double MSSOTLPolicyDesirability::computeDesirability ( double  vehInMeasure,
double  vehOutMeasure 
)
pure virtual

Calculates the desirability of the policy.

Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.

Referenced by MSSOTLPolicy::computeDesirability(), and readParameter().

◆ computeDesirability() [2/2]

virtual double MSSOTLPolicyDesirability::computeDesirability ( double  vehInMeasure,
double  vehOutMeasure,
double  vehInDispersionMeasure,
double  vehOutDispersionMeasure 
)
pure virtual

Calculates the desirability of the policy.

Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.

◆ getDouble()

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

Returns the value for a given key converted to a double.

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 82 of file Parameterised.cpp.

References TplConvert::_2double(), Parameterised::myMap, and WRITE_WARNING.

Referenced by MSDevice_Battery::buildVehicleDevices().

◆ getKeyPrefix()

◆ getMessage()

virtual std::string MSSOTLPolicyDesirability::getMessage ( )
pure virtual

◆ getParameter()

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

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

Definition at line 72 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdge::addRestrictedLane(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice::equippedByParameter(), libsumo::Simulation::findIntermodalRoute(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Polygon::getParameter(), libsumo::Route::getParameter(), libsumo::POI::getParameter(), libsumo::Person::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_OpenStreetMap::insertEdge(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), MSTriggeredRerouter::notifyEnter(), readParameter(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), GNECrossing::updateGenericParameter(), GNEConnection::updateGenericParameter(), GNEPoly::updateGenericParameter(), GNEPOI::updateGenericParameter(), GNELane::updateGenericParameter(), GNEJunction::updateGenericParameter(), GNEEdge::updateGenericParameter(), GNEAdditional::updateGenericParameter(), MSDevice_SSM::useGeoCoords(), and NWWriter_DlrNavteq::writeLinksUnsplitted().

◆ getParametersMap()

◆ knowsParameter()

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

Returns whether the parameter is known.

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

Definition at line 66 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by GNEPoly::addGenericParameter(), GNELane::addGenericParameter(), GNEPOI::addGenericParameter(), GNEJunction::addGenericParameter(), GNEEdge::addGenericParameter(), GNEAdditional::addGenericParameter(), NBEdge::append(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice::equippedByParameter(), MSDevice::getBoolParam(), NWWriter_DlrNavteq::getBrunnelType(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_SSM::getOutputFilename(), MSDevice::getStringParam(), MSTriggeredRerouter::getWeight(), GNEPoly::removeGenericParameter(), GNEPOI::removeGenericParameter(), GNELane::removeGenericParameter(), GNEJunction::removeGenericParameter(), GNEEdge::removeGenericParameter(), GNEAdditional::removeGenericParameter(), MSDevice_SSM::requestsTrajectories(), GNEPoly::updateGenericParameter(), GNEPOI::updateGenericParameter(), GNELane::updateGenericParameter(), GNEJunction::updateGenericParameter(), GNEEdge::updateGenericParameter(), GNEAdditional::updateGenericParameter(), GNEPoly::updateGenericParameterValue(), GNELane::updateGenericParameterValue(), GNEPOI::updateGenericParameterValue(), GNEJunction::updateGenericParameterValue(), GNEEdge::updateGenericParameterValue(), GNEAdditional::updateGenericParameterValue(), and MSDevice_SSM::useGeoCoords().

◆ readParameter()

◆ setKeyPrefix()

◆ setParameter()

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

Sets a parameter.

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

Definition at line 46 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by GNECrossing::addGenericParameter(), GNEConnection::addGenericParameter(), GNEPoly::addGenericParameter(), GNELane::addGenericParameter(), GNEPOI::addGenericParameter(), GNEJunction::addGenericParameter(), GNEEdge::addGenericParameter(), GNEAdditional::addGenericParameter(), SUMORouteHandler::addParam(), NLHandler::addParam(), ShapeHandler::addPOI(), NIImporter_OpenStreetMap::insertNodeChecking(), NBEdge::Lane::Lane(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIXMLTrafficLightsHandler::myStartElement(), MSStateHandler::myStartElement(), ShapeHandler::myStartElement(), NIXMLNodesHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), GNEAdditionalHandler::parseGenericParameter(), GNEConnection::setGenericParametersStr(), GNEPoly::setGenericParametersStr(), GNELane::setGenericParametersStr(), GNEPOI::setGenericParametersStr(), GNEJunction::setGenericParametersStr(), GNEEdge::setGenericParametersStr(), GNEAdditional::setGenericParametersStr(), libsumo::Route::setParameter(), libsumo::Polygon::setParameter(), libsumo::POI::setParameter(), libsumo::TrafficLight::setParameter(), libsumo::Edge::setParameter(), libsumo::Lane::setParameter(), GNEConnection::updateGenericParameter(), GNEPoly::updateGenericParameter(), GNELane::updateGenericParameter(), GNEPOI::updateGenericParameter(), GNEJunction::updateGenericParameter(), GNEEdge::updateGenericParameter(), GNEAdditional::updateGenericParameter(), GNECrossing::updateGenericParameterValue(), GNEConnection::updateGenericParameterValue(), GNEPoly::updateGenericParameterValue(), GNELane::updateGenericParameterValue(), GNEPOI::updateGenericParameterValue(), GNEJunction::updateGenericParameterValue(), GNEEdge::updateGenericParameterValue(), and GNEAdditional::updateGenericParameterValue().

◆ unsetParameter()

◆ updateParameter()

void Parameterised::updateParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

◆ writeParams()

Field Documentation

◆ myKeyPrefix

std::string MSSOTLPolicyDesirability::myKeyPrefix
private

Definition at line 39 of file MSSOTLPolicyDesirability.h.

Referenced by getKeyPrefix().


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