Skip to content

Commit 30c59ab

Browse files
HenrZulenaploetzke
andauthored
1028 Reduce export_input_data_county_timeseries (#1029)
- remove duplicated code in export_input_data_county_timeseries - rework structure of read in functions - overwork doc in parameters_io files Co-authored-by: lenaploetzke <[email protected]>
1 parent a1028b5 commit 30c59ab

File tree

6 files changed

+800
-946
lines changed

6 files changed

+800
-946
lines changed

cpp/models/ode_secir/parameters_io.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int get_region_id(int id)
5858
}
5959

6060
IOResult<void> read_confirmed_cases_data(
61-
std::string const& path, std::vector<ConfirmedCasesDataEntry>& rki_data, std::vector<int> const& vregion, Date date,
61+
std::vector<ConfirmedCasesDataEntry>& rki_data, std::vector<int> const& vregion, Date date,
6262
std::vector<std::vector<double>>& vnum_Exposed, std::vector<std::vector<double>>& vnum_InfectedNoSymptoms,
6363
std::vector<std::vector<double>>& vnum_InfectedSymptoms, std::vector<std::vector<double>>& vnum_InfectedSevere,
6464
std::vector<std::vector<double>>& vnum_icu, std::vector<std::vector<double>>& vnum_death,
@@ -74,12 +74,12 @@ IOResult<void> read_confirmed_cases_data(
7474
});
7575
if (max_date_entry == rki_data.end()) {
7676
log_error("RKI data file is empty.");
77-
return failure(StatusCode::InvalidFileFormat, path + ", file is empty.");
77+
return failure(StatusCode::InvalidFileFormat, "RKI file is empty.");
7878
}
7979
auto max_date = max_date_entry->date;
8080
if (max_date < date) {
8181
log_error("Specified date does not exist in RKI data");
82-
return failure(StatusCode::OutOfRange, path + ", specified date does not exist in RKI data.");
82+
return failure(StatusCode::OutOfRange, "Specified date does not exist in RKI data.");
8383
}
8484
auto days_surplus = std::min(get_offset_in_days(max_date, date) - 6, 0);
8585

@@ -277,4 +277,4 @@ read_population_data(const std::string& path, const std::vector<int>& vregion, b
277277

278278
#endif // MEMILIO_HAS_JSONCPP
279279

280-
GCC_CLANG_DIAGNOSTIC(pop)
280+
GCC_CLANG_DIAGNOSTIC(pop)

0 commit comments

Comments
 (0)