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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // The class the low-level policy stimulus
19 /****************************************************************************/
20 
21 #ifndef MSSOTLPOLICY5DFAMILYSTIMULUS_H_
22 #define MSSOTLPOLICY5DFAMILYSTIMULUS_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 //#define SWARM_DEBUG
36 #include <sstream>
37 #include <cmath>
38 #include <stdlib.h>
39 #include <string.h>
40 #include "MSSOTLPolicy5DStimulus.h"
41 
50 
51 private:
52 
53  /*double stimCoxDVal,
54  stimOffsetInDVal, stimOffsetOutDVal, stimOffsetDispersionInDVal, stimOffsetDispersionOutDVal,
55  stimDivInDVal, stimDivOutDVal, stimDivDispersionInDVal, stimDivDispersionOutDVal,
56  stimCoxExpInDVal, stimCoxExpOutDVal, stimCoxExpDispersionInDVal, stimCoxExpDispersionOutDVal;*/
57 
58  std::map<std::string, std::string> default_values;
59  std::vector<std::string> params_names;
60  std::vector<MSSOTLPolicy5DStimulus*> family;
61 
62  //std::vector<std::string> inline StringSplit(const std::string &source, const char *delimiter = " ", bool keepEmpty = false);
63 
64 public:
65 
66  MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map<std::string, std::string>& parameters);
67 
68  std::string getMessage();
69 
70  std::vector<MSSOTLPolicy5DStimulus*> getFamilies() {
71  return family;
72  }
73 
74  /*
75  * @brief Computes stimulus function
76  * stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);
77  */
78  virtual double computeDesirability(double vehInMeasure,
79  double vehOutMeasure);
80 
81  virtual double computeDesirability(double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure);
82 };
83 
84 #endif /* MSSOTLPOLICY5DFAMILYSTIMULUS_H_ */
std::vector< MSSOTLPolicy5DStimulus * > getFamilies()
MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map< std::string, std::string > &parameters)
std::map< std::string, std::string > default_values
virtual double computeDesirability(double vehInMeasure, double vehOutMeasure)
Calculates the desirability of the policy.
std::vector< MSSOTLPolicy5DStimulus * > family
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
std::vector< std::string > params_names