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-2018 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 /****************************************************************************/
16 // The class for SOTL Request logics
17 /****************************************************************************/
18 #ifndef MSTLRequestPolicy_h
19 #define MSTLRequestPolicy_h
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "MSSOTLPolicy.h"
27 
34 
35 public:
36  MSSOTLRequestPolicy(const std::map<std::string, std::string>& parameters);
37  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm);
38 
39  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm,
40  const std::map<std::string, std::string>& parameters);
41 
42  bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed,
43  const MSPhaseDefinition* stage, int vehicleCount);
44 
46  return StringUtils::toInt(getParameter("MIN_DECISIONAL_PHASE_DUR", "5000"));
47  }
48 
49 };
50 
51 #endif
52 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:36
Class for low-level request policy.
bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed, const MSPhaseDefinition *stage, int vehicleCount)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
Class for a low-level policy.
Definition: MSSOTLPolicy.h:65
The definition of a single phase of a tls logic.
MSSOTLRequestPolicy(const std::map< std::string, std::string > &parameters)