diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/update.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/update.hpp index a2c69dfe9..2ec63f012 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/update.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/update.hpp @@ -127,7 +127,7 @@ UpdateCompProperties check_component_independence(ConstDataset const& update_dat } template -using UpdateIndependence = std::array>; +using UpdateIndependence = std::array>; inline void validate_update_data_independence(UpdateCompProperties const& comp, std::string const& comp_name) { if (comp.is_empty_component()) { @@ -218,16 +218,14 @@ std::vector get_component_sequence(MainModelState con template utils::SequenceIdx get_all_sequence_idx_map(MainModelState const& state, ConstDataset const& update_data, - Idx scenario_idx, - main_core::utils::ComponentFlags const& components_to_store, + Idx scenario_idx, utils::ComponentFlags const& components_to_store, independence::UpdateIndependence const& independence, bool cached = true) { return utils::run_functor_with_all_types_return_array( [&state, &update_data, scenario_idx, &components_to_store, &independence, cached]() { - auto const comp_properties = - std::get>(independence); + auto const comp_properties = std::get>(independence); bool const is_comp_independent = cached ? comp_properties.is_independent() : !comp_properties.is_independent(); - if (!std::get>(components_to_store) || + if (!std::get>(components_to_store) || !is_comp_independent) { return std::vector{}; } @@ -239,9 +237,9 @@ get_all_sequence_idx_map(MainModelState const& state, ConstD // The sequence idx map of the batch is the same as that of the first scenario in the batch (assuming homogeneity) // This is the entry point for permanent updates. template -main_core::utils::SequenceIdx +utils::SequenceIdx get_all_sequence_idx_map(MainModelState const& state, ConstDataset const& update_data, - main_core::utils::ComponentFlags const& components_to_store, + utils::ComponentFlags const& components_to_store, independence::UpdateIndependence const& independence) { return get_all_sequence_idx_map(state, update_data, 0, components_to_store, independence); }