40 MSSOTLPolicy(
"Phase", desirabilityAlgorithm, parameters) {
48 std::ostringstream str;
49 str <<
"MSSOTLPhasePolicy::canRelease threshold " << thresholdPassed <<
" vehicle " << vehicleCount <<
" elapsed " << elapsed <<
" min " << stage->
minDuration;
56 if (thresholdPassed) {
57 return thresholdPassed;
#define WRITE_MESSAGE(msg)
The definition of a single phase of a tls logic.
SUMOTime minDuration
The minimum duration of the phase.
bool m_useVehicleTypesWeights
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
MSSOTLPhasePolicy(const Parameterised::Map ¶meters)
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
void setKeyPrefix(std::string val)
Class for a low-level policy.
MSSOTLPolicyDesirability * getDesirabilityAlgorithm()
std::map< std::string, std::string > Map
parameters map
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
void init(std::string prefix, const Parameterised *parameterised)
bool sigmoidLogic(SUMOTime elapsed, const MSPhaseDefinition *stage, int vehicleCount)