WARNING: this feature is deprecated and will be removed in a future release. If you are still using it, please get in touch with us.
Executable: antares-kirchhoff-constraints-builder (currently released for Windows & Ubuntu only)
Binding Constraints can take many forms (hourly, daily, weekly), involve flows or thermal generated power, etc. Sets of binding constraints of special interest are those which can be used to model and enforce Kirchhoff's second law on the AC flows.
In other words, it is possible to make Antares work as a genuine DC OPF, provided that consistent binding constraints are written down for each cycle belonging to any cycle basis of the graph made out from all AC components of the power system (V vertices, E edges).
The declaration of binding constraints can be made manually through the regular GUI. However, it is preferable not to carry out this task that way because there are many different possible formulations, among which some are better than others:
-
In a fully connected graph (V, E), there are as many binding constraints to write down as there are cycles in any cycle basis of the graph, which amounts to (E+1-V). The number of different possible basis is equal to that of spanning trees, which can be assessed by the Kirchhoff's theorem 1
-
Among all cycle basis, some should be preferred to others because they lead to a sparser constraint matrix.
To get around this issue, the KCG is an autonomous Antares module (much like the time-series analyzer) which automatically instantiates a set of adequate binding constraints that will enforce Kirchhoff's law on the AC subgraph of the power system. The graph cycle basis associated with the generated constraints is optimal, in that sense that it leads to a constraint matrix as sparse as possible. To achieve that, the KCG implements an efficient algorithm yielding a minimal cycle basis 2 and, for all cycles of the chosen basis, generates constraints of the form:
Where
Beyond this basic purpose, the KCG is meant to provide additional modeling capacities, so as to allow the representation of two important phenomena:
- As a rule, the power system graph represented in Antares in not fully detailed, it is usually more a "backbone" approximation, in which "vertices" are not equivalent to individual bus-bars. More likely, vertices of the graph stand for whole regions, or even countries: as a consequence, it is highly possible that when all Areas/Vertices have a zero-balance (neither import, nor export), there are real physical flows between them, so-called "loop flows". If assessments of the level of these loop flows are available (and filled out as link input data), the KCG may include them (on user's request) in the binding constraints formulation, which becomes:
- To mitigate the effects of actual loop flows, or more generally to allow the transmission assets to give the maximum of their potential, the power system may include components such as phase-shifting transformers, whose function can be modeled by changing the formulation of the binding constraints. Provided that estimates of the shifting capacities (
$Y_l^-$ ,$Y_l^+$ ) of the installed PST are known and filled out in the link data section, the KCG will (on user's request) automatically reformulate the binding constraints as:
with:
Besides, the KCG takes into account the fact that the "best estimates" of all critical data (loop flows, phase-shifting ratings, or even impedances) may vary in time: In such cases, the KCG formulates as many different binding constraints as necessary to model this operating context diversity, and relax them when appropriate (by setting the right hand sides of the equation to +/- infinite)
From a practical standpoint, assessments of
In addition to the previous functionalities, the KCG's GUI also includes the following options:
- Choice of a specific period of time for which the constraints should be applied, while completely relaxed at other moments
- Before actual generation of binding constraints, preview of the "minimal length" spanning tree used as starting point for the optimal basis algorithm (left column of the table – links displayed with "0" do not belong to the tree)
- Before actual generation of binding constraints, preview of the "optimal cycle basis" used as starting point for constraints generation (right column of the table – links displayed with "n" appear in n different cycles of the basis)
The kirchhoff constraint generator is a standalone tool used to automatically create kirchhoff constraints. For more details about this process read:
7-kirchhoffs_constraint_generator.md
The binary is located in Antares_Simulator/bin/
./antares-kirchhoff-constraints-builder [study_path] [option_file_path]
study_path: the path of the study, mandatory
option_file_path: Optional. The path of the constraintbuilder.ini file. It's normally located in study_path/settings/. If not provided the constraint builder will take the default values, which are defined at the end of cbuilder.h.
Those values were used to fill the GUI default values, and then the GUI created the file. That's why it's optional since only the default values are guaranteed to work.
New constraints generated this way will be stored in input/bindingconstraints/ with the name uto_0001.txt, with incrementing numbers. The file bindingconstraints.ini located in the same directory will be updated accordingly.
Note: the outputs of the Kirchhoff's constraints generator are not printed in the general output files but kept within the input files structure, the reason being that they are input data for the proper Antares simulation.
The associated data, the so-called binding constraints, bear in their name the prefix "@UTO-".
The study only needs to include the following components to generate kirchhoff constraints:
- Areas (contains links)
- Binding Constraints
- version number