Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomha committed Dec 20, 2024
1 parent 4bbd086 commit 63fbdf6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions docs/src/formulation_library/Branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
7. [`HVDCTwoTerminalPiecewiseLoss`](#HVDCTwoTerminalPiecewiseLoss)
8. [`HVDCTwoTerminalVSCLoss`](#HVDCTwoTerminalVSCLoss)
9. [`HVDCTwoTerminalVSCLossBilinear`](#HVDCTwoTerminalVSCLossBilinear)
10. [`HVDCTwoTerminalVSCLossQuadratic`](#HVDCTwoTerminalVSCLossQuadratic)
11. [`PhaseAngleControl`](#PhaseAngleControl)
12. [Valid configurations](#Valid-configurations)
10. [`HVDCTwoTerminalVSCLossQuadratic`](#HVDCTwoTerminalVSCLossQuadratic)
11. [`PhaseAngleControl`](#PhaseAngleControl)
12. [Valid configurations](#Valid-configurations)

## `StaticBranch`

Expand Down Expand Up @@ -310,7 +310,6 @@ In addition, the `HVDCLosses` are subtracted to the `from` bus in the `ActivePow

* * *


## `HVDCTwoTerminalPiecewiseLoss`

Formulation valid for `PTDFPowerModel` Network model
Expand All @@ -327,6 +326,7 @@ This formulation creates uses ``S`` segments to define different loss factors (p

+ Bounds: ``[R^\text{from,min}, R^\text{from,max}]``
+ Symbol: ``f^\text{from}``

- [`HVDCActivePowerReceivedToVariable`](@ref):

+ Bounds: ``[R^\text{to,min}, R^\text{to,max}]``
Expand Down Expand Up @@ -378,6 +378,7 @@ Define ``n=2S+2``, then the following constraints are used to specify the segmen
0 \le w_i \le z_i \text { for } i=1, ..., n-1 &&
\end{align*}
```

with ``w_{S+1} = 0`` to prevent a solution in the deadband. Then the receiving flows can be computed as:

```math
Expand All @@ -403,6 +404,7 @@ HVDCTwoTerminalVSCLoss

+ Bounds: ``[P^\text{from,min}, P^\text{from,max}]``
+ Symbol: ``p_c^\text{from}``

- [`HVDCActiveDCPowerSentToVariable`](@ref):

+ Bounds: ``[P^\text{to,min}, P^\text{to,max}]``
Expand Down Expand Up @@ -584,7 +586,6 @@ Each `HVDCActiveDCPowerSentFromVariable` ``f^\text{from}`` and `HVDCActiveDCPowe
\end{align*}
```


* * *

## `HVDCTwoTerminalVSCLossBilinear`
Expand All @@ -601,6 +602,7 @@ HVDCTwoTerminalVSCLossBilinear

+ Bounds: ``[P^\text{from,min}, P^\text{from,max}]``
+ Symbol: ``p_c^\text{from}``

- [`HVDCActiveDCPowerSentToVariable`](@ref):

+ Bounds: ``[P^\text{to,min}, P^\text{to,max}]``
Expand Down Expand Up @@ -629,7 +631,6 @@ HVDCTwoTerminalVSCLossBilinear

+ Symbol: ``p_c^{loss}``


**Static Parameters**

- ``P^\text{from,min}`` = `PowerSystems.get_active_power_limits_from(branch).min`
Expand Down Expand Up @@ -663,7 +664,6 @@ Each `HVDCActiveDCPowerSentFromVariable` ``p^\text{from}`` and `HVDCActiveDCPowe
(p_{c,t}^{from})^2 + (q_{c,t}^{from})^2 \le \text{rating}^2, & \ \forall c \in \mathcal{C}, \ \forall t \in \mathcal{T} \\
(p_{c,t}^{to})^2 + (q_{c,t}^{to})^2 \le \text{rating}^2, & \ \forall c \in \mathcal{C}, \ \forall t \in \mathcal{T}
\end{align*}
```

* * *
Expand All @@ -682,6 +682,7 @@ HVDCTwoTerminalVSCLossQuadratic

+ Bounds: ``[P^\text{from,min}, P^\text{from,max}]``
+ Symbol: ``p_c^\text{from}``

- [`HVDCActiveDCPowerSentToVariable`](@ref):

+ Bounds: ``[P^\text{to,min}, P^\text{to,max}]``
Expand Down Expand Up @@ -714,11 +715,11 @@ The `loss` term is a `PowerSystems.QuadraticCurve` that has the quadratic term `

**Expressions:**

Each `HVDCActiveDCPowerSentFromVariable` ``p^\text{from}`` and `HVDCActiveDCPowerSentToVariable` ``p^\text{to}`` is added to the nodal balance expression `ActivePowerBalance`, by subtracting the received flow to the respective bus. That is, ``p^\text{from}`` subtract the flow to the `from` bus, while ``p^\text{to}`` subtract the flow to the `to` bus. Similarly for the reactive power variables.
Each `HVDCActiveDCPowerSentFromVariable` ``p^\text{from}`` and `HVDCActiveDCPowerSentToVariable` ``p^\text{to}`` is added to the nodal balance expression `ActivePowerBalance`, by subtracting the received flow to the respective bus. That is, ``p^\text{from}`` subtract the flow to the `from` bus, while ``p^\text{to}`` subtract the flow to the `to` bus. Similarly for the reactive power variables.

**Constraints:**

The quadratic model only approximates losses in the `from` side of the line, proportional to the `from` power sent or received.
The quadratic model only approximates losses in the `from` side of the line, proportional to the `from` power sent or received.

```math
\begin{align*}
Expand All @@ -727,7 +728,6 @@ The quadratic model only approximates losses in the `from` side of the line, pro
(p_{c,t}^{from})^2 + (q_{c,t}^{from})^2 \le \text{rating}^2, & \ \forall c \in \mathcal{C}, & \ \forall t \in \mathcal{T} \\
(p_{c,t}^{to})^2 + (q_{c,t}^{to})^2 \le \text{rating}^2, & \ \forall c \in \mathcal{C}, \ \forall t \in \mathcal{T}
\end{align*}
```

* * *
Expand Down
2 changes: 1 addition & 1 deletion src/devices_models/devices/TwoTerminalDC_branches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,7 @@ function add_constraints!(
for t in time_steps
constraint[name, t] = JuMP.@constraint(
JuMPmodel,
power_from_var[name, t] - losses_var[name, t] == -power_to_var[name, t]
power_from_var[name, t] - losses_var[name, t] == -power_to_var[name, t]
)
end
end
Expand Down

0 comments on commit 63fbdf6

Please sign in to comment.