model.h Source File

CPP API: model.h Source File
d_abm/model.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2020-2026 MEmilio
3 *
4 * Authors: René Schmieding, Julia Bicker
5 *
6 * Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20 
21 #ifndef MIO_D_ABM_MODEL_H
22 #define MIO_D_ABM_MODEL_H
23 
24 namespace mio
25 {
26 
27 namespace dabm
28 {
29 
35 template <class Implementation>
36 class Model : public Implementation
37 {
38 public:
40  using Implementation::Implementation;
41 
46  using Implementation::adopt;
47 
52  using Implementation::adoption_rate;
53 
59  using Implementation::move;
60 
65  using Implementation::get_rng;
66 
71  using Implementation::time_point;
72 
74  using Status = typename Implementation::Status;
76  using Agent = typename Implementation::Agent;
77 
79  inline constexpr void check_constraints() const
80  {
81  }
82 };
83 
84 } // namespace dabm
85 } // namespace mio
86 
87 #endif
Wrap an implementation of a diffusive ABM so it can be run by the d_abm::Simulation.
Definition: d_abm/model.h:37
typename Implementation::Agent Agent
An agent is expected to contain at least a status and a position.
Definition: d_abm/model.h:76
constexpr void check_constraints() const
Empty function for compatability with MEmilio.
Definition: d_abm/model.h:79
typename Implementation::Status Status
The status of an agent.
Definition: d_abm/model.h:74
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30