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