Skip to content

Commit

Permalink
Filter NaN flows from MIP (#1014)
Browse files Browse the repository at this point in the history
* Filter out NaN values from CoreProblemFiller for flows, sensitivities, ptdfs

Signed-off-by: Peter Mitri <[email protected]>
  • Loading branch information
pet-mit authored May 24, 2024
1 parent a4419b7 commit 1a2ac67
Show file tree
Hide file tree
Showing 49 changed files with 1,141 additions and 877 deletions.
24 changes: 13 additions & 11 deletions docs/castor/linear-problem/core-problem-filler.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

## Used input data

| Name | Symbol | Details |
|-----------------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| FlowCnecs | $c \in \mathcal{C}$ | set of FlowCnecs. Note that FlowCnecs are all the CBCO for which we compute the flow in the MILP, either: <br> - because we are optimizing their flow (optimized flowCnec = CNEC) <br> - because we are monitoring their flow, and ensuring it does not exceed its threshold (monitored flowCnec = MNEC) <br> - or both |
| RangeActions | $r,s \in \mathcal{RA}$ | set of RangeActions and state on which they are applied, could be PSTs, HVDCs, or injection range actions |
| RangeActions | $r \in \mathcal{RA(s)}$ | set of RangeActions available on state $s$, could be PSTs, HVDCs, or injection range actions |
| Iteration number | $n$ | number of current iteration |
| ReferenceFlow | $f_{n}(c)$ | reference flow, for FlowCnec $c$. <br>The reference flow is the flow at the beginning of the current iteration of the MILP, around which the sensitivities are computed |
| PrePerimeterSetpoints | $\alpha _0(r)$ | setpoint of RangeAction $r$ at the beginning of the optimization |
| ReferenceSetpoints | $\alpha _n(r)$ | setpoint of RangeAction $r$ at the beginning of the current iteration of the MILP, around which the sensitivities are computed |
| Sensitivities | $\sigma _{n}(r,c,s)$ | sensitivity of RangeAction $r$ on FlowCnec $c$ for state $s$ |
| Previous RA setpoint | $A_{n-1}(r,s)$ | optimal setpoint of RangeAction $r$ on state $s$ in previous iteration ($n-1$) |
| Name | Symbol | Details |
|-----------------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| FlowCnecs | $c \in \mathcal{C}$ | set of FlowCnecs[^1]. Note that FlowCnecs are all the CBCO for which we compute the flow in the MILP, either: <br> - because we are optimizing their flow (optimized flowCnec = CNEC) <br> - because we are monitoring their flow, and ensuring it does not exceed its threshold (monitored flowCnec = MNEC) <br> - or both |
| RangeActions | $r,s \in \mathcal{RA}$ | set of RangeActions and state on which they are applied, could be PSTs, HVDCs, or injection range actions |
| RangeActions | $r \in \mathcal{RA(s)}$ | set of RangeActions available on state $s$, could be PSTs, HVDCs, or injection range actions |
| Iteration number | $n$ | number of current iteration |
| ReferenceFlow | $f_{n}(c)$ | reference flow, for FlowCnec $c$. <br>The reference flow is the flow at the beginning of the current iteration of the MILP, around which the sensitivities are computed |
| PrePerimeterSetpoints | $\alpha _0(r)$ | setpoint of RangeAction $r$ at the beginning of the optimization |
| ReferenceSetpoints | $\alpha _n(r)$ | setpoint of RangeAction $r$ at the beginning of the current iteration of the MILP, around which the sensitivities are computed |
| Sensitivities | $\sigma _{n}(r,c,s)$ | sensitivity of RangeAction $r$ on FlowCnec $c$ for state $s$ |
| Previous RA setpoint | $A_{n-1}(r,s)$ | optimal setpoint of RangeAction $r$ on state $s$ in previous iteration ($n-1$) |

[^1]: CNECs that belong to a state for which sensitivity computations failed are ignored in the MILP

## Used parameters

Expand Down
18 changes: 9 additions & 9 deletions docs/castor/linear-problem/max-loop-flow-filler.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Used input data

| Name | Symbol | Details |
|---------------------------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| LoopFlowCnecs | $c \in \mathcal{C} ^{lf}$ | Set of FlowCnecs with a loop-flow threshold. (for example, in CORE CC, loop-flows are monitored on cross-border CNECs). LoopFlowCnecs is a subset of [FlowCnecs](core-problem-filler.md#input-data): $\mathcal{C} ^{lf} \subset \mathcal{C}$ |
| Reference commercial flow | $f^{commercial} (c)$ | Commercial flow[^1], of LoopFlowCnec $c$, at the beginning of the optimization, in MW. |
| initial loop-flow | $f^{loop} _ {0} (c)$ | loop-flow before RAO of LoopFlowCnec $c$, in MW |
| loop-flow threshold | $lf^{threshold} (c)$ | loop-flow threshold of the LoopFlowCnec $c$, in MW, as defined in the CRAC. |

[^1]: The commercial flow is computed oustide the MILP,
see [loop-flow computation](/castor/special-features/loop-flows.md#computation)
| Name | Symbol | Details |
|---------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| LoopFlowCnecs | $c \in \mathcal{C} ^{lf}$ | Set of FlowCnecs[^1] with a loop-flow threshold. (for example, in CORE CC, loop-flows are monitored on cross-border CNECs). LoopFlowCnecs is a subset of [FlowCnecs](core-problem-filler.md#input-data): $\mathcal{C} ^{lf} \subset \mathcal{C}$ |
| Reference commercial flow | $f^{commercial} (c)$ | Commercial flow[^2], of LoopFlowCnec $c$, at the beginning of the optimization, in MW. |
| initial loop-flow | $f^{loop} _ {0} (c)$ | loop-flow before RAO of LoopFlowCnec $c$, in MW |
| loop-flow threshold | $lf^{threshold} (c)$ | loop-flow threshold of the LoopFlowCnec $c$, in MW, as defined in the CRAC. |

[^1]: CNECs that belong to a state for which sensitivity computations failed are ignored in the MILP
[^2]: The commercial flow is computed oustide the MILP, see [loop-flow computation](/castor/special-features/loop-flows.md#computation)

## Used parameters

Expand Down
14 changes: 8 additions & 6 deletions docs/castor/linear-problem/max-min-margin-filler.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

## Used input data

| Name | Symbol | Details |
|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| OptimisedFlowCnecs | $c \in \mathcal{C} ^{o}$ | Set of FlowCnecs which are ['optimised'](/input-data/crac/json.md#optimised-and-monitored-cnecs). OptimisedFlowCnecs is a subset of [FlowCnecs](core-problem-filler.md#used-input-data): $\mathcal{C} ^{o} \subset \mathcal{C}$ |
| upper threshold | $f^{+}_{threshold} (c)$ | Upper threshold of FlowCnec $c$, in MW, as defined in the CRAC |
| lower threshold | $f^{-}_{threshold} (c)$ | Lower threshold of FlowCnec $c$, in MW, defined in the CRAC |
| nominal voltage | $U_{nom}(c)$ | Nominal voltage of OptimizedFlowCnec $c$ |
| Name | Symbol | Details |
|--------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| OptimisedFlowCnecs | $c \in \mathcal{C} ^{o}$ | Set of FlowCnecs[^1] which are ['optimised'](/input-data/crac/json.md#optimised-and-monitored-cnecs). OptimisedFlowCnecs is a subset of [FlowCnecs](core-problem-filler.md#used-input-data): $\mathcal{C} ^{o} \subset \mathcal{C}$ |
| upper threshold | $f^{+}_{threshold} (c)$ | Upper threshold of FlowCnec $c$, in MW, as defined in the CRAC |
| lower threshold | $f^{-}_{threshold} (c)$ | Lower threshold of FlowCnec $c$, in MW, defined in the CRAC |
| nominal voltage | $U_{nom}(c)$ | Nominal voltage of OptimizedFlowCnec $c$ |

[^1]: CNECs that belong to a state for which sensitivity computations failed are ignored in the MILP

## Used parameters

Expand Down
Loading

0 comments on commit 1a2ac67

Please sign in to comment.