GenXProject / GenX.jl

GenX: a configurable power system capacity expansion model for studying low-carbon energy futures. More details at : https://genx.mit.edu
https://genxproject.github.io/GenX.jl/
GNU General Public License v2.0
256 stars 105 forks source link

[Bug]: wrong contraint expression in reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) doc #689

Closed mrchamanbaz closed 2 months ago

mrchamanbaz commented 2 months ago

Bug description

Hi There is a typo in the reserves_contingency help file. There is nothing wrong with the actual constraint, but there is a typo in the latex expression explaining the constraint.

The following expression is wrong and does not capture the actual constraint in the code: \begin{aligned} &Contingency \geq \Omega^{size}{y,z} \times \alpha^{Contingency,Aux}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ &\alpha^{Contingency,Aux}{y,z} \leq \Delta^{\text{total}}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ &\alpha^{Contingency,Aux}_{y,z} \geq My \times \Delta^{\text{total}}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ \end{aligned}

The correct expression is: \begin{aligned} &Contingency \geq \Omega^{size}{y,z} \times \alpha^{Contingency,Aux}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ &\alpha^{Contingency,Aux}{y,z} \leq \Delta^{\text{total}}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ & \Delta^{\text{total}}_{y,z} \leq My \times \alpha^{Contingency,Aux}{y,z} & \forall y \in \mathcal{UC}, z \in \mathcal{Z}\ \end{aligned}

The same problem exists in Dynamic commitment-based contingency Option 3.

Environment and Version

Windows OS, Julia 1.10.2

Relevant error messages

No response

Additional context

No response

lbonaldo commented 2 months ago

Thank you, @mrchamanbaz, for opening this issue. Following your suggestion, we've updated the docstring, and this change will be incorporated into the upcoming release.