Skip to content

Commit 356b84d

Browse files
committed
Fix bindings
1 parent bfe89f2 commit 356b84d

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

cpp/memilio/geography/regions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ struct EpidataFilenames
109109
{
110110
private:
111111

112-
EpidataFilenames(const std::string& pydata) :
112+
EpidataFilenames(std::string& pydata) :
113113
population_data_path(mio::path_join(pydata, "county_current_population.json"))
114114
{
115115
}
116116

117117
public:
118118

119-
static EpidataFilenames county(const std::string& pydata)
119+
static EpidataFilenames county(std::string& pydata)
120120
{
121121
EpidataFilenames s(pydata);
122122

@@ -127,7 +127,7 @@ struct EpidataFilenames
127127
return s;
128128
}
129129

130-
static EpidataFilenames states(const std::string& pydata)
130+
static EpidataFilenames states(std::string& pydata)
131131
{
132132
EpidataFilenames s(pydata);
133133

@@ -138,7 +138,7 @@ struct EpidataFilenames
138138
return s;
139139
}
140140

141-
static EpidataFilenames country(const std::string& pydata)
141+
static EpidataFilenames country(std::string& pydata)
142142
{
143143
EpidataFilenames s(pydata);
144144

pycode/memilio-simulation/memilio/simulation/bindings/models/osecir.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,18 +286,20 @@ PYBIND11_MODULE(_simulation_osecir, m)
286286
m.def(
287287
"read_input_data_german_county",
288288
[](mio::Graph<mio::osecir::Model<double>, mio::MobilityParameters<double>>& params_graph, mio::Date start_date,
289-
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, const std::string& pydata_path) {
289+
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, std::string& pydata_path) {
290290

291291
auto result = mio::osecir::read_input_data(params_graph.nodes(), start_date, scaling_factor_inf, scaling_factor_icu,
292292
mio::regions::de::EpidataFilenames::county(pydata_path));
293293
return pymio::check_and_throw(result);
294294
},
295-
py::return_value_policy::move);
295+
"Reads compartments for german counties at a specified date from data files.",
296+
py::arg("params_graph"), py::arg("start_date"), py::arg("scaling_factor_inf"), py::arg("scaling_factor_icu"),
297+
py::arg("pydata_path"), py::return_value_policy::move);
296298

297299
m.def(
298300
"create_graph_german_county",
299301
[](const mio::osecir::Parameters<double>& params, mio::Date start_date, mio::Date end_date,
300-
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, const std::string& pydata_path,
302+
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, std::string& pydata_path,
301303
double tnt_capacity_factor) {
302304

303305
auto node_ids = pymio::check_and_throw(mio::get_node_ids(mio::path_join(pydata_path, "county_current_population.json"), true));

pycode/memilio-simulation/memilio/simulation/bindings/models/osecirvvs.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,20 @@ PYBIND11_MODULE(_simulation_osecirvvs, m)
337337
m.def(
338338
"read_input_data_german_county",
339339
[](mio::Graph<mio::osecirvvs::Model<double>, mio::MobilityParameters<double>>& params_graph, mio::Date start_date,
340-
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, const std::string& pydata_path) {
340+
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, std::string& pydata_path) {
341341

342342
auto result = mio::osecirvvs::read_input_data(params_graph.nodes(), start_date, scaling_factor_inf, scaling_factor_icu,
343343
mio::regions::de::EpidataFilenames::county(pydata_path));
344344
return pymio::check_and_throw(result);
345345
},
346-
"Reads compartments for german counties at a specified date from data files."
346+
"Reads compartments for german counties at a specified date from data files.",
347347
py::arg("params_graph"), py::arg("start_date"), py::arg("scaling_factor_inf"), py::arg("scaling_factor_icu"),
348348
py::arg("pydata_path"), py::return_value_policy::move);
349349

350350
m.def(
351351
"create_graph_german_county",
352352
[](const mio::osecirvvs::Parameters<double>& params, mio::Date start_date, mio::Date end_date,
353-
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, const std::string& pydata_path,
353+
const std::vector<double>& scaling_factor_inf, double scaling_factor_icu, std::string& pydata_path,
354354
double tnt_capacity_factor) {
355355

356356
auto node_ids = pymio::check_and_throw(mio::get_node_ids(mio::path_join(pydata_path, "county_current_population.json"), true));

0 commit comments

Comments
 (0)