Eclipse SUMO - Simulation of Urban MObility
MSSOTLPolicy5DStimulus Class Reference

#include <MSSOTLPolicy5DStimulus.h>

Inheritance diagram for MSSOTLPolicy5DStimulus:
Collaboration diagram for MSSOTLPolicy5DStimulus:

Public Member Functions

void clearParameter ()
 Clears the parameter map. More...
 
virtual double computeDesirability (double vehInMeasure, double vehOutMeasure)
 Computes stimulus function stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);. More...
 
virtual double computeDesirability (double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure)
 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 ()
 
std::string getMessage ()
 
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...
 
std::string getParametersStr () const
 Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN". More...
 
double getStimCox ()
 
double getStimCoxExpDispersionIn ()
 
double getStimCoxExpDispersionOut ()
 
double getStimCoxExpIn ()
 
double getStimCoxExpOut ()
 
double getStimDivisorDispersionIn ()
 
double getStimDivisorDispersionOut ()
 
double getStimDivisorIn ()
 
double getStimDivisorOut ()
 
double getStimOffsetDispersionIn ()
 
double getStimOffsetDispersionOut ()
 
double getStimOffsetIn ()
 
double getStimOffsetOut ()
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
 MSSOTLPolicy5DStimulus (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 setParameters (const Parameterised &params)
 set the inner key/value map in map<string, string> format More...
 
void setParametersMap (const std::map< std::string, std::string > &paramsMap)
 set the inner key/value map in map<string, string> format More...
 
void setParametersStr (const std::string &paramsString)
 set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN" More...
 
void setStimCoxDefVal (double defVal)
 
void setStimCoxExpDispersionInDefVal (double defVal)
 
void setStimCoxExpDispersionOutDefVal (double defVal)
 
void setStimCoxExpInDefVal (double defVal)
 
void setStimCoxExpOutDefVal (double defVal)
 
void setStimDivisorDispersionInDefVal (double defVal)
 
void setStimDivisorDispersionOutDefVal (double defVal)
 
void setStimDivisorInDefVal (double defVal)
 
void setStimDivisorOutDefVal (double defVal)
 
void setStimOffsetDispersionInDefVal (double defVal)
 
void setStimOffsetDispersionOutDefVal (double defVal)
 
void setStimOffsetInDefVal (double defVal)
 
void setStimOffsetOutDefVal (double defVal)
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameters (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...
 

Static Public Member Functions

static bool areParametersValid (const std::string &value, bool report=false)
 check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN" More...
 

Static Private Member Functions

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

Private Attributes

std::string myKeyPrefix
 
std::map< std::string, std::string > myMap
 The key->value map. More...
 
double stimCoxDVal
 
double stimCoxExpDispersionInDVal
 
double stimCoxExpDispersionOutDVal
 
double stimCoxExpInDVal
 
double stimCoxExpOutDVal
 
double stimDivDispersionInDVal
 
double stimDivDispersionOutDVal
 
double stimDivInDVal
 
double stimDivOutDVal
 
double stimOffsetDispersionInDVal
 
double stimOffsetDispersionOutDVal
 
double stimOffsetInDVal
 
double stimOffsetOutDVal
 

Detailed Description

Definition at line 40 of file MSSOTLPolicy5DStimulus.h.

Constructor & Destructor Documentation

◆ MSSOTLPolicy5DStimulus()

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

Member Function Documentation

◆ areParametersValid()

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 100 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::beginEdgeParsing(), and GNERouteHandler::closeRoute().

◆ computeDesirability() [1/2]

double MSSOTLPolicy5DStimulus::computeDesirability ( double  vehInMeasure,
double  vehOutMeasure 
)
virtual

Computes stimulus function stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);.

Implements MSSOTLPolicyDesirability.

Definition at line 77 of file MSSOTLPolicy5DStimulus.cpp.

◆ computeDesirability() [2/2]

double MSSOTLPolicy5DStimulus::computeDesirability ( double  vehInMeasure,
double  vehOutMeasure,
double  vehInDispersionMeasure,
double  vehOutDispersionMeasure 
)
virtual

◆ 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 Parameterised::myMap, StringUtils::toDouble(), and WRITE_WARNING.

Referenced by MSDevice_Battery::buildVehicleDevices(), getStimCox(), getStimCoxExpDispersionIn(), getStimCoxExpDispersionOut(), getStimCoxExpIn(), getStimCoxExpOut(), getStimDivisorDispersionIn(), getStimDivisorDispersionOut(), getStimDivisorIn(), getStimDivisorOut(), getStimOffsetDispersionIn(), getStimOffsetDispersionOut(), getStimOffsetIn(), getStimOffsetOut(), and MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus().

◆ getKeyPrefix()

◆ getMessage()

std::string MSSOTLPolicy5DStimulus::getMessage ( )
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 NBEdge::addRestrictedLane(), FareModul::addStop(), NBEdge::append(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), ROEdge::cacheParamRestrictions(), SUMOVTypeParameter::cacheParamRestrictions(), GNEEdge::drawEdgeName(), GUIEdge::drawGL(), GNEConnection::drawGL(), GUIBaseVehicle::drawOnPos(), libsumo::Simulation::findIntermodalRoute(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSwarmTrafficLightLogic::getChangePlanProbability(), GUILane::getColorValue(), GUIVehicle::getColorValue(), GNELane::getColorValue(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), GUIBaseVehicle::getOptionalName(), GUIJunctionWrapper::getOptionalName(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::Simulation::getParameter(), libsumo::POI::getParameter(), libsumo::Polygon::getParameter(), libsumo::Person::getParameter(), libsumo::Route::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), MSSwarmTrafficLightLogic::getPheroMaxVal(), MSSwarmTrafficLightLogic::getPoliciesParam(), MSSwarmTrafficLightLogic::getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), MSSOTLPhasePolicy::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), PushButtonLogic::init(), SigmoidLogic::init(), MSVehicleType::initRailVisualizationParameters(), GNEVehicleType::initRailVisualizationParameters(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), GNEVehicleType::overwriteVType(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSDevice_SSM::useGeoCoords(), NWWriter_DlrNavteq::writeLinksUnsplitted(), and NWWriter_OpenDrive::writeRoadObjects().

◆ getParametersMap()

◆ getParametersStr()

◆ getStimCox()

double MSSOTLPolicy5DStimulus::getStimCox ( )
inline

◆ getStimCoxExpDispersionIn()

double MSSOTLPolicy5DStimulus::getStimCoxExpDispersionIn ( )
inline

◆ getStimCoxExpDispersionOut()

double MSSOTLPolicy5DStimulus::getStimCoxExpDispersionOut ( )
inline

◆ getStimCoxExpIn()

double MSSOTLPolicy5DStimulus::getStimCoxExpIn ( )
inline

◆ getStimCoxExpOut()

double MSSOTLPolicy5DStimulus::getStimCoxExpOut ( )
inline

◆ getStimDivisorDispersionIn()

double MSSOTLPolicy5DStimulus::getStimDivisorDispersionIn ( )
inline

◆ getStimDivisorDispersionOut()

double MSSOTLPolicy5DStimulus::getStimDivisorDispersionOut ( )
inline

◆ getStimDivisorIn()

double MSSOTLPolicy5DStimulus::getStimDivisorIn ( )
inline

◆ getStimDivisorOut()

double MSSOTLPolicy5DStimulus::getStimDivisorOut ( )
inline

◆ getStimOffsetDispersionIn()

double MSSOTLPolicy5DStimulus::getStimOffsetDispersionIn ( )
inline

◆ getStimOffsetDispersionOut()

double MSSOTLPolicy5DStimulus::getStimOffsetDispersionOut ( )
inline

◆ getStimOffsetIn()

double MSSOTLPolicy5DStimulus::getStimOffsetIn ( )
inline

◆ getStimOffsetOut()

double MSSOTLPolicy5DStimulus::getStimOffsetOut ( )
inline

◆ isParameterValid()

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

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

Definition at line 189 of file Parameterised.cpp.

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

Referenced by Parameterised::areParametersValid().

◆ knowsParameter()

◆ setKeyPrefix()

◆ setParameter()

◆ setParameters()

void Parameterised::setParameters ( const Parameterised params)
inherited

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

Definition at line 127 of file Parameterised.cpp.

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

◆ setParametersMap()

void Parameterised::setParametersMap ( const std::map< std::string, std::string > &  paramsMap)
inherited

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

Definition at line 133 of file Parameterised.cpp.

References Parameterised::myMap.

◆ setParametersStr()

void Parameterised::setParametersStr ( const std::string &  paramsString)
inherited

◆ setStimCoxDefVal()

void MSSOTLPolicy5DStimulus::setStimCoxDefVal ( double  defVal)
inline

Definition at line 57 of file MSSOTLPolicy5DStimulus.h.

References stimCoxDVal.

◆ setStimCoxExpDispersionInDefVal()

void MSSOTLPolicy5DStimulus::setStimCoxExpDispersionInDefVal ( double  defVal)
inline

◆ setStimCoxExpDispersionOutDefVal()

void MSSOTLPolicy5DStimulus::setStimCoxExpDispersionOutDefVal ( double  defVal)
inline

◆ setStimCoxExpInDefVal()

void MSSOTLPolicy5DStimulus::setStimCoxExpInDefVal ( double  defVal)
inline

Definition at line 128 of file MSSOTLPolicy5DStimulus.h.

References stimCoxExpInDVal.

◆ setStimCoxExpOutDefVal()

void MSSOTLPolicy5DStimulus::setStimCoxExpOutDefVal ( double  defVal)
inline

Definition at line 135 of file MSSOTLPolicy5DStimulus.h.

References stimCoxExpOutDVal.

◆ setStimDivisorDispersionInDefVal()

void MSSOTLPolicy5DStimulus::setStimDivisorDispersionInDefVal ( double  defVal)
inline

Definition at line 113 of file MSSOTLPolicy5DStimulus.h.

References stimDivDispersionInDVal.

◆ setStimDivisorDispersionOutDefVal()

void MSSOTLPolicy5DStimulus::setStimDivisorDispersionOutDefVal ( double  defVal)
inline

Definition at line 121 of file MSSOTLPolicy5DStimulus.h.

References stimDivDispersionOutDVal.

◆ setStimDivisorInDefVal()

void MSSOTLPolicy5DStimulus::setStimDivisorInDefVal ( double  defVal)
inline

Definition at line 95 of file MSSOTLPolicy5DStimulus.h.

References stimDivInDVal.

◆ setStimDivisorOutDefVal()

void MSSOTLPolicy5DStimulus::setStimDivisorOutDefVal ( double  defVal)
inline

Definition at line 104 of file MSSOTLPolicy5DStimulus.h.

References stimDivOutDVal.

◆ setStimOffsetDispersionInDefVal()

void MSSOTLPolicy5DStimulus::setStimOffsetDispersionInDefVal ( double  defVal)
inline

Definition at line 80 of file MSSOTLPolicy5DStimulus.h.

References stimOffsetDispersionInDVal.

◆ setStimOffsetDispersionOutDefVal()

void MSSOTLPolicy5DStimulus::setStimOffsetDispersionOutDefVal ( double  defVal)
inline

Definition at line 87 of file MSSOTLPolicy5DStimulus.h.

References stimOffsetDispersionOutDVal.

◆ setStimOffsetInDefVal()

void MSSOTLPolicy5DStimulus::setStimOffsetInDefVal ( double  defVal)
inline

Definition at line 64 of file MSSOTLPolicy5DStimulus.h.

References stimOffsetInDVal.

◆ setStimOffsetOutDefVal()

void MSSOTLPolicy5DStimulus::setStimOffsetOutDefVal ( double  defVal)
inline

Definition at line 72 of file MSSOTLPolicy5DStimulus.h.

References stimOffsetOutDVal.

◆ unsetParameter()

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

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 52 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_OpenStreetMap::insertEdge(), and GNEVehicleType::setAttribute().

◆ updateParameters()

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

◆ writeParams()

Field Documentation

◆ myKeyPrefix

std::string MSSOTLPolicyDesirability::myKeyPrefix
privateinherited

◆ myMap

◆ stimCoxDVal

double MSSOTLPolicy5DStimulus::stimCoxDVal
private

Definition at line 44 of file MSSOTLPolicy5DStimulus.h.

Referenced by getStimCox(), MSSOTLPolicy5DStimulus(), and setStimCoxDefVal().

◆ stimCoxExpDispersionInDVal

double MSSOTLPolicy5DStimulus::stimCoxExpDispersionInDVal
private

◆ stimCoxExpDispersionOutDVal

double MSSOTLPolicy5DStimulus::stimCoxExpDispersionOutDVal
private

◆ stimCoxExpInDVal

double MSSOTLPolicy5DStimulus::stimCoxExpInDVal
private

◆ stimCoxExpOutDVal

double MSSOTLPolicy5DStimulus::stimCoxExpOutDVal
private

◆ stimDivDispersionInDVal

double MSSOTLPolicy5DStimulus::stimDivDispersionInDVal
private

◆ stimDivDispersionOutDVal

double MSSOTLPolicy5DStimulus::stimDivDispersionOutDVal
private

◆ stimDivInDVal

double MSSOTLPolicy5DStimulus::stimDivInDVal
private

◆ stimDivOutDVal

double MSSOTLPolicy5DStimulus::stimDivOutDVal
private

◆ stimOffsetDispersionInDVal

double MSSOTLPolicy5DStimulus::stimOffsetDispersionInDVal
private

◆ stimOffsetDispersionOutDVal

double MSSOTLPolicy5DStimulus::stimOffsetDispersionOutDVal
private

◆ stimOffsetInDVal

double MSSOTLPolicy5DStimulus::stimOffsetInDVal
private

◆ stimOffsetOutDVal

double MSSOTLPolicy5DStimulus::stimOffsetOutDVal
private

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