Skip to content

Commit

Permalink
Bugfix h2_network loc
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f committed Jul 11, 2024
1 parent 49abe0d commit 3db1f23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def add_h2_network_cap(n, cap):
logger.warning(
f"Impossible to set H2 cap for the following links: {diff_index}"
)
lhs = linexpr((h2_network.length, h2_network_cap[subset_index])).sum()
lhs = linexpr(
(h2_network.loc[subset_index, "length"], h2_network_cap[subset_index])
).sum()
# lhs = linexpr((1, h2_network_cap[h2_network.index])).sum()
rhs = cap * 1000
define_constraints(n, lhs, "<=", rhs, "h2_network_cap")
Expand Down

0 comments on commit 3db1f23

Please sign in to comment.