624 Integer Programming
g 3 (X)= 1 −
0. 5 x 1 − 2 x 2
1. 5 x 1 x 2 +
√
2 x 2 x 3 + 1. 319 x 1 x 3
≥ 0
g 4 (X)= 1 +
0. 5 x 1 − 2 x 2
1. 5 x 1 x 2 +
√
2 x 2 x 3 + 1. 319 x 1 x 3
≥ 0
xi∈ { 0. 1 , 0. 2 , 0. 3 , 0. 5 , 0. 8 , 1. 0 , 1. 2 }, i= 1 , 2 , 3
The optimum solution of the continuous variable problem is given byf∗= 2. 7 336,
x 1 ∗ = 1. 1 549,x 2 ∗= 0. 4 232, andx 3 ∗= 0. 0 004. The optimum solution of the discrete
variable problem is given byf∗= 3. 0 414,x∗ 1 = 1. 2 ,x∗ 2 = 0. 5 , andx 3 ∗= 0. 1.
10.9 Solution of Binary Programming Problems Using MATLAB
The MATLAB functionbintprogcan be used to solve a binary (or zero–one) pro-
gramming problem. The following example illustrates the procedure.
Example 10.7 Find the solution of the following binary programming problem using
the MATLAB functionbintprog:
Minimizef (X)= − 5 x 1 − 5 x 2 − 8 x 3 + 4 x 4 + 4 x 5
subject to
3 x 1 − 6 x 2 + 7 x 3 − 9 x 4 − 9 x 5 ≤ − 10 , x 1 + 2 x 2 −x 4 − 3 x 5 ≤ 0
xibinary;i= 1 , 2 , 3 , 4 , 5
SOLUTION
Step 1: State the problem in the form required by the programbintprog:
Minimizef (x)=fTx ubject tos Ax≤bandAeqx=beq
Here
fT= {−^5 −^5 −^8 2 4}, x= {x 1 x 2 x 3 x 4 x 5 }T
A=
[
3 − 67 − 9 − 9
1 2 0 − 1 − 3
]
, b=
{
− 10
0
}
Step 2: The input is directly typed on the MATLAB command window and the program
bintprogis called as indicated below:
clear; clc;
f = [-5 -5 -8 2 4]′;
A = [3 -6 7 -9 -9; 1 2 0 -1 -3];
b = [-10 0]′;
x = bintprog (f, A, b,[])