Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
jubicker committed Dec 10, 2024
2 parents af6111c + 3a06d82 commit 92a2034
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cpp/models/abm/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "abm/time.h"
#include "abm/virus_variant.h"
#include "abm/protection_event.h"
#include "abm/protection_event.h"
#include "abm/test_type.h"
#include "memilio/config.h"
#include "memilio/io/default_serialize.h"
Expand Down Expand Up @@ -128,7 +129,7 @@ struct TimeInfectedSymptomsToRecovered {
}
static std::string name()
{
return "TimeInfectedNoSymptomsToSymptoms";
return "TimeInfectedSymptomsToRecovered";
}
};

Expand Down
1 change: 1 addition & 0 deletions cpp/simulations/abm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "abm/lockdown_rules.h"
#include "memilio/config.h"
#include "abm/state_transition_dist.h"
#include "memilio/config.h"
#include "memilio/io/result_io.h"
#include "memilio/utils/random_number_generator.h"
#include "memilio/utils/uncertain_value.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/simulations/abm_braunschweig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "abm/location_id.h"
#include "abm/lockdown_rules.h"
#include "abm/parameters.h"
#include "abm/parameters.h"
#include "abm/person.h"
#include "abm/simulation.h"
#include "abm/model.h"
Expand Down
2 changes: 2 additions & 0 deletions cpp/tests/test_abm_infection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (C) 2020-2024 MEmilio
*
* Authors: David Kerkmann, Khoa Nguyen
* Authors: David Kerkmann, Khoa Nguyen
*
* Contact: Martin J. Kuehn <[email protected]>
*
Expand Down Expand Up @@ -34,6 +35,7 @@ TEST_F(TestInfection, init)
auto params = mio::abm::Parameters(num_age_groups);
auto virus_variant_test = mio::abm::VirusVariant::Wildtype;
auto age_group_test = age_group_15_to_34;
mio::abm::Location loc(mio::abm::LocationType::Hospital, 0);

params.get<mio::abm::VirusShedFactor>()[{virus_variant_test, age_group_test}] = {0.1, 0.2};

Expand Down
1 change: 1 addition & 0 deletions cpp/tests/test_abm_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ TEST_F(TestLocation, interact)
auto t = mio::abm::TimePoint(0);
auto dt = mio::abm::seconds(8640); //0.1 days

// Setup model parameters for viral loads and infectivity distributions.
// Setup model parameters for viral loads and infectivity distributions.
mio::abm::Parameters params = mio::abm::Parameters(num_age_groups);
params.set_default<mio::abm::ViralLoadDistributions>(num_age_groups);
Expand Down
1 change: 0 additions & 1 deletion cpp/tests/test_abm_masks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ TEST_F(TestMasks, changeMask)
EXPECT_EQ(mask.get_type(), mio::abm::MaskType::Surgical);
EXPECT_EQ(mask.get_time_used(t), mio::abm::hours(0));
}

/**
* @brief Test mask protection during person interactions.
*/
Expand Down
8 changes: 7 additions & 1 deletion cpp/tests/test_abm_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ TEST_F(TestModel, addPerson)
EXPECT_EQ(model.get_persons().size(), 2);
EXPECT_EQ(model.get_person(0).get_age(), age_group_15_to_34);
EXPECT_EQ(model.get_person(1).get_age(), age_group_35_to_59);
// Verify the number of persons in the model and their respective age groups.
EXPECT_EQ(model.get_persons().size(), 2);
EXPECT_EQ(model.get_person(0).get_age(), age_group_15_to_34);
EXPECT_EQ(model.get_person(1).get_age(), age_group_35_to_59);
}

/**
Expand Down Expand Up @@ -348,6 +352,8 @@ TEST_F(TestModel, evolveMobilityTrips)
data.add_trip(trip2);
data.add_trip(trip3);

// Set trips to use weekday trips on weekends.
data.use_weekday_trips_on_weekend();
// Set trips to use weekday trips on weekends.
data.use_weekday_trips_on_weekend();

Expand All @@ -371,7 +377,7 @@ TEST_F(TestModel, evolveMobilityTrips)

// Move all persons back to their home location to prepare for weekend trips.
model.change_location(p1.get_id(), home_id);
model.change_location(p1.get_id(), home_id);
model.change_location(p3.get_id(), home_id);
model.change_location(p2.get_id(), home_id);
model.change_location(p5.get_id(), home_id);

Expand Down

0 comments on commit 92a2034

Please sign in to comment.