 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
34 const std::map<std::string, std::string>& parameters) :
35 MSSOTLPolicy(
"Platoon", desirabilityAlgorithm, parameters) {
44 std::ostringstream str;
45 str <<
"MSSOTLPlatoonPolicy::canRelease elapsed " << elapsed <<
" threshold " << thresholdPassed <<
" pushbutton " << pushButtonPressed <<
" vcount " << vehicleCount
46 <<
" minD " << stage->
minDuration <<
" maxD " << stage->
maxDuration; str <<
" will return " << ((thresholdPassed && ((vehicleCount == 0) || (elapsed >= stage->
maxDuration))) ?
"true" :
"false");
53 if (thresholdPassed) {
56 return ((vehicleCount == 0) || (elapsed >= stage->
maxDuration));
Class for a low-level policy.
void init(std::string prefix, const Parameterised *parameterised)
bool sigmoidLogic(SUMOTime elapsed, const MSPhaseDefinition *stage, int vehicleCount)
void setKeyPrefix(std::string val)
SUMOTime maxDuration
The maximum duration of the phase.
MSSOTLPolicyDesirability * getDesirabilityAlgorithm()
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
MSSOTLPlatoonPolicy(const std::map< std::string, std::string > ¶meters)
The definition of a single phase of a tls logic.
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
#define WRITE_MESSAGE(msg)
SUMOTime minDuration
The minimum duration of the phase.