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 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 > &parameters)
 
void setKeyPrefix (std::string val)
 
virtual ~MSSOTLPolicyDesirability ()
 

Protected Member Functions

SUMOReal readParameter (std::string parName, SUMOReal 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 43 of file MSSOTLPolicyDesirability.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file MSSOTLPolicyDesirability.cpp.

Referenced by readParameter().

MSSOTLPolicyDesirability::~MSSOTLPolicyDesirability ( )
virtual

Definition at line 29 of file MSSOTLPolicyDesirability.cpp.

Referenced by readParameter().

Member Function Documentation

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

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

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

Calculates the desirability of the policy.

Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.

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

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

Calculates the desirability of the policy.

Implemented in MSSOTLPolicy5DStimulus, and MSSOTLPolicy5DFamilyStimulus.

virtual std::string MSSOTLPolicyDesirability::getMessage ( )
pure virtual
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 81 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Example::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().

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

References Parameterised::myMap.

Referenced by MSDevice_Example::buildVehicleDevices(), and MSDevice::equippedByDefaultAssignmentOptions().

Field Documentation

std::string MSSOTLPolicyDesirability::myKeyPrefix
private

Definition at line 46 of file MSSOTLPolicyDesirability.h.

Referenced by getKeyPrefix().


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