Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list of nodes
- nodes = [1,2,3,4]
- # supply or demand of nodes
- #NodeID : [Supply,Demand]
- nodeData = {1:[5,0],
- 2:[0,0],
- 3:[0,0],
- 4:[0,5]}
- # arcs list
- arcs = [ (1,2),
- (1,3),
- (2,3),
- (2,4),
- (3,4)]
- # arcs cost, lower bound and capacity
- #Arc : [Cost,MinFlow,MaxFlow]
- arcData = { (1,2):[2,0,4],
- (1,3):[2,0,2],
- (2,3):[1,0,2],
- (2,4):[3,0,3],
- (3,4):[1,0,5] }
- WYNIK :
- ('Route_(1,_2)', '=', 3.0)
- ('Route_(1,_3)', '=', 2.0)
- ('Route_(2,_3)', '=', 2.0)
- ('Route_(2,_4)', '=', 1.0)
- ('Route_(3,_4)', '=', 4.0)
- ('Total Cost of Transportation = ', 19.0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement