Skip to content

Commit 27ac054

Browse files
committed
Add some comments.
1 parent 684e38b commit 27ac054

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/models/solve_allocation_by_duality.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,16 @@ function hessian_duality(
210210
for k in neighbors
211211
if jd == j # P^x_j
212212
diff = Pjn[k, n] - Pjn[j, n]
213-
if diff >= 0
213+
if diff >= 0 # Flows in the direction of k
214214
term += m1dbeta * (Pjn[k, n] / Pjn[j, n])^2 * Qjkn[j, k, n] / diff
215-
else
215+
else # Flows in the direction of j
216216
term += m1dbeta * Qjkn[k, j, n] / abs(diff)
217217
end
218218
elseif jd == k # P^x_k
219219
diff = Pjn[k, n] - Pjn[j, n]
220-
if diff >= 0
220+
if diff >= 0 # Flows in the direction of k
221221
term -= m1dbeta * Pjn[k, n] / Pjn[j, n] * Qjkn[j, k, n] / diff
222-
else
222+
else # Flows in the direction of j
223223
term -= m1dbeta * Pjn[j, n] / Pjn[k, n] * Qjkn[k, j, n] / abs(diff)
224224
end
225225
end

0 commit comments

Comments
 (0)