‘coach Night is trying to choose the starting lineup for the basketball team. The team consists of
seven players who have been rated (on a scale of 1 = poor to 3 = excellent) according to their
ball-handling, shooting, rebounding, and defensive abilities. The positions that each player is
allowed to play and the player's abilities are listed in Table 9.
The five-player starting lineup must satisfy the following restrictions:
1 At least 4 members must be able to play guard, at least 2 members must be able to play
forward, and at least 1 member must be able to play center.
2 The average ball-handiing, shooting, and rebounding level of the starting lineup must be at
least 2.
3 If player 3 starts, then player 6 cannot start.
4 If player 1 starts, then players 4 and 5 must both start.
5 Either player 2 or player 3 must start.
Given these constraints, Coach Night wants to maximize the total defensive ability of the starting
team. Formulate an IP that will help him choose his starting team.
TABLE 9
Player | Position | Ball-Handling | Shooting | Rebounding | Defense
1 S 3 3 1 3
2 c 2 4 3 2
3 GF 2 3 2 2
4 F-C 1 3 3 1
5 GF 3 3 3 3
6 F.c 3 4 2 3
Z GF 3 2 2 1Step 1013
Consider the integer programming problem of basket team. The team coach wants to choose
starting line-up from the 7 players available. Consider x, to denote a player in starting line-up.
The variable x, is defined as follows:
_ fl Ifplayer included
40 Otherwise
Here, (j=1,2,3,4,5,6,7)
Comment
Step2of3 A
Hence, player 4 plays in the starting line-up if x, = 1. Coach Night chooses a starting line-up
such that defense is maximized. Hence maximization equation is written as follows:
Max 2
x, + 2x, + 2x, +X, +3x, +3x, +x, ------ (1)
Starting line-up consists of 5 players, hence the constraint is;
+X) +X tx, +4, +4, +4, =5...... (2)
Constraints of the Integer Programming problem are obtained from the following conditions:
Constraint 4: At least 4 members must be able to play guard, at least 2 members must be able
to play forwerd and at least 1 member must be able to play center.
The condition is satisfied by the following constraints equation;
x) +4x, +x, +4524
RH tXy FX tX%e $4, SQ eee (3)
x, +x, +x,21
Constraint 2: The average ball-handling, shooting, and rebounding level of the starting line-up
must be at least 2. Total rating of the selected players is Sum of x, value of a player multiplied by
rating of that player. This proves Left hand side of the constraint equations. Consider that starting
line-up consists of 5 players. Hence for a minimum average of 2, the total rating value should be
minimum 10. Hence this proves the Right hand side value. Therefore, the constraints equation is
written as follows:
3x, + 2x, + 2x, +x, +3x, +3x, +3x, 210
3x, +x, +3x, +34, +3x, +4, + 2x, 210... (4)
X, +3x, + 2x, +3x, +3x. + 2x, +2x, 210Constraint 3: If player 3 starts, then player 6 cannot start. The constraint is written as follows:
x44, S16)
Hence equation (5) is not satisfied only when both x, x,
1. Hence only x, or x,is included.
Constraint 4: If the player 1 starts, then players 4 and 5 must both start. This condition is
satisfied by adding the following constraint.
X,-X,- x, 20 =... 6)
If x, =I then both x, and_x, should be 1 to satisfy the equation. Hence if x, is included then
x, and x, both will be included.
Constraint 5: Either player 2 or player 3 must start. The constraint is written as follows:
At least one of x, or x,should be one, so the condition is satisfied.
‘Comment
Step 3063 “
Therefore, the final Integer programming problem is obtained using equation (1) to equation (7).
The Integer programming is formulated as follows;
Max z = 3x, + 2x, + 2x, +x, +3x, +34, +x,
Subject to the constraint:
x +4+x, +x, +x, 24
My +X tx tx tx, 22
x, +x, 44,21
3x, + 2x, + 2x, +x, +3x, +3x, +3x, 210
3x, +x, +3x, + 3x, +3x, +4, +2x, 210
x, +3x, + 2x, +3x, +3x, +2x, + 2x, 210
x,+%, 51
x, -%,-%, 20
x, +x, 21
All the above variables are integer variables.Problem2
Because of excessive pollution on the Momiss River, the state of Momiss is going to build
pollution control stations. Three sites (1, 2, and 3) are under consideration. Momiss is interested
in controlling the pollution levels of two pollutants (1 and 2). The stale legislature requires that at
least 80,000 tons of pollutant 1 and at least 50,000 tons of pollutant 2 be removed from the river.
The relevant data for this problem arc shown in Table 10. Formulate an IP to minimize the cost of
meeting the state legislature's goals.
table 10
Amount Removed per Ton of
sit Cost of Building Cost of Treating 1 Ton Water
° Station ($) Water ($)
Pollutant 1 Pollutant 2
1 100,000 20 0.40 0.30
2 60,000 30 0.25 0.20
3 40,000 40 0.20 0.25
Step-by-step solution
Step 1of 14 ~
Consider the Integer Programming problem of population control in Momiss River. The State
Legislator wants to remove pollutants of Type 1 and Type 2. Cost of Building stations in three
sites Site 1, 2, and 3 are tabulated.The table is given below.
Step 2 of 14 ~
site |C28t of Bulling | Cost of Treating 1 Ton | Amount Removed per Ton
Station ($) Water ($) of Water
I
Pollutant 4 Pollutant
2
1 100,000 20 040 0.30
2 60,000 30 0.25 0.20
3 |40,000 40 0.20 0.25
zi >
Comment
At least 80,000 tons of Pollutant 1 and 50,000 tons of Pollutant 2 should be removed.
‘Comment
Step 3of 14 A
Step4of 14 “
Let x, (i= 1,2,3)denote tons of water processed at site jStep 5of 14“
Also denote y, as follows.
I If site is built
w= 123)={ uments
Comment
Step 6 of 14“
The objective of IP problem is to minimize total cost.
min
2 = 20x, +30x, + 40x, +100,000y, + 60,000), +40,000y,
Comment
Step 7 of 14
The amount of Pollutant removed is given by
Pollutant 1 = 0.40x, + 0.25x, + 0.20x,
Pollutant 2 = 0.30x, +0.20x, +0.25x,
Comment
Step 8 of 14 A
The state legislature requires that at least 80,000 tons of pollutant 1 and at least 50,000 tons of
pollutant 2 should be removed from the river. Hence the following constraint is formed.
0.40x, +0.25x, +0.20x, > 80,000
0.30x, +0.20x, +0.25x, 2 50,000Step 9 of 14.“
Let M,,M,,M,be three large positive constants, then variables x,, y, are related by the
following relation.
x sMy,
%, 5 M,y,
x, 3 M,y;
Here M, should be set equal to the maximum value that x, (j=1,2,3)can attain. Now at most
200,000 tons amount of pollutant 1 per ton of water can be removed. SoM, = 200,000
Similarly, M, = 320,000, M, = 400,000 Simplifying the above equations, we get
x, — 200000», <0
x, -320000), $0
x, - 400000), <0
Comment
Step 100f 14 “
Hence the following IP is formulated.
Min
2 = 20x, +30x, +40x, +100,000y, +60,000y, +40,000y,
0.40x, +0.25x, +0.20x, > 80,000
0.30x, +0.20x, +0.25x, > $0,000
x, — 200000), <0
x, -320000y, <0
x, 400000), <0
XXX ZO
ViVo Ys =O 081
The IP problem is solved using LINGO software. The procedure is given below.
1. Start LINGO and open a blank file.Step 11 of 14 A
2. Enter IP equations in the file. Note that to indicate that a variable must equal a non -negative
integer, use @GIN operator and to indicate that a variable must equal 0 or 1, use INTE operator.
The Screen shot is shown below.
Biliinge 130 - ttindo Mode! - 6507-92-27]
Ol s|a|S
MIN
20X1+30X2+40X3+100000¥1+60000¥2+40000¥3
SUBJECT TO
0.40X1+0.25X2+0.20X3>=80000
0.30X1+0.20X2+0.25X3>=50000
X1-200000¥1<=0
X2-320000¥2<=90
X3-400000¥2<=0
END
GIN x1
GIN x2
GIN x3
INTE Y1
INTE ¥2
INTE ¥3
Comment
Step 12 0f 14 “~
3. Click on LINGO from tool bar and select solve. Solution is obtained in new window as shown.Step 13 of 14 “~
The screen shot of output is given below.
Osis) »|[@) |=) o[plo] Of |m| a) B)s l/s) eel
Global optimal solution found.
Objective value: 4100000.
Objective bound: 4200000.
Infeasipilities: 0.000000
Extended solver steps: °
Total solver iterations: 2
Model Class: PILP
Total variables: 6
Nonlinear variables: °
Integer variables: 6
Total constraints: 6
Nonlinear constraints: °
Total nonzeres: 18
Nonlinear nonzeros: °
Variable Value Reduced Cost
x2 200000.0 20.00000
x2 9.000000 30.00000
x3 0.000000 40.00000
‘2 2.000000 200000.0
¥2 9.000000 60000.00
x3 0.000000 40000.00
Comment
Step 14 0f 14 ~
Hence from the LINGO solution, it is observed that Maximum profit is obtained by building
stations at Site 4 only.Problem 3
A manufacturer can sell product 1 at a profit of $2/unit and product 2 at a profit of $5/unit. Three
units of raw material are needed to manufacture 1 unit of product 1, and 6 units of raw material
are needed to manufacture 1 unit of product 2. A total of 120 units of raw material arc available. If
any of product 1 is produced, a setup cost of $10 is incurred, and if any of product 2 is produced,
a setup cost of $20 is incurred. Formulate an IP to maximize profits.
Step-by-step solution
Step 1of 12 “
Consider the Integer Programming problem of a manufacturer having Product 1 and Product 2.
Profits from Product 1and Product 2 are $2 per unit and $§ per unit. Raw material required for
product 1 and product 2 are 3 unit and 6 units respectively. Set up cost of product 1 and product
2are $10 and $20. Total raw material available is 120 units. Data is tabulated.
Comment
Step 2of 12 A
The table is given below.
Product 1| Product 2
Set up Cost | 10 20
Profit 2 5
Raw material | 3 6Step 3o0f 13 A
Let x, denote units of Product j produced. That is x, denotes the units of product 1 produced
and x, denotes the units of product 1 produced. We also define, as follows
if Product jis produced
y=
“/ (otherwise
Comment
Step 4 of 13 A
The objective of IP problem is to maximize total cost.
max
2x, +5x,-10y, -20y,
Comment
Step 5 of 13“
Maximum raw material available is 120. Hence raw material used should be less than this value.
Mathematically 3x, + 6x, $120
Let M,,M, be two large positive numbers, then variables x), y, are related by the following
relation.
4S My
% SMiy,Step 6 of 13 ~
Here M, should be set equal to the maximum value that x, (7 =1,2)can attain. Now at most
120/3 = 40 unit of raw material is required by product 1 that is x, will not exceed 40. So
M, =40
Comment
Step 7 of 13 ~
Similarly, x, will not exceed 120/6 =20.So
M,
0.
Comment
Step 8 of 13 ~
Simplifying the above equations, we get
x,-40y, <0
x —20y, <0Step 9 of 13 4
Hence we have the following IP formulation.
Maximize
2x, + 5x, -10y, —20y,
Such that
3x, + 6x, $120
x,—40y, 50
x, -20y, <0
Xx, 20
J ¥_ =0 orl
The IP problem is solved using LINGO software. The procedure is given below.
1. Start LINGO and open a blank file
Comment
Step 10 of 13 “
2. Enter IP equations in the file. Note that to indicate that a variable must equal a non -negative
integer, use @GIN operator and to indicate that a variable must equal 0 or 1, use. @BIN
operator.
The Screen shot is shown below.
‘Lingo 13.0 = Lis
File Edit LINGO Window Help
Dfes|a|S| | /@) 2\—| S/Blo| Olpa||y| =/3/
MAX=2*K1+5*X2-10*¥1-20*¥2;
3*K1+6*X2<=120;
X1-40*Y1<=0;
M2-20+¥2<=0;
END
@GIN (X1);
@GIN (x2);
@BIN (¥1)7
@BIN (Y¥2);Step 11 of 13 ~
3. Click on LINGO from tool bar and select solve. Solution is obtained in new window as shown.
‘Comment
Step 12 0f 13 A
The screen shot of output is given below.Step 13 of 13 ~
File Edit LINGO Window Help
Dfeslea|S| &[/@) Ol) S[Blo] Of-a(m) ca) Blslee) 2 [rel
Global optimal solution found.
Objective value: 80.00000
Infeasibilities: 0.000000
Total solver iterations: °
Model Class: LP
Total variables: 4
Nonlinear variables: o
Integer variables: °
Total constraints: 4
Nonlinear constraints: °
Total nonzeros: 10
Nonlinear nonzeros: °
Variable Velue Rec
x. 0.000000
x2 29.00000
v1 0.000000
v2 1.000000
Row Slack or Surplus I
For Help, press FL I
Hence from the LINGO solution, it is observed that the Maximum profit is obtained by producing
20 units of Product 2 and zero units of Product 1. The maximum profit is 80.Problem 4
Suppose we add the following restriction to Example | (Stockco): If investments 2 and 3 are
chosen, then investment 4 must be chosen. What constraints would be added to the formulation
given in the text?
Step-by-step solution
Step tof 11 “A
Consider the Integer programming problem of investment by Stockco. The company has four
investment plans namely Investment 1, Investment 2, Investment 3, and Investment 4 which
gives an NPV of $16000; $22000; $12000; $8000 respectively. Outflow required for these
investments are $5000;$7000;$4000; $3000 respectively. Currently Stockco can invest $14000.
Comment
Step 2of 11 A
The table is given below.
Investment 1 | Investment 2 | Investment 3 | Investment 4
NPV 16000 22000 12000 8000
Outflow | 5000 7000 4000 3000Step 3o0f 11 A
Let x, denote if investment j is made or not. The variable x, is defined as follows.
x,(7=1,2,
)- 11f Investment; is done
O otherwise
Comment
Step 4 of 11 A
To maximize the profit from investment, the following equation with values in $100Qis given
below.
max
16x, + 22x, +12x, +8x,
Comment
Step 5 of 11
Constraints of the Integer programming problem are obtained from the following conditions
Condition 1: Total Outflow cannot exceed $14,000.
Now outflow in Investment 1 is 5x, . Similarly Investment 2, 3, 4 has cash outflow of 7x,, 4x,,
and_ 3x, respectively. Hence the following condition is obtained
Sx, + 7x, +4x, +3x, S14Step 6 of 11 ~
Condition 2: If investments 2 and 3 are chosen, then investment 4 must be chosen.
This condition is obtained by adding the following constraint
x, +x,-2x, 50
If both x,,.x, =1, then x,must be 1. Otherwise x, may be zero. Hence the condition is satisfied.
Comment
Step 7 of 11 A
Hence the following IP is formulated.
max
16x, + 22x, +12x, +8x,
Sx, +7x, +4, +3x, $14
xX, +x, -2x, 50
XeXps¥yeXy 20
Comment
Step 8of 11 ~
The IP problem is solved using LINGO software. The procedure is given below.
1. Start LINGO and open a blank file.
Comment
Step 9of 11
2. Enter IP equations in the file. Note that to indicate that a variable must equal a non -negative
integer, use. @GIN operator and to indicate that a variable must equal 0 or 1, use. INTE
operator.Step 9of 11
2. Enter IP equations in the file. Note that to indicate that a variable must equal a non -negative
integer, use @GIN operator and to indicate that a variable must equal 0 or 1, use INTE
operator.
Comment
Step 10 of 11 *
The Screen shot is shown below.
PB Lingo 13.0 - Lindo Model - 6507-9,2-4P |
File Edit LINGO Window Help
slalS| 6| 0) 2\-| o[p/o| O|BIHe) .
MAN 16X1+22X2+12X3+8X4
SUBJECT TO
SX1+7X2+4X3+3X4<=14
X2+X3-2K4<=03. Click on LINGO from tool bar and select solve. Solution is obtained in new window a shown.
The screen shot of output is given below.
File Edit LINGO Window Help
Olesia|S| »||@) || [eo]
B\B| SS) 2)
Global optimal solution found.
Objective value 42.00000
Objective bound: 42.00000
Infeasibilities: 9.000000
Extended solver steps: °
Total solver iterations: °
Model Class: PILP
Total variables: 4
Nonlinear variables: °
Integer variables: 4
Total constraints: 3
Nonlinear constraints: °
Total nonzeros: 2
Nonlinear nonzeros: °
Variable Value Reduced Cost
x2 0.000000 -16.00000
x2 1.000000 -22.00000
x3 1.000000 -12.00000
x4 2.000000 -8.000000
Row Slack or Surplus Dual Price
2 42.00000 2.000000
2 0.000000 0.000000
3 0.000000 0.000000
Comment
Step 11 of 11 A
Hence from the LINGO solution, it can be concluded that Stockco gets Maximum profit when it
invests in Investment 2, Investment 3, and Investment 4. The Maximum NPV obtained isProblem 5
How would the following restrictions modify the formulation of Example 6 (Dorian car sizes)? (Do
each part separately.)
a If midsize cars are produced, then compacts must also be produced.
b Either compacts or large cars must be manufactured.
Step-by-step solution
Step 4 of 24 A
Consider the Integer Programming problem of manufacturing autos by Dorian Auto. Resources
required for compact, midsize, and large are tabulated below.
Comment
Step 2 of 24 A
The table is given below.
Resource Car Type
Compact | Midsize | Large
Steel required |1.Stones |3tones |5 tones
Labor required | 30 hours | 25 hours | 40 hours
Profit yielded($) | 2,000 3,000 4,000Step 3 of 24“
Maximum available steel is 6,000 tones and labor hour available is 60,000.
At least 1,000 cars of a particular type must be produced for the production to be feasible.
Comment
Step 4 of 24 A
Let variable x, denotes the number of cars of type j manufactured. So
No of Compact cars manufactured
x, =No of Midsize cars manufactured
x,
No of Large cars manufactured
Comment
Step 5of 24 ~
Hence to maximize profit, the following objective function is formed.
max
2,000x, +3,000x, +4,000x,