SUMO - Simulation of Urban MObility
MSSOTLRequestPolicy.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 // The class for SOTL Request logics
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright 2001-2009 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 
22 #include "MSSOTLRequestPolicy.h"
23 
25  const std::map<std::string, std::string>& parameters) :
26  MSSOTLPolicy("Request", parameters) {
27 }
28 
30  MSSOTLPolicyDesirability* desirabilityAlgorithm) :
31  MSSOTLPolicy("Request", desirabilityAlgorithm) {
33 }
34 
36  MSSOTLPolicyDesirability* desirabilityAlgorithm,
37  const std::map<std::string, std::string>& parameters) :
38  MSSOTLPolicy("Request", desirabilityAlgorithm, parameters) {
40 
41 }
42 
43 bool MSSOTLRequestPolicy::canRelease(SUMOTime elapsed, bool thresholdPassed, bool /* pushButtonPressed */,
44  const MSPhaseDefinition* /* stage */, int /* vehicleCount */) {
45  if (elapsed >= getMinDecisionalPhaseDuration()) {
46  return thresholdPassed;
47  }
48  return false;
49 }
long long int SUMOTime
Definition: SUMOTime.h:43
MSSOTLPolicyDesirability * getDesirabilityAlgorithm()
Definition: MSSOTLPolicy.h:128
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...
Class for a low-level policy.
Definition: MSSOTLPolicy.h:72
The definition of a single phase of a tls logic.
MSSOTLRequestPolicy(const std::map< std::string, std::string > &parameters)