-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beta version of security analysis #135
Conversation
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
- using BiconnectivityInspector - using ConnectivityInspector Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Graph calculations are needed in this PR to calculate the connected components; for each contingency we check if connected component is split or not by the equipments removal. As for each contingency we remove only a few edges from the original graph, we might optimize these calculations by implementing a dynamic graph algorithm. A dynamic graph algorithm is an algorithm which is maintaining a result after each graph modification (here edge deletion) in order to avoid unnecessary computations. The algorithm suggested in the related issue #129 is Even-Shiloach'81: complexity of graph update O(n) / of requests O(1), where n is the number of vertices. It has been implemented in previous commit. It is based on 2 processes working simultanously after each edge deletion, the first process which halts stops the other.
Drawbacks:
A few other algorithms exist for this matter:
I'm wondering if we need to go towards those more complex algorithms? Note that jgrapht ConnectivityInspector now supports dynamic graphs... nonetheless, in current version, when a edge is removed all the calculations are reinitialized (with following comment: "for now invalidate cached results, in the future need to amend them") |
To optimize these algorithms, we can use a bridge detection pre-calculation, which will be useful if many contingencies are tested (a bridge is an edge which creates a new connected component if removed). Indeed, that allows not to compute the connected component if we know that the edge removed is not a bridge. AND if only one edge is removed (no fault propagation...). Computing bridges in a graph is a classical problem (see e.g. Hopcroft & Tarjan's algorithm implemented in in jgrapht BiconnectivityInspector) and is done in a single graph scan. Nonetheless I don't know of any algorithm for dynamic graphs supporting edge deletion, so it's only for the first edge deletion. This is of interest if we're dealing with graphs which don't have many bridges. In the network I used for testing, there is about 25% of bridges. Note that among those bridges there are only 15% which produce a new connected component which is bigger than just one node. |
In BridgesTest I used algorithms computing connected components to find bridges in a basic network. Each branch of the network is deleted and I test if the two buses of the branch are still in the same connected component after that deletion. It doesn't correspond exactly to the use case but it already gives an idea of the algorithms performance. On a more complex network of 10000 branches the results are the following on my laptop:
With that same network, the bridges calculation is done in about 5ms. Therefore, the previous execution times are divided
|
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
- now supports internal connections - now supports branching of several switches at an end node - isLineBeforeSwitch removed: lines are never before a switch in traverser (except if the line is the origin of the contingency) Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
- Add the active power loss of a LfContingency. Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Corresponding package: com.powsybl.openloadflow.sa Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Some TODO et FIXME. Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restWhat kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)