Professional Documents
Culture Documents
TA9
TA9
TA9
Problem 1
max P 6x1 8x2
s.t.
30x1 20x2 310
5x1 10x2 113
0 x1 , x2
16
15
14
13
12
11
Problem 1 solution:
10
9 x1 4.2
8 x2 9.2 ץוליא1
1Const
ץוליא2
2Const
7
P 98.8
6
0
0 5 10 15 20 25
Step 2 – dividing the original problem to two
Branch-Problems
If we got a non integer solution, we will arbitrarily choose one of the
non-integer variables and solve 2 sub-problems – each problem is
with an additional constraint.
• We will choose to branch in relation to x1.
x1 4.2
x1 4 x1 5
Problem 2 Problem 3
x1 4
Problem 1
x1 4.2
x2 9.2
P 98.8
Problem 3
x1 5
16
x1 5
15
14 x1 4 Problem 2 solution:
13
x1 4
12
x2 9.3
11
P 98.4
10
9 ץוליא1
1Const
ץוליא2
2Const
8 Problem 3 solution: ץוליא3
3Const
4 ץוליא4
Cons
x1 5
7
x2 8
6
P 94
5
Problem 2
4
2
Problem 3
1
0
0 5 10 15 20 25
B&B
tree
We found an integer
solution to the
Problem 2
x1 4 problem, may we stop
x1 4 x2 9.3
the algorithm?
Problem 1 P 98.4
x1 4.2
x2 9.2
P 98.8
Problem 3
x1 5 x1 5
x2 8
P 94
Integer solution
Best-solution-so-far
• We must continue with a new developing point.
• For the next developing, we are choosing the best non
integer solution so far, and choosing a non integer
variable from that solution : x2
• Splitting the problem to two:
x2 9.3
x2 9 x2 10
Problem 4 Problem 5
x2 9
Problem 2
x1 4
x1 4 x2 9.3
Problem 5
Problem 1 P 98.4
x1 4.2
x2 9.2 x2 10
P 98.8
Problem 3
x1 5 x1 5
x2 8
P 94
Integer solution
Best-solution-so-far
16
x1 2.6
15 Problem 5 solution:
14
x2 10
13
P 95.6
x1 4
12
Problem 4 solution:
x2 9
11
Prob 5
x2 10 10
P 96 ץוליא1
1 Const
x2 9 9 ץוליא2
2 Const
ץוליא3
3 Const
8 Problem 3 solution: 4 Const
ץוליא4
5 ץוליא5
Const
x1 5
7
6 Const
ץוליא6
x2 8
6
5
Problem 4 P 94
4
2
Problem 3
1
0
0 5 10 15 20 25
B&B
tree Problem 4
x1 4 Optimal Solution of
x2 9
original integer
x2 9 problem
Problem 2 P 96
x1 4 Integer solution Best-solution-so-far
x1 4 x2 9.3
Problem 5
Problem 1 P 98.4
x1 2.6
x1 4.2
x2 9.2
x2 10 x2 10
P 95.6
P 98.8
Problem 3
x1 5 x1 5
x2 8 Do we need to
P 94 continue and
develop
Problem 5?
Branch & Bound algorithm – summary
• The ILP solution is bounded by the LP solution.
• At any step In the solution, a constraint is added, so
the solution can’t improve.
• At any step, we will choose a to develop the branch
with the best bound:
– Smallest solution (bound) value ➔ In a minimum problem.
– largest solution (bound) value ➔ In a maximum problem.
• Branch Blocking –In the following scenarios we’ll stop
developing a branch:
– We got an integer solution.
– We’ve already got a better integer solution on another branch.
– There is no solution to this branch (in this case it is clear that if
we add more constraints there will be no solution).
Example 2 – minimum cost
• Solve this minimum cost problem:
Problem 1
5
min C 4x1 3x2 5x3 x1 2
6
s.t. x2 0
2x1 2x2 4x3 7 1
x3
2x1 4x2 2x3 5 3
x1 , x2 , x3 0 C 13
Problem 3 x1 3
Example 2 – B & B tree
Problem 2
x1 2
5
x
x1 2 2
6
1
x 1
Problem 1 3
6
5
x 2 C 16
1
1
6 3
x2 0
1
x
3
3
C 13 Problem 3
x1 3 x1 3
x2 0
1
x3
4
1
C 13
4
Developing problem 3
• Problem 3 has the lowest Z value, that’s why we will choose to develop
this branch:
Problem 4 x3 0 or x3 0
Problem 5 x3 1
Problems 4 and 5 include the original problem’s constraints, with the
additional constraint of problem 3:
x1 3
Example 2 – B & B tree
Problem 2
x1 2
5
x
x1 2 2
6
x 1
1 Problem 4
Problem 1 3
6 1
1 x 3
5 C 16
x1 2 1
2
x2 0
6 3 x3 0 x2 0
x3 0
x3
1
3
or C 14
Problem 3
C 13
x1 3 x1 3
x3 0
x2 0
x3
1 Problem 5
4 x1 3
1
C 13
x3 1
1
4 x2
4
x3 1
3
C 17
4
Developing problem 4
Between problems 2,4,5 – problem 4 has the best value C=14
Problem 6 x1 3
Problem 7 x1 4
Example 2 – B & B tree
Problem 6
Problem 2
x1 2
x
5
x1 3 infeasible
x1 2 2
6
x 1
1 Problem 4
Problem 1 3
6
1
5 1 x1 3
x1 2 C 16
x3 0
2
6 3
x2 0
x2 0
x3 0 Problem 7
x3
1
3
or C 14
x1 4
C 13
x1 3
Problem 3
x3 0 x1 4 x2 0
x1 3
x2 0 x3 0
x3
1 Problem 5 C 16
4 x1 3
1
C 13
x3 1
1
4 x2 Integer solution
4
Upper bound = 16
x3 1
Optimal
3
C 17
4
System analysis –term A exam – spring 5772 -014004
Question 2)20%(
The following binary problem is given:
Min 2 x1 - x2 + 7 x3 + 3 x4 + 2 x5
s.t. x1 - 2 x2 + 4 x3 + 2 x4 - x 5 ≥ 1
- 2x1 + x2 + 4 x3 + 2 x4+ 4x 5 ≥ 8
x1 , x2 , x3 , x4 , x5 {0,1}
Displayed below is a partial B & B solution tree:
prob
prob X*= (0, 1, 9/20, 1, 4/5)
1
2
X*= (0, 0, 1/2, 1, 1) x3= 0 x3= 1
prob prob
3 4
Non feasible region X*= (0, 1, 1, 0, 3/4)
Required:
• calculate the lower bounds of each problem.
•Show the developing of problem 4 (problems 5 and 6) Home ex.
•Explain – does the solution you get is optimal? (bonus)
Sensitivity analysis
1. Solve the dual and primal problems. Decision variables and optimal solution.
3. What is the reduced cost of x1? Explain the meaning of this value
4. What is the shadow price of constraint 1 in the dual problem? Explain the meaning of this
value
initial
x1 x2 x3 x4 s1 s2 RHS
s1 2 1 1 0 1 0 40
s2 1 -1 2 5 0 1 20
Optimal
x1 x2 x3 x4 s1 s2 RHS