Skip to content
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

Take in account RA Usage Limits in 2P Global Opt #1088

Open
bqth29 opened this issue Jul 10, 2024 · 2 comments
Open

Take in account RA Usage Limits in 2P Global Opt #1088

bqth29 opened this issue Jul 10, 2024 · 2 comments
Labels
bug Something isn't working MIP This changes the MIP that optimizes linear ramedial actions

Comments

@bqth29
Copy link
Collaborator

bqth29 commented Jul 10, 2024

Describe the current behavior

When running a second preventive RAO, RA usage limits are not considered (at least for curative instants).

Describe the expected behavior

Take in account all RA usage limits in 2P GO.

Describe the steps

No response

Environment

No response

Relevant Log Output

No response

Extra Information

No response

@bqth29 bqth29 added bug Something isn't working MIP This changes the MIP that optimizes linear ramedial actions labels Jul 10, 2024
@bqth29
Copy link
Collaborator Author

bqth29 commented Jul 11, 2024

After some investigations, I think that this issue can be solved by adding some additional variables and constraints to the MIP if we are running the RAO in 2P Global Opt mode. The preventive RA usage limits can be kept for the 2P search tree and preventive range actions.

However, the curative RA usage limits must be passed as MIP data because all curative range actions are optimized at the same time. Below is a summary of the changes one could make to take in account curative RA usage limits.

Note: some mathematical constants are defined in the dedicated RA usage limits MIP page in our online documentation.

In the following we will only consider curative states.

Finally, as a reminder, RA usage limits are cumulative among instants of the same kind (e.g. among curative instants).

Preliminary notations

Let $s$ be a curative state and $tso$ be a TSO.

  • $\tau(s)$ is the number of topological remedial actions that were applied at state $s$ during the first RAO
  • $\tau_{TSO}(s, tso)$ is the number of topological remedial actions of TSO $tso$ that were applied at state $s$ during the first RAO
  • $e(s, tso)$ is the number of elementary actions of TSO $tso$ that were applied at state $s$ during the first RAO

Besides, for a given curative state $s$, we will denote $\mathcal{S}_{prev}(s)$ the set of states that:

  • are curative
  • share the same contingency as $s$
  • occur before $s$ (i.e. their associated instant $i'$ comes before $i$)

Note that $s \in \mathcal{S}^{prev}(s)$

Finally, $t(s)$ denotes the number of TSOs that have applied a remedial action at state $s$ or in any previous curative state (for the same contingency).

Maximum number of remedial actions

Let $i$ be a curative instant The maximum number of remedial actions that can be used at the instant $i$ is $RA_{\max}(i)$ and is defined in the CRAC.

In 2P Global Opt, we are optimizing all curative states at the same time which means that states associated to different contingencies are being considered in the same MIP model so the $RA_{\max}(i)$ has to be duplicated for each contingency scenario to keep the independence among these contingency scenarios.

Thus, for each state $s$ and its associated curative instant $i$, we define the maximum number of remedial actions applicable for this state as $RA_{\max}^{*}(s) = RA_{\max}(i) - \tau(s)$.

To account for the cumulative behavior of this RA usage limit among the curative instants, we need to add the following constraints to the MIP:

$$\forall s \text{ curative}, \sum_{s' \in \mathcal{S}^{prev}(s)} \sum_{r \in \mathcal{RA}} \delta(r, s') \leq RA_{\max}^{*}(s)$$

Maximum number of remedial actions per TSO

Similarly to the previous section, we introduce for all state $s$ (with associated instant $i$) and TSO $tso$ the maximum number of remedial actions applicable at state $s$ for TSO $tso$: $RA_{\max}^{TSO *}(s, tso) = RA_{\max}^{TSO}(i, tso) - \tau_{TSO}(s, tso)$; and we add the following constraints:

$$\forall s, \forall tso, \sum_{s' \in \mathcal{S}^{prev}(s)} \sum_{r \in \mathcal{RA}(tso)} \delta(r, s') \leq RA_{\max}^{TSO *}(s, tso)$$

Maximum number of PST per TSO

We introduce for all state $s$ (with associated instant $i$) and TSO $tso$ the maximum number of PST remedial actions applicable at state $s$ for TSO $tso$: $PST_{\max}^{TSO *}(s, tso) = PST_{\max}^{TSO}(i, tso)$; and we add the following constraints:

$$\forall s, \forall tso, \sum_{s' \in \mathcal{S}^{prev}(s)} \sum_{r \in \mathcal{RA}(tso), r \text{ is a PST}} \delta(r, s') \leq PST_{\max}^{TSO *}(s, tso)$$

Maximum number of elementary actions per TSO

We introduce for all state $s$ (with associated instant $i$) and TSO $tso$ the maximum number of elementary actions applicable at state $s$ for TSO $tso$: $EA_{\max}^{TSO *}(s, tso) = EA_{\max}^{TSO}(i, tso) - e(s, tso)$; and we add the following constraints:

$$\forall s, \forall tso, \sum_{s' \in \mathcal{S}^{prev}(s)} \sum_{r \in \mathcal{RA}(tso), r \text{ is a PST}} \Delta t(r, s') \leq EA_{\max}^{TSO *}(s, tso)$$

Maximum number of TSOs

We introduce for all state $s$ (with associated instant $i$) the maximum number of TSOs that can apply a remedial action at state $s$ or before: $TSO_{\max}^{*}(s) = TSO_{\max}(i) - t(s)$.

We already have the variables that indicate if a TSO $tso$ has a range action activated at state $s$, denoted $\delta^{TSO}(tso, s)$. We now introduce a cumulative binary variable $\delta^{TSO +}(tso, s)$ that indicates whether $tso$ activated a remedial action of its own during $s$ or any previous state (for the same contingency). This implies to add the constraints:

$$\forall s, \forall tso, \delta^{TSO}(tso, s) \leq \delta^{TSO +}(tso, s)$$

And we can finally add the RA usage limit constraints:

$$\forall s, \sum_{s' \in \mathcal{S}^{prev}(s)} \sum_{tso} \delta^{TSO +}(tso, s') \leq TSO_{\max}^{*}(s)$$

@Godelaine
Copy link
Collaborator

update : still needed for all listed RA Usage limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MIP This changes the MIP that optimizes linear ramedial actions
Projects
None yet
Development

No branches or pull requests

2 participants