Skip to content

Commit

Permalink
fix: don't reuse global model params, fixes #871 and #872
Browse files Browse the repository at this point in the history
  • Loading branch information
hellkite500 committed Aug 16, 2024
1 parent 761d910 commit 629e73e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/realizations/catchment/Formulation_Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,11 @@ namespace realization {
//because they will eventually be used by someone, someday, looking at configurations
//being turned into concrecte formulations...
// geojson::JSONProperty::print_property(global_config.formulation.parameters.at("modules"));
global_config.formulation.link_external(feature);
// geojson::JSONProperty::print_property(global_config.formulation.parameters.at("modules"));
missing_formulation->create_formulation(global_config.formulation.parameters);

//Make a copy of the global configuration so parameters don't clash when linking to external data
auto formulation = realization::config::Formulation(global_config.formulation);
formulation.link_external(feature);
missing_formulation->create_formulation(formulation.parameters);

return missing_formulation;
}
Expand Down

0 comments on commit 629e73e

Please sign in to comment.