Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Caio Luke <caioluke97@gmail.com>
  • Loading branch information
caioluke committed Sep 13, 2024
1 parent 8bd347c commit 74f6a29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/flow_decomposition/algorithm-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The difference between reference AC flow and the sum of the parts of the decompo
parts proportionally to their rectified linear unit ($\mathrm{ReLU}(x) = \mathrm{max}(x, 0)$).

#### Proportional rescaling
Each flow is rescaled by a proportional coefficient. The coefficient is defined by $$\alpha_{\text{rescale}} = \frac{max(|AC p1|, |AC p2|)}{|DC p1|}$$.
Each flow is rescaled by a proportional coefficient. The coefficient is defined by $\alpha_{\text{rescale}} = \frac{max(|AC p1|, |AC p2|)}{|DC p1|}$.
In this way, the DC flow will have the same magnitude as the AC flow.
Since we divide by the DC flow to calculate the coefficient, lines with a too small DC flow are not rescaled.

Expand All @@ -137,10 +137,10 @@ Therefore, we first compare AC current overloads to find which terminal (1 or 2)
In case there are missing limits, we just compare AC currents instead of overloads.
Hence, the coefficient is defined as
1) With current limits:
- if $$\frac{AC I1}{I_{max}1} >= \frac{AC I2}{I_{max}2}$$, then $$\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I1 \cdot \frac{V1_{nominal}}{1000}}{|DC p1|}$$
- else, $$\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I2 \cdot \frac{V2_{nominal}}{1000}}{|DC p1|}$$
- if $\frac{AC I1}{I_{max}1} >= \frac{AC I2}{I_{max}2}$, then $\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I1 \cdot \frac{V1_{nominal}}{1000}}{|DC p1|}$
- else, $\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I2 \cdot \frac{V2_{nominal}}{1000}}{|DC p1|}$
2) Without current limits:
- if $$AC I1 >= AC I2$$, then $$\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I1 \cdot \frac{V1_{nominal}}{1000}}{|DC p1|}$$
- else, $$\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I2 \cdot \frac{V2_{nominal}}{1000}}{|DC p1|}$$
- if $AC I1 >= AC I2$, then $\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I1 \cdot \frac{V1_{nominal}}{1000}}{|DC p1|}$
- else, $\alpha_{\text{rescale}} = \frac{\sqrt{3} \cdot AC I2 \cdot \frac{V2_{nominal}}{1000}}{|DC p1|}$

Since we divide by the DC flow to calculate the coefficient, lines with a too small DC flow are not rescaled.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public interface FlowDecompositionObserver {
/**
* Called when the DC loadflow is computed (for base case or contingency)
*
* @param flows the terminal 1 flow for all branches
* @param flows the flows for all branches
*/
void computedDcFlows(Map<String, Double> flows);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void testNStateN1AndN2PostContingencyState() {

// Checking DC flows
for (var contingencyId : List.of(BASE_CASE, contingencyId1, contingencyId2)) {
assertEquals(allBranches, report.acFlowsTerminal1.forContingency(contingencyId).keySet());
assertEquals(allBranches, report.dcFlows.forContingency(contingencyId).keySet());
}
}

Expand Down

0 comments on commit 74f6a29

Please sign in to comment.