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-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 the low-level policy stimulus
17 /****************************************************************************/
18 
19 #ifndef MSSOTLPOLICY5DFAMILYSTIMULUS_H_
20 #define MSSOTLPOLICY5DFAMILYSTIMULUS_H_
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 //#define SWARM_DEBUG
30 #include <sstream>
31 #include <cmath>
32 #include <stdlib.h>
33 #include <string.h>
34 #include "MSSOTLPolicy5DStimulus.h"
35 
44 
45 private:
46 
47  /*double stimCoxDVal,
48  stimOffsetInDVal, stimOffsetOutDVal, stimOffsetDispersionInDVal, stimOffsetDispersionOutDVal,
49  stimDivInDVal, stimDivOutDVal, stimDivDispersionInDVal, stimDivDispersionOutDVal,
50  stimCoxExpInDVal, stimCoxExpOutDVal, stimCoxExpDispersionInDVal, stimCoxExpDispersionOutDVal;*/
51 
52  std::map<std::string, std::string> default_values;
53  std::vector<std::string> params_names;
54  std::vector<MSSOTLPolicy5DStimulus*> family;
55 
56  //std::vector<std::string> inline StringSplit(const std::string &source, const char *delimiter = " ", bool keepEmpty = false);
57 
58 public:
59 
60  MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map<std::string, std::string>& parameters);
61 
62  std::string getMessage();
63 
64  std::vector<MSSOTLPolicy5DStimulus*> getFamilies() {
65  return family;
66  }
67 
68  /*
69  * @brief Computes stimulus function
70  * stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);
71  */
72  virtual double computeDesirability(double vehInMeasure,
73  double vehOutMeasure);
74 
75  virtual double computeDesirability(double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure);
76 };
77 
78 #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