Eclipse SUMO - Simulation of Urban MObility
MSSOTLRequestPolicy.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The class for SOTL Request logics
16 /****************************************************************************/
17 #ifndef MSTLRequestPolicy_h
18 #define MSTLRequestPolicy_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include "MSSOTLPolicy.h"
26 
33 
34 public:
35  MSSOTLRequestPolicy(const std::map<std::string, std::string>& parameters);
36  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm);
37 
38  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm,
39  const std::map<std::string, std::string>& parameters);
40 
41  bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed,
42  const MSPhaseDefinition* stage, int vehicleCount);
43 
45  return StringUtils::toInt(getParameter("MIN_DECISIONAL_PHASE_DUR", "5000"));
46  }
47 
48 };
49 
50 #endif
51 /****************************************************************************/
MSSOTLPolicy
Class for a low-level policy.
Definition: MSSOTLPolicy.h:64
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
Parameterised::getParameter
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
Definition: Parameterised.cpp:72
MSSOTLPolicy.h
MSSOTLRequestPolicy
Class for low-level request policy.
Definition: MSSOTLRequestPolicy.h:32
StringUtils::toInt
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
Definition: StringUtils.cpp:278
MSSOTLRequestPolicy::getMinDecisionalPhaseDuration
int getMinDecisionalPhaseDuration()
Definition: MSSOTLRequestPolicy.h:44
config.h
MSSOTLRequestPolicy::canRelease
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
Definition: MSSOTLRequestPolicy.cpp:39
MSPhaseDefinition
The definition of a single phase of a tls logic.
Definition: MSPhaseDefinition.h:51
MSSOTLPolicyDesirability
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
Definition: MSSOTLPolicyDesirability.h:35
MSSOTLRequestPolicy::MSSOTLRequestPolicy
MSSOTLRequestPolicy(const std::map< std::string, std::string > &parameters)
Definition: MSSOTLRequestPolicy.cpp:20