Skip to content

Commit

Permalink
graph: cleanup assignment_min_cost_flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 7, 2024
1 parent 66d16a6 commit ed1adfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ortools/graph/samples/assignment_min_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def main():

# [START constraints]
# Add each arc.
for idx, _ in enumerate(start_nodes):
smcf.add_arc_with_capacity_and_unit_cost(
start_nodes[idx], end_nodes[idx], capacities[idx], costs[idx]
)
for start_node, end_node, capacity, cost in zip(
start_nodes, end_nodes, capacities, costs
):
smcf.add_arc_with_capacity_and_unit_cost(start_node, end_node, capacity, cost)
# Add node supplies.
for idx, supply in enumerate(supplies):
smcf.set_node_supply(idx, supply)
Expand Down

0 comments on commit ed1adfb

Please sign in to comment.