Shortest Path Problem: Constraints
Shortest Path Problem: Constraints
X12 X13 X21 X23 X24 X25 X31 X32 X35 X42 X45
cars flowing
through path
100 200 100 50 200 100 200 50 40 200 150
Constraints:
Node 1 -1 -1 1 1
Node 2 1 -1 -1 -1 -1 1 1
Node 3 1 1 -1 -1 -1
Node 4 1 -1 -1
Node 5 1 1 1
Node 6
Decision variables
Objective function
Left-hand-side of constraints
LHS Left-hand-side
RHS Right-hand-side
X46 X52 X53 X54 X56 X64 X65
0.0 = -1
1 0.0 = 0
1 0.0 = 0
-1 1 1 0.0 = 0
-1 -1 -1 -1 1 0.0 = 0
1 1 -1 -1 0.0 = 1
LHS Sign RHS
Shortest Path Problem
X12 X13 X21 X23 X24 X25 X31 X32 X35 X42 X45
cars flowing
through path 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0
100 200 100 50 200 100 200 50 40 200 150
Constraints:
Node 1 -1 -1 1 1
Node 2 1 -1 -1 -1 -1 1 1
Node 3 1 1 -1 -1 -1
Node 4 1 -1 -1
Node 5 1 1 1
Node 6
Decision variables
Objective function
Left-hand-side of constraints
LHS Left-hand-side
RHS Right-hand-side
X46 X52 X53 X54 X56 X64 X65
-1.0 = -1
1 0.0 = 0
1 0.0 = 0
-1 1 1 0.0 = 0
-1 -1 -1 -1 1 0.0 = 0
1 1 -1 -1 1.0 = 1
LHS Sign RHS