SimDriver  0.1
AgentModel.h
1 // Copyright (c) 2020 Institute for Automotive Engineering (ika), RWTH Aachen University. All rights reserved.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in all
11 // copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 //
21 // Created by Jens Klimke on 2019-03-23.
22 // Contributors:
23 //
24 // AgentModel.h
25 
26 #ifndef AGENT_MODEL_H
27 #define AGENT_MODEL_H
28 
29 #include "Interface.h"
30 #include "VelocityHorizon.h"
31 #include "StopHorizon.h"
32 #include "Filter.h"
33 #include "DistanceTimeInterval.h"
34 
35 
40 
41 
42 protected:
43 
49 
50 
51 public:
52 
53 
57  AgentModel() = default;
58 
59 
63  ~AgentModel() override = default;
64 
65 
69  void init();
70 
71 
77  void step(double simulationTime);
78 
79 
80 protected:
81 
85  void decisionProcessStop();
86 
87 
91  void decisionLaneChange();
92 
93 
97  void decisionLateralOffset();
98 
99 
103  void consciousVelocity();
104 
105 
109  void consciousStop();
110 
111 
115  void consciousFollow();
116 
120  void consciousLaneChange();
121 
122 
126  void consciousLateralOffset();
127 
128 
133 
134 
140 
141 
146  double subconsciousFollow();
147 
148 
153  double subconsciousStop();
154 
155 
160  double subconsciousSpeed();
161 
162 
167  double subconsciousStartStop();
168 
169 
170 };
171 
172 
173 #endif // AGENT_MODEL_H
Definition: DistanceTimeInterval.h:35
A class to store the internal horizon.
Definition: VelocityHorizon.h:40
double subconsciousFollow()
Definition: AgentModel.cpp:1008
The agent model main class.
Definition: AgentModel.h:39
double subconsciousSpeed()
Definition: AgentModel.cpp:1078
agent_model::VelocityHorizon _vel_horizon
attribute to store the stop points
Definition: AgentModel.h:45
void consciousLateralOffset()
Definition: AgentModel.cpp:877
agent_model::Filter _filter
attribute to store the speed reaction filter
Definition: AgentModel.h:46
void consciousReferencePoints()
Definition: AgentModel.cpp:908
void consciousVelocity()
Definition: AgentModel.cpp:645
void decisionLateralOffset()
Definition: AgentModel.cpp:636
~AgentModel() override=default
Definition: StopHorizon.h:44
The agent model interface. The class implements the data structure of the agent model, consisting of input, state, memory and parameters.
Definition: Interface.h:367
void decisionLaneChange()
Definition: AgentModel.cpp:460
agent_model::DistanceTimeInterval _lane_change_process_interval
attribute to store the lane change interval
Definition: AgentModel.h:48
void init()
Definition: AgentModel.cpp:49
void consciousLaneChange()
Definition: AgentModel.cpp:843
void step(double simulationTime)
Definition: AgentModel.cpp:88
AgentModel()=default
void decisionProcessStop()
Definition: AgentModel.cpp:149
double subconsciousStartStop()
Definition: AgentModel.cpp:1094
agent_model::StopHorizon _stop_horizon
attribute to store the stop points
Definition: AgentModel.h:44
void consciousStop()
Definition: AgentModel.cpp:729
double subconsciousStop()
Definition: AgentModel.cpp:1046
agent_model::DistanceTimeInterval _lateral_offset_interval
attribute to store the lateral offset interval
Definition: AgentModel.h:47
A class to implement a mean filter.
Definition: Filter.h:38
double subconsciousLateralControl()
Definition: AgentModel.cpp:962
void consciousFollow()
Definition: AgentModel.cpp:776