![]() |
SUMO - Simulation of Urban MObility
|
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a high level policy. More...
#include <MSSOTLPolicyDesirability.h>
Public Member Functions | |
void | addParameter (const std::string &key, const std::string &value) |
Adds a parameter. More... | |
void | addParameter (const std::map< std::string, std::string > &mapArg) |
Adds all given parameter. More... | |
void | addParameter (const Parameterised &p) |
Adds all given parameter. More... | |
void | clearParameter () |
Clears the parameter map. More... | |
virtual SUMOReal | computeDesirability (SUMOReal vehInMeasure, SUMOReal vehOutMeasure)=0 |
Calculates the desirability of the policy. More... | |
virtual SUMOReal | computeDesirability (SUMOReal vehInMeasure, SUMOReal vehOutMeasure, SUMOReal vehInDispersionMeasure, SUMOReal vehOutDispersionMeasure)=0 |
Calculates the desirability of the policy. More... | |
std::string | getKeyPrefix () |
const std::map< std::string, std::string > & | getMap () const |
Returns the inner key/value map. More... | |
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... | |
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 > ¶meters) | |
void | setKeyPrefix (std::string val) |
virtual | ~MSSOTLPolicyDesirability () |
Protected Member Functions | |
SUMOReal | readParameter (std::string parName, SUMOReal defValue) |
Private Attributes | |
std::string | myKeyPrefix |
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a high level policy.
Definition at line 43 of file MSSOTLPolicyDesirability.h.
MSSOTLPolicyDesirability::MSSOTLPolicyDesirability | ( | std::string | keyPrefix, |
const std::map< std::string, std::string > & | parameters | ||
) |
Definition at line 23 of file MSSOTLPolicyDesirability.cpp.
Referenced by readParameter().
|
virtual |
Definition at line 29 of file MSSOTLPolicyDesirability.cpp.
Referenced by readParameter().
|
inherited |
Adds a parameter.
[in] | key | The parameter's name |
[in] | value | The parameter's value |
Definition at line 53 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by SUMORouteHandler::addParam(), NLHandler::addParam(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NBTrafficLightDefinition::compute(), NIImporter_OpenDrive::loadNetwork(), NIImporter_MATSim::EdgesHandler::myStartElement(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), and TraCIServerAPI_Lane::processSet().
|
inherited |
Adds all given parameter.
[in] | mapArg | The keys/values to insert |
Definition at line 59 of file Parameterised.cpp.
References Parameterised::myMap.
|
inherited |
Adds all given parameter.
[in] | p | The keys/values to insert |
Definition at line 67 of file Parameterised.cpp.
References Parameterised::myMap.
|
inherited |
Clears the parameter map.
Definition at line 91 of file Parameterised.cpp.
References Parameterised::myMap.
|
pure virtual |
Calculates the desirability of the policy.
Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.
Referenced by MSSOTLPolicy::computeDesirability(), and readParameter().
|
pure virtual |
Calculates the desirability of the policy.
Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.
|
inline |
Definition at line 74 of file MSSOTLPolicyDesirability.h.
References myKeyPrefix.
Referenced by MSSOTLPolicy5DStimulus::getStimCox(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionIn(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionOut(), MSSOTLPolicy5DStimulus::getStimCoxExpIn(), MSSOTLPolicy5DStimulus::getStimCoxExpOut(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionIn(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionOut(), MSSOTLPolicy5DStimulus::getStimDivisorIn(), MSSOTLPolicy5DStimulus::getStimDivisorOut(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionIn(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionOut(), MSSOTLPolicy5DStimulus::getStimOffsetIn(), and MSSOTLPolicy5DStimulus::getStimOffsetOut().
|
inlineinherited |
Returns the inner key/value map.
Definition at line 107 of file Parameterised.h.
References Parameterised::myMap.
Referenced by NBTrafficLightDefinition::compute(), GUIPerson::getParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), TraCIServerAPI_TLS::processGet(), ROVehicle::saveAsXML(), ROPerson::saveAsXML(), SUMOVTypeParameter::write(), PointOfInterest::writeXML(), and SUMO::Polygon::writeXML().
|
pure virtual |
Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.
Referenced by MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), and readParameter().
|
inherited |
Returns the value for a given key.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Definition at line 81 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSDevice_Example::buildVehicleDevices(), MSDevice_Battery::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSSOTLTrafficLightLogic::getDecayConstant(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSOTLTrafficLightLogic::getThreshold(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Route::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), readParameter(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), and TraCIServerAPI_Vehicle::vtdMap().
|
inherited |
Returns whether the parameter is known.
[in] | key | The key to ask for |
Definition at line 75 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSDevice_Example::buildVehicleDevices(), and MSDevice::equippedByDefaultAssignmentOptions().
|
inlineprotected |
Definition at line 49 of file MSSOTLPolicyDesirability.h.
References TplConvert::_2SUMORealSec(), computeDesirability(), getMessage(), Parameterised::getParameter(), MSSOTLPolicyDesirability(), SUMOReal, and ~MSSOTLPolicyDesirability().
Referenced by MSSOTLPolicy5DStimulus::getStimCox(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionIn(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionOut(), MSSOTLPolicy5DStimulus::getStimCoxExpIn(), MSSOTLPolicy5DStimulus::getStimCoxExpOut(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionIn(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionOut(), MSSOTLPolicy5DStimulus::getStimDivisorIn(), MSSOTLPolicy5DStimulus::getStimDivisorOut(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionIn(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionOut(), MSSOTLPolicy5DStimulus::getStimOffsetIn(), MSSOTLPolicy5DStimulus::getStimOffsetOut(), and MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus().
|
inline |
|
private |
Definition at line 46 of file MSSOTLPolicyDesirability.h.
Referenced by getKeyPrefix().