42 MSSOTLPolicy(
"Platoon", desirabilityAlgorithm, parameters) {
51 std::ostringstream str;
52 str <<
"MSSOTLPlatoonPolicy::canRelease elapsed " << elapsed <<
" threshold " << thresholdPassed <<
" pushbutton " << pushButtonPressed <<
" vcount " << vehicleCount
54 str <<
" will return " << ((thresholdPassed && ((vehicleCount == 0) || (elapsed >= stage->
maxDuration))) ?
"true" :
"false");
61 if (thresholdPassed) {
64 return ((vehicleCount == 0) || (elapsed >= stage->
maxDuration));
#define WRITE_MESSAGE(msg)
The definition of a single phase of a tls logic.
SUMOTime maxDuration
The maximum duration of the phase.
SUMOTime minDuration
The minimum duration of the phase.
MSSOTLPlatoonPolicy(const Parameterised::Map ¶meters)
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
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
void init(std::string prefix, const Parameterised *parameterised)
bool sigmoidLogic(SUMOTime elapsed, const MSPhaseDefinition *stage, int vehicleCount)