SUMO - Simulation of Urban MObility
MSSOTLPolicy5DFamilyStimulus.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The class the low-level policy stimulus
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright 2001-2013 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 
22 #ifndef MSSOTLPOLICY5DFAMILYSTIMULUS_H_
23 #define MSSOTLPOLICY5DFAMILYSTIMULUS_H_
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 //#define SWARM_DEBUG
37 #include <sstream>
38 #include <math.h>
39 #include <stdlib.h>
40 #include <string.h>
41 #include "MSSOTLPolicy5DStimulus.h"
42 
51 
52 private:
53 
54  /*SUMOReal stimCoxDVal,
55  stimOffsetInDVal, stimOffsetOutDVal, stimOffsetDispersionInDVal, stimOffsetDispersionOutDVal,
56  stimDivInDVal, stimDivOutDVal, stimDivDispersionInDVal, stimDivDispersionOutDVal,
57  stimCoxExpInDVal, stimCoxExpOutDVal, stimCoxExpDispersionInDVal, stimCoxExpDispersionOutDVal;*/
58 
59  std::map<std::string, std::string> default_values;
60  std::vector<std::string> params_names;
61  std::vector<MSSOTLPolicy5DStimulus*> family;
62 
63  //std::vector<std::string> inline StringSplit(const std::string &source, const char *delimiter = " ", bool keepEmpty = false);
64 
65 public:
66 
67  MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map<std::string, std::string>& parameters);
68 
69  std::string getMessage();
70 
71  std::vector<MSSOTLPolicy5DStimulus*> getFamilies() {
72  return family;
73  }
74 
75  /*
76  * @brief Computes stimulus function
77  * stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);
78  */
79  virtual SUMOReal computeDesirability(SUMOReal vehInMeasure,
80  SUMOReal vehOutMeasure);
81 
82  virtual SUMOReal computeDesirability(SUMOReal vehInMeasure, SUMOReal vehOutMeasure, SUMOReal vehInDispersionMeasure, SUMOReal vehOutDispersionMeasure);
83 };
84 
85 #endif /* MSSOTLPOLICY5DFAMILYSTIMULUS_H_ */
virtual SUMOReal computeDesirability(SUMOReal vehInMeasure, SUMOReal vehOutMeasure)
Calculates the desirability of the policy.
std::vector< MSSOTLPolicy5DStimulus * > getFamilies()
MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const std::map< std::string, std::string > &parameters)
std::map< std::string, std::string > default_values
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
#define SUMOReal
Definition: config.h:213