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 /****************************************************************************/
10 /// @file    MSSOTLPhasePolicy.h
11 /// @author  Gianfilippo Slager
12 /// @author  Federico Caselli
13 /// @date    Feb 2010
14 /// @version $Id$
15 ///
16 // The class for SOTL Phase logics
17 /****************************************************************************/
18 #ifndef MSTLPhasePolicy_h
19 #define MSTLPhasePolicy_h
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "MSSOTLPolicy.h"
27 #define SWARM_DEBUG
28 #include <utils/common/SwarmDebug.h>
29 /**
30  * @class MSSOTLPhasePolicy
31  * @brief Class for low-level phase policy.
32  *
33  */
34 class MSSOTLPhasePolicy: public MSSOTLPolicy, public PushButtonLogic, public SigmoidLogic {
35 
36 public:
37     MSSOTLPhasePolicy(const std::map<std::string, std::string>& parameters);
38     MSSOTLPhasePolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm);
39 
40     MSSOTLPhasePolicy(MSSOTLPolicyDesirability* desirabilityAlgorithm,
41                       const std::map<std::string, std::string>& parameters);
42 
43     bool canRelease(SUMOTime elapsed, bool thresholdPassed, bool pushButtonPressed,
44                     const MSPhaseDefinition* stage, int vehicleCount);
45 protected:
46     void init();
47     bool m_useVehicleTypesWeights;
48 };
49 
50 #endif
51 /****************************************************************************/
52