Skip to content

Commit

Permalink
Filter B_flow in the highest resolution expressions (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed Dec 5, 2023
1 parent 3e91b75 commit feaf33c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ function create_model(
model,
incoming_flow_highest_resolution[a A, rp RP, B Ph[(a, rp)]],
sum(
duration(B, B_flow, rp) * flow[(u, a), rp, B_flow] for u in inneighbor_labels(graph, a),
B_flow graph[u, a].partitions[rp]
duration(B, B_flow, rp) * flow[(u, a), rp, B_flow] for
u in inneighbor_labels(graph, a), B_flow graph[u, a].partitions[rp] if
B_flow[end] B[1] && B[end] B_flow[1]
)
)

Expand All @@ -219,7 +220,8 @@ function create_model(
outgoing_flow_highest_resolution[a A, rp RP, B Ph[(a, rp)]],
sum(
duration(B, B_flow, rp) * flow[(a, v), rp, B_flow] for
v in outneighbor_labels(graph, a), B_flow graph[a, v].partitions[rp]
v in outneighbor_labels(graph, a), B_flow graph[a, v].partitions[rp] if
B_flow[end] B[1] && B[end] B_flow[1]
)
)

Expand Down

0 comments on commit feaf33c

Please sign in to comment.