Following the discussion in #642 it was concluded that the implementation of a generic branch could be an addition to Power Grid Model.
We can make a new component generic_branch3, which model a branch3 as a Pi model; i.e. the user can specify:
k_12 / k_13 / k_23: transformer ratio (float)
theta_12 / theta_13 / theta_23: angle shift
r_series_12 / r_series_13 / r_series_23
x_series_12 / x_series_13 / x_series_23
g_shunt_12 / g_shunt_13 / g_shunt_23
b_shunt_12 / b_shunt_13 / b_shunt_23
generic_branch is implemented in #729.
steps to follow
In order to add a new component to Power Grid Model the following steps need to be taken:
[ ] Check if the available input/update/output data suffices (check power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/input.hpp / update.hpp / output.hpp or in the documentation directly)
[ ] If not, add the new data format to code_generation/data/attribute_classes/input.json / update.json / output.json + run code_generation/code_gen.py
[ ] Create a new component in a new power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/component/[component].hpp file that at least inherits from Base, but in this case GenericBranch3 should inherit from Branch3
[ ] If necessary: add new enums or exceptions
[ ] Create the necessary unit tests in power-grid-model/tests/cpp_unit_tests/test_[component].cpp
[ ] Add the test_[component].cpp to power-grid-model/tests/cpp_unit_tests/CMakeLists.txt
[ ] Add component to power_grid_model_c/power_grid_model/include/power_grid_model/all_components.hpp
[ ] Not necessary for this component (If necessary update main_core/topology.hpp / input.hpp / output.hpp / update.hpp)
[ ] Add component to code_generation/data/dataset_class_maps/dataset_definitions.json + re-run code_generation/code_gen.py
[ ] Add validation test cases to tests/data
[ ] Update input/update data validator for the new component: src/power_grid_model/validation/validation.py + add corresponding tests
Following the discussion in #642 it was concluded that the implementation of a generic branch could be an addition to Power Grid Model.
We can make a new component
generic_branch3
, which model abranch3
as a Pi model; i.e. the user can specify:k_12
/k_13
/k_23
: transformer ratio (float)theta_12
/theta_13
/theta_23
: angle shiftr_series_12
/r_series_13
/r_series_23
x_series_12
/x_series_13
/x_series_23
g_shunt_12
/g_shunt_13
/g_shunt_23
b_shunt_12
/b_shunt_13
/b_shunt_23
generic_branch
is implemented in #729.steps to follow
In order to add a new component to Power Grid Model the following steps need to be taken:
power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/
input.hpp
/update.hpp
/output.hpp
or in the documentation directly)code_generation/data/attribute_classes/
input.json
/update.json
/output.json
+ runcode_generation/code_gen.py
power-grid-model/power_grid_model_c/power_grid_model/include/power_grid_model/component/[component].hpp
file that at least inherits from Base, but in this caseGenericBranch3
should inherit fromBranch3
power-grid-model/tests/cpp_unit_tests/test_[component].cpp
test_[component].cpp
topower-grid-model/tests/cpp_unit_tests/CMakeLists.txt
power_grid_model_c/power_grid_model/include/power_grid_model/all_components.hpp
main_core/topology.hpp
/input.hpp
/output.hpp
/update.hpp
)code_generation/data/dataset_class_maps/dataset_definitions.json
+ re-runcode_generation/code_gen.py
tests/data
src/power_grid_model/validation/validation.py
+ add corresponding testsNote: the order is recommended, but not necessary