Skip to content

Commit

Permalink
feat(properties): add on load creation/modification
Browse files Browse the repository at this point in the history
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
  • Loading branch information
TheMaskedTurtle committed Jan 10, 2024
1 parent 8fd4ca6 commit ce2e944
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public void apply(Network network, Reporter subReporter) {
}
reportElementaryCreations(subReporter);
ModificationUtils.getInstance().disconnectInjection(modificationInfos, network.getLoad(modificationInfos.getEquipmentId()), subReporter);

// properties
Load load = network.getLoad(modificationInfos.getEquipmentId());
PropertiesUtils.applyProperties(load, subReporter, modificationInfos.getProperties());
}

private void reportElementaryCreations(Reporter subReporter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public void apply(Network network, Reporter subReporter) {
Load load = network.getLoad(modificationInfos.getEquipmentId());
// modify the load in the network
modifyLoad(load, modificationInfos, subReporter);

// properties
PropertiesUtils.applyProperties(load, subReporter, modificationInfos.getProperties());
}

private void modifyLoad(Load load, LoadModificationInfos loadModificationInfos, Reporter subReporter) {
Expand Down

0 comments on commit ce2e944

Please sign in to comment.