diff --git a/agent_based_epidemic_sim/core/event.h b/agent_based_epidemic_sim/core/event.h index 07da279..f0b4a06 100644 --- a/agent_based_epidemic_sim/core/event.h +++ b/agent_based_epidemic_sim/core/event.h @@ -212,13 +212,13 @@ static_assert(absl::is_trivially_copy_constructible::value, // An outcome of a visit to a location. // May contain a contact, or background_exposure, representing an exposure // to an INFECTIOUS entity (contact, fomite, location etc.) with a given -// infectivity. +// infectivity. Default UUIDs are set to -1. // TODO: Rename to VisitOutcome. Also, consider a move to v. struct InfectionOutcome { - int64 agent_uuid; + int64 agent_uuid = -1; Exposure exposure; InfectionOutcomeProto::ExposureType exposure_type; - int64 source_uuid; + int64 source_uuid = -1; friend bool operator==(const InfectionOutcome& a, const InfectionOutcome& b) { return (a.agent_uuid == b.agent_uuid && a.exposure == b.exposure && @@ -282,11 +282,12 @@ struct TestResult { static_assert(absl::is_trivially_copy_constructible::value, "TestResult must be trivially copyable."); -// Health information that is to be broadcasted to a contact. +// Health information that is to be broadcasted to a contact. Default UUIDs are +// set to -1. // TODO: Represent and report self-reported symptoms. struct ContactReport { - int64 from_agent_uuid; - int64 to_agent_uuid; + int64 from_agent_uuid = -1; + int64 to_agent_uuid = -1; TestResult test_result; absl::optional initial_symptom_onset_time; diff --git a/agent_based_epidemic_sim/core/visit.h b/agent_based_epidemic_sim/core/visit.h index f069af6..30e2abd 100644 --- a/agent_based_epidemic_sim/core/visit.h +++ b/agent_based_epidemic_sim/core/visit.h @@ -57,10 +57,10 @@ struct VisitLocationDynamics { int random_location_edges = 0; }; -// A visit to a given location in time of an agent. +// A visit to a given location in time of an agent. Default UUIDs are set to -1. struct Visit { - int64 location_uuid; - int64 agent_uuid; + int64 location_uuid = -1; + int64 agent_uuid = -1; absl::Time start_time; absl::Time end_time; HealthState::State health_state;