SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSSOTLRequestPolicy.h
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 #ifndef MSTLRequestPolicy_h
22 #define MSTLRequestPolicy_h
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "MSSOTLPolicy.h"
34 
41 
42 public:
43  MSSOTLRequestPolicy(const std::map<std::string, std::string>& parameters);
44  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm);
45 
46  MSSOTLRequestPolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm,
47  const std::map<std::string, std::string>& parameters);
48 
49  bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed,
50  const MSPhaseDefinition* stage, int vehicleCount);
51 
53  return TplConvert::_2int(getParameter("MIN_DECISIONAL_PHASE_DUR", "5000").c_str());
54  }
55 
56 };
57 
58 #endif
59 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:43
Class for low-level request policy.
const std::string & getParameter(const std::string &key, const std::string &defaultValue) const
Returns the value for a given key.
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...
static int _2int(const E *const data)
converts a char-type array into the integer value described by it
Definition: TplConvert.h:149
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)