37 const std::map<std::string, std::string>& parameters) :
38 MSSOTLPolicy(
"Platoon", desirabilityAlgorithm, parameters) {
47 std::ostringstream str;
48 str <<
"MSSOTLPlatoonPolicy::canRelease elapsed " << elapsed <<
" threshold " << thresholdPassed <<
" pushbutton " << pushButtonPressed <<
" vcount " << vehicleCount
49 <<
" minD " << stage->
minDuration <<
" maxD " << stage->
maxDuration; str <<
" will return " << ((thresholdPassed && ((vehicleCount == 0) || (elapsed >= stage->
maxDuration))) ?
"true" :
"false");
56 if (thresholdPassed) {
59 return ((vehicleCount == 0) || (elapsed >= stage->
maxDuration));
void init(std::string prefix, const Parameterised *parameterised)
bool sigmoidLogic(SUMOTime elapsed, const MSPhaseDefinition *stage, int vehicleCount)
MSSOTLPolicyDesirability * getDesirabilityAlgorithm()
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
void setKeyPrefix(std::string val)
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
SUMOTime maxDuration
The maximum duration of the phase.
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.
MSSOTLPlatoonPolicy(const std::map< std::string, std::string > ¶meters)