Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cpp/benchmarks/abm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele
*
Expand Down
20 changes: 10 additions & 10 deletions cpp/benchmarks/flow_simulation_ode_secirvvs.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding, Daniel Abele, Martin J. Kuehn
*
Expand Down Expand Up @@ -42,9 +42,9 @@ void flowless_sim(::benchmark::State& state)
// create simulation
// exclude integrator creation from benchmark
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
mio::benchmark::Simulation<mio::Simulation<ScalarType, Model>> sim(model, cfg.t0, cfg.dt);
Expand All @@ -69,9 +69,9 @@ void flow_sim_comp_only(::benchmark::State& state)
for (auto _ : state) {
// create simulation
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
mio::osecirvvs::Simulation<ScalarType, mio::Simulation<ScalarType, Model>> sim(model, cfg.t0, cfg.dt);
Expand All @@ -96,9 +96,9 @@ void flow_sim(::benchmark::State& state)
for (auto _ : state) {
// create simulation
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
mio::osecirvvs::Simulation<ScalarType, mio::FlowSimulation<ScalarType, Model>> sim(model, cfg.t0, cfg.dt);
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/flow_simulation_ode_secirvvs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding, Daniel Abele, Martin J. Kuehn
*
Expand Down
20 changes: 10 additions & 10 deletions cpp/benchmarks/flow_simulation_ode_seir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding, Daniel Abele, Martin J. Kuehn
*
Expand Down Expand Up @@ -132,9 +132,9 @@ void flowless_sim(::benchmark::State& state)
// create simulation
// exclude integrator creation from benchmark
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
results = mio::simulate(cfg.t0, cfg.t_max, cfg.dt, model, std::move(I));
Expand All @@ -157,9 +157,9 @@ void flow_sim_comp_only(::benchmark::State& state)
for (auto _ : state) {
// create simulation
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
results = mio::simulate(cfg.t0, cfg.t_max, cfg.dt, model, std::move(I));
Expand All @@ -182,9 +182,9 @@ void flow_sim(::benchmark::State& state)
for (auto _ : state) {
// create simulation
state.PauseTiming();
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I =
std::make_unique<mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
std::unique_ptr<mio::OdeIntegratorCore<ScalarType>> I = std::make_unique<
mio::ControlledStepperWrapper<ScalarType, boost::numeric::odeint::runge_kutta_cash_karp54>>(
cfg.abs_tol, cfg.rel_tol, cfg.dt_min, cfg.dt_max);
state.ResumeTiming();
// This code gets timed
results = mio::simulate_flows(cfg.t0, cfg.t_max, cfg.dt, model, std::move(I))[0];
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/graph_simulation.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Henrik Zunker
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/graph_simulation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Henrik Zunker
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/integrator_step.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/integrator_step.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/secir_ageres_setups.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/simulation.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/simulation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/abm_history_object.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Khoa Nguyen
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/abm_minimal.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Khoa Nguyen
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/abm_parameter_study.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding, Sascha Korf
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ad_odeint_example.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Ralf Hannemann-Tamas
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ad_square_example.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Ralf Hannemann-Tamas
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/adapt_rk_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele, Martin J. Kuehn
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/cli.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Rene Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/d_abm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Julia Bicker, René Schmieding
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/data_dir.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/euler_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele, Martin J. Kuehn
*
Expand Down
30 changes: 17 additions & 13 deletions cpp/examples/glct_secir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Lena Ploetzke
*
Expand Down Expand Up @@ -43,7 +43,7 @@ int main()
constexpr size_t NumExposed = 2, NumInfectedNoSymptoms = 6, NumInfectedSymptoms = 2, NumInfectedSevere = 2,
NumInfectedCritical = 10;
using Model = mio::glsecir::Model<ScalarType, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms,
NumInfectedSevere, NumInfectedCritical>;
NumInfectedSevere, NumInfectedCritical>;
using LctState = Model::LctState;
using InfectionState = LctState::InfectionState;

Expand Down Expand Up @@ -136,8 +136,9 @@ int main()
Eigen::VectorX<ScalarType> StartingProbabilitiesInfectedNoSymptoms =
Eigen::VectorX<ScalarType>::Zero(LctState::get_num_subcompartments<InfectionState::InfectedNoSymptoms>());
StartingProbabilitiesInfectedNoSymptoms[0] = 1 - recoveredPerInfectedNoSymptoms;
StartingProbabilitiesInfectedNoSymptoms[(Eigen::Index)(
LctState::get_num_subcompartments<InfectionState::InfectedNoSymptoms>() / 2.)] = recoveredPerInfectedNoSymptoms;
StartingProbabilitiesInfectedNoSymptoms[(
Eigen::Index)(LctState::get_num_subcompartments<InfectionState::InfectedNoSymptoms>() / 2.)] =
recoveredPerInfectedNoSymptoms;
model.parameters.get<mio::glsecir::StartingProbabilitiesInfectedNoSymptoms<ScalarType>>() =
StartingProbabilitiesInfectedNoSymptoms;
// Define equal TransitionMatrices for the strains.
Expand All @@ -154,9 +155,10 @@ int main()
// InfectedSymptoms.
Eigen::VectorX<ScalarType> StartingProbabilitiesInfectedSymptoms =
Eigen::VectorX<ScalarType>::Zero(LctState::get_num_subcompartments<InfectionState::InfectedSymptoms>());
StartingProbabilitiesInfectedSymptoms[0] = severePerInfectedSymptoms;
StartingProbabilitiesInfectedSymptoms[(Eigen::Index)(
LctState::get_num_subcompartments<InfectionState::InfectedSymptoms>() / 2.)] = 1 - severePerInfectedSymptoms;
StartingProbabilitiesInfectedSymptoms[0] = severePerInfectedSymptoms;
StartingProbabilitiesInfectedSymptoms[(
Eigen::Index)(LctState::get_num_subcompartments<InfectionState::InfectedSymptoms>() / 2.)] =
1 - severePerInfectedSymptoms;
model.parameters.get<mio::glsecir::StartingProbabilitiesInfectedSymptoms<ScalarType>>() =
StartingProbabilitiesInfectedSymptoms;
model.parameters.get<mio::glsecir::TransitionMatrixInfectedSymptomsToInfectedSevere<ScalarType>>() =
Expand All @@ -168,9 +170,10 @@ int main()
// InfectedSevere.
Eigen::VectorX<ScalarType> StartingProbabilitiesInfectedSevere =
Eigen::VectorX<ScalarType>::Zero(LctState::get_num_subcompartments<InfectionState::InfectedSevere>());
StartingProbabilitiesInfectedSevere[0] = criticalPerSevere;
StartingProbabilitiesInfectedSevere[(Eigen::Index)(
LctState::get_num_subcompartments<InfectionState::InfectedSevere>() / 2.)] = 1 - criticalPerSevere;
StartingProbabilitiesInfectedSevere[0] = criticalPerSevere;
StartingProbabilitiesInfectedSevere[(
Eigen::Index)(LctState::get_num_subcompartments<InfectionState::InfectedSevere>() / 2.)] =
1 - criticalPerSevere;
model.parameters.get<mio::glsecir::StartingProbabilitiesInfectedSevere<ScalarType>>() =
StartingProbabilitiesInfectedSevere;
model.parameters.get<mio::glsecir::TransitionMatrixInfectedSevereToInfectedCritical<ScalarType>>() =
Expand All @@ -182,9 +185,10 @@ int main()
// InfectedCritical.
Eigen::VectorX<ScalarType> StartingProbabilitiesInfectedCritical =
Eigen::VectorX<ScalarType>::Zero(LctState::get_num_subcompartments<InfectionState::InfectedCritical>());
StartingProbabilitiesInfectedCritical[0] = deathsPerCritical;
StartingProbabilitiesInfectedCritical[(Eigen::Index)(
LctState::get_num_subcompartments<InfectionState::InfectedCritical>() / 2.)] = 1 - deathsPerCritical;
StartingProbabilitiesInfectedCritical[0] = deathsPerCritical;
StartingProbabilitiesInfectedCritical[(
Eigen::Index)(LctState::get_num_subcompartments<InfectionState::InfectedCritical>() / 2.)] =
1 - deathsPerCritical;
model.parameters.get<mio::glsecir::StartingProbabilitiesInfectedCritical<ScalarType>>() =
StartingProbabilitiesInfectedCritical;
model.parameters.get<mio::glsecir::TransitionMatrixInfectedCriticalToDead<ScalarType>>() =
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/graph_abm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Julia Bicker
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/graph_stochastic_mobility.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/history.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Carlotta Gerstein
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ide_initialization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Lena Ploetzke, Anna Wendler
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ide_secir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Anna Wendler, Lena Ploetzke, Hannah Tritzschak
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ide_secir_graph.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Anna Wendler
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ide_seir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Lena Ploetzke
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/lct_secir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Lena Ploetzke
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_mseirs4.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Henrik Zunker
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_seair.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Ralf Hannemann-Tamas
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_seair_optimization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Ralf Hannemann-Tamas
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_secir.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele, Martin J. Kuehn
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_secir_ageres.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele, Martin J. Kuehn
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_secir_contact_changes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Daniel Abele, Martin J. Kuehn
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/ode_secir_feedback.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 MEmilio
* Copyright (C) 2020-2026 MEmilio
*
* Authors: Henrik Zunker
*
Expand Down
Loading