mobility_rules.h Source File

CPP API: mobility_rules.h Source File
mobility_rules.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2020-2026 MEmilio
3 *
4 * Authors: Daniel Abele, Majid Abedi, Elisabeth Kluth, Khoa Nguyen
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 #ifndef MIO_ABM_MOBILITY_RULES_H
21 #define MIO_ABM_MOBILITY_RULES_H
22 
23 #include "abm/location_type.h"
24 #include "abm/parameters.h"
25 #include "abm/time.h"
26 #include "abm/person.h"
27 
28 namespace mio
29 {
30 namespace abm
31 {
32 
48 LocationType random_mobility(PersonalRandomNumberGenerator& rng, const Person& p, TimePoint t, TimeSpan dt,
49  const Parameters& params);
50 
54 LocationType go_to_school(PersonalRandomNumberGenerator& rng, const Person& p, TimePoint t, TimeSpan dt,
55  const Parameters& params);
56 
60 LocationType go_to_shop(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint t, TimeSpan dt,
61  const Parameters& params);
62 
66 LocationType go_to_event(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint t, TimeSpan dt,
67  const Parameters& params);
68 
72 LocationType go_to_work(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint t, TimeSpan dt,
73  const Parameters& params);
74 
78 LocationType go_to_quarantine(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint /*t*/,
79  TimeSpan /*dt*/, const Parameters& /*params*/);
80 
84 LocationType go_to_hospital(PersonalRandomNumberGenerator& rng, const Person& p, TimePoint t, TimeSpan dt,
85  const Parameters& params);
86 
90 LocationType go_to_icu(PersonalRandomNumberGenerator& rng, const Person& p, TimePoint t, TimeSpan dt,
91  const Parameters& params);
92 
96 LocationType return_home_when_recovered(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint t,
97  TimeSpan dt, const Parameters& params);
98 
102 LocationType get_buried(PersonalRandomNumberGenerator& rng, const Person& person, TimePoint t, TimeSpan dt,
103  const Parameters& params);
106 } // namespace abm
107 } // namespace mio
108 
109 #endif //MIO_ABM_MOBILITY_RULES_H
LocationType return_home_when_recovered(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the hospital/icu return home when they recover.
Definition: mobility_rules.cpp:159
LocationType go_to_event(PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters &params)
Persons might go to social events.
Definition: mobility_rules.cpp:104
LocationType
Type of a Location.
Definition: location_type.h:34
LocationType go_to_school(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan dt, const Parameters &params)
School age children go to school in the morning and return later in the day.
Definition: mobility_rules.cpp:47
LocationType random_mobility(PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters &params)
Completely random mobility to any other Location.
Definition: mobility_rules.cpp:31
LocationType go_to_icu(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the hospital may be put in intensive care.
Definition: mobility_rules.cpp:149
LocationType go_to_work(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan dt, const Parameters &params)
Adults go to work in the morning and return later in the day.
Definition: mobility_rules.cpp:66
LocationType get_buried(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the icu go to cemetery when they are dead.
Definition: mobility_rules.cpp:170
LocationType go_to_shop(PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters &params)
Adults may go shopping in their free time.
Definition: mobility_rules.cpp:85
LocationType go_to_hospital(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Infected Persons may be hospitalized.
Definition: mobility_rules.cpp:139
LocationType go_to_quarantine(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan, const Parameters &params)
Persons who are in quarantine should go home.
Definition: mobility_rules.cpp:128
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30