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-2023 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
25#include <sstream>
26#include <cmath>
27#include <stdlib.h>
28#include <string.h>
30
39
40private:
41
42 /*double stimCoxDVal,
43 stimOffsetInDVal, stimOffsetOutDVal, stimOffsetDispersionInDVal, stimOffsetDispersionOutDVal,
44 stimDivInDVal, stimDivOutDVal, stimDivDispersionInDVal, stimDivDispersionOutDVal,
45 stimCoxExpInDVal, stimCoxExpOutDVal, stimCoxExpDispersionInDVal, stimCoxExpDispersionOutDVal;*/
46
48 std::vector<std::string> params_names;
49 std::vector<MSSOTLPolicy5DStimulus*> family;
50
51 //std::vector<std::string> inline StringSplit(const std::string &source, const char *delimiter = " ", bool keepEmpty = false);
52
53public:
54
55 MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const Parameterised::Map& parameters);
56
57 std::string getMessage();
58
59 std::vector<MSSOTLPolicy5DStimulus*> getFamilies() {
60 return family;
61 }
62
63 /*
64 * @brief Computes stimulus function
65 * stimulus = cox * exp(-pow(pheroIn - offsetIn, 2)/divisor -pow(pheroOut - offsetOut, 2)/divisor);
66 */
67 virtual double computeDesirability(double vehInMeasure,
68 double vehOutMeasure);
69
70 virtual double computeDesirability(double vehInMeasure, double vehOutMeasure, double vehInDispersionMeasure, double vehOutDispersionMeasure);
71};
72
std::vector< MSSOTLPolicy5DStimulus * > family
virtual double computeDesirability(double vehInMeasure, double vehOutMeasure)
Calculates the desirability of the policy.
std::vector< std::string > params_names
std::vector< MSSOTLPolicy5DStimulus * > getFamilies()
MSSOTLPolicy5DFamilyStimulus(std::string keyPrefix, const Parameterised::Map &parameters)
This class determines the desirability algorithm of a MSSOTLPolicy when used in combination with a hi...
std::map< std::string, std::string > Map
parameters map
Definition: Parameterised.h:45