Eclipse SUMO - Simulation of Urban MObility
MSSOTLPolicy5DFamilyStimulus.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The class the low-level policy stimulus
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 //#define SWARM_DEBUG
27 #include <sstream>
28 #include <cmath>
29 #include <stdlib.h>
30 #include <string.h>
31 #include "MSSOTLPolicy5DStimulus.h"
32 
41 
42 private:
43 
44  /*double stimCoxDVal,
45  stimOffsetInDVal, stimOffsetOutDVal, stimOffsetDispersionInDVal, stimOffsetDispersionOutDVal,
46  stimDivInDVal, stimDivOutDVal, stimDivDispersionInDVal, stimDivDispersionOutDVal,
47  stimCoxExpInDVal, stimCoxExpOutDVal, stimCoxExpDispersionInDVal, stimCoxExpDispersionOutDVal;*/
48 
49  std::map<std::string, std::string> default_values;
50  std::vector<std::string> params_names;
51  std::vector<MSSOTLPolicy5DStimulus*> family;
52 
53  //std::vector<std::string> inline StringSplit(const std::string &source, const char *delimiter = " ", bool keepEmpty = false);
54 
55 public:
56 
57  MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map<std::string, std::string>& parameters);
58 
59  std::string getMessage();
60 
61  std::vector<MSSOTLPolicy5DStimulus*> getFamilies() {
62  return family;
63  }
64 
65  /*
66  * @brief Computes stimulus function
67  * stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);
68  */
69  virtual double computeDesirability(double vehInMeasure,
70  double vehOutMeasure);
71 
72  virtual double computeDesirability(double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure);
73 };
74 
std::vector< MSSOTLPolicy5DStimulus * > family
virtual double computeDesirability(double vehInMeasure, double vehOutMeasure)
Calculates the desirability of the policy.
std::vector< MSSOTLPolicy5DStimulus * > getFamilies()
std::vector< std::string > params_names
MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map< std::string, std::string > &parameters)
std::map< std::string, std::string > default_values
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...