Exercises Week 1 7

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 201

Sporting Goods Product Mix. Kelson Sporting Equipment, Inc.

makes two types of baseball gloves: a regular model a


available in its finishing department, and 100 hours available in its packaging and shipping department. The productio
Production Time (hours)
Model Cutting and Sewing Finishing Packaging and Shipping
Regular model 1 0.5 0.125
Catcher’s model 1.5 0.3333333333 0.25

Assuming that the company is interested in maximizing the total profit contribution, answer the following:

What is the linear programming model for this problem? Develop a spreadsheet model and find the optimal so
manufacture?

Decision variables

x1 number of regular gloves


x2 number of catcher’s gloves
Chaning cells for
Optimal Solution decision variables Se
Ob

x1 x2 z
Optimal value 500 150 3700

Objective function

x1 x2 Comment
Coefficient 5 8 we would like to maximize the

Constraints

Description x1 x2 Value of the Left Hand Side


Cutting and sewing 1 1.5 725
Finishing 0.5 0.3333333333 300
Packaging and shipping 0.125 0.25 100
Sign constraints x1,x2 are nonnegative
gloves: a regular model and a catcher’s model. The firm has 900 hours of production time available in its cutting and sewing de
department. The production time requirements and the profit contribution per glove are given in the following table.

Profit/Glove
5
8

the following:

l and find the optimal solution using Excel Solver. How many of each model should Kelson

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

ould like to maximize the total profit ( the coefficients are the profit/glove)

Relation Value of the Right Hand Side


Avaible working
<= 900 hours for different
<= 300 departments
<= 100

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
s cutting and sewing department, 300 hours
wing table.
Advertising Budget Allocation. The Sea Wharf Restaurant would like to determine the best way to allocate a monthly

Management decided that at least 25% of the budget must be spent on each type of media and that the amount of mon

A marketing consultant developed an index that measures audience exposure per dollar of advertising on a scale from

If the value of the index for local newspaper advertising is 50 and the value of the index for spot radio advertising is 8

Formulate a linear programming model that can be used to determine how the restaurant should allocate its advertisin

Decision variables

x1 amount of dollar spent on newspaper advertising


x2 amount of dollar spent on radio advertising

Chaning cells for Set Objective:


Optimal Solution decision variables Objective Cell contents

x1 x2 z
Optimal value 666.67 333.33 8900

Objective function

x1 x2 Comment
Coefficient 50 80 we would like to maximize the total

Constraints

Description x1 x2 Value of the Left Hand Side Relation


Budget 1 1 1,000.00 =
Minimal spending for newspaper 1 666.67 >=
Minimal spending for radio 1 333.33 >=
Propotion constraint 1 -2 - >=
Sign constraints x1,x2 are nonnegative

by ,,Make Unconstrained Variables Non-ne


Solver window
way to allocate a monthly advertising budget of $1,000 between newspaper advertising and radio advertising.

d that the amount of money spent on local newspaper advertising must be at least twice the amount spent on radio advertising.

vertising on a scale from 0 to 100, with higher values implying greater audience exposure.

pot radio advertising is 80, how should the restaurant allocate its advertising budget to maximize the value of total audience expo

uld allocate its advertising budget in order to maximize the value of total audience exposure.

newspaper advertising
on radio advertising

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

ke to maximize the total audience exposure ( the coefficients are the indexes of different advertising types)

monthly advertising budget

least 25% of the budget must be spent on each type of media


Value of the Right Hand Side
1,000
250 least 25% of the budget must be spent on each type of media
250
0 the amount of money spent on local newspaper
advertising must be at least twice the amount spent on
radio advertising

nconstrained Variables Non-negative" option in


dow
ising.

nt on radio advertising.

alue of total audience exposure?

type of media

e of media
Bank Loan Funds Allocation. Adirondack Savings Bank (ASB) has $1 million in new funds that must be allocated to
automobile loans.
The bank’s planning committee has decided that at least 40% of the new funds must be allocated to home loans. In ad

Formulate a linear programming model that can be used to determine the amount of funds ASB should allocate to eac

Decision variables

x1 amount allocate
x2 amount allocated
x3 amount allocated

Chaning cells for


Optimal Solution decision variables

x1 x2 x3
Optimal value 400,000 225,000 375,000

Objective function

x1 x2 x3
Coefficient 7.00% 12.00% 9.00%

Constraints

Description x1 x2 x3
Amount of new fund 1 1 1
Requirement between personal and automobile loans 1 -0.6
Minimum home loan requirement 0.6 -0.4 -0.4
Sign constraints x1,x2,x3 are nonnegative
s that must be allocated to home loans, personal loans, and automobile loans. The annual rates of return for the three types of loa

cated to home loans. In addition, the planning committee has specified that the amount allocated to personal loans cannot exceed

ASB should allocate to each type of loan to maximize the total annual return for the new funds.

amount allocated to home loans


amount allocated to personal loans
amount allocated to automobile loans

Chaning cells for Set Objective:


decision variables Objective Cell contents must be formula -> SUMPRODUCT function

z
88,750

Comment
we would like to maximize the total annual return ( the coefficients are the interest rates)

Value of the Left Hand Side Relation Value of the Right Hand Side
bank has $1 million in new funds
1,000,000 <= 1,000,000
- <= 0 the amount allocated to perso
the amount allocated to autom
- >= 0
3 are nonnegative at least 40% of the new funds m

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
for the three types of loans are 7% for home loans, 12% for personal loans, and 9% for

onal loans cannot exceed 60% of the amount allocated to automobile loans.

ction

rates)

1 million in new funds


amount allocated to personal loans cannot exceed 60% of
amount allocated to automobile loans

east 40% of the new funds must be allocated to home loans


Consider an LP problem which has the objective function:

max z = 5*x1 + 2*x2

1) Two of the constraints are 2*x1 + 3*x2 ≤ 14 (Constr1)


2) and 2*x1 + x2 ≤ 10 (Constr3).
3) One constraint is not given. All variables are non-negative.

Give the missing values in the table below by giving explanation as well.

Variable Cells
Cell Name Final Value Reduced Cost Objective Coefficient
$B$3 x1 5 0 5
$C$3 x2 0 -0.5 2

Constraints
Cell Name Final Value Shadow Price Constraint R.H. Side
$E$1 Constr1 10 0 14
$E$8 Constr2 20 0 16
$E$9 Constr3 10 2.5 10

Comments for the solution of Variable cells/Constraints

Number of the step Table Description of the cell


1 Variable Cells Objective Coefficient for x1
2 Variable Cells Objective Coefficient for x2
3 Objective function Objective function
4 Variable Cells Final Value for x2
5 Variable Cells Reduced Cost for x1
6 Variable Cells Allowable Increase for x2
7 Variable Cells Allowable Decrease for x2
8 Constraints Constraint R.H. Side for Constr1
9 Constraints Constraint R.H. Side for Constr3
10 Constraints Final Value for Constr1

11 Constraints Final Value for Constr3

12 Constraints Shadow Price for Constr1

13 Constraints Shadow Price for Constr2


14 Variable Cells Allowable Decrease for x1

15 Constraints Allowable Increase for Constr1


16 Constraints Allowable Decrease for Constr1
17 Constraints Allowable Increase for Constr1
18 Constraints Allowable Decrease for Constr1
Allowable Increase Allowable Decrease
1.00E+30 1
0.5 1.00E+30

Allowable Increase Allowable Decrease


1.00E+30 4
4 1.00E+30
4 2

straints

he cell Value
ent for x1 5
ent for x2 2
ction max z =5x1 + 2x2
or x2 0
for x1 0
se for x2 0.5
se for x2 1.00E+30
for Constr1 14
for Constr3 10
Constr1 10

Constr3 10

Constr1 0

Constr2 0
se for x1 1

for Constr1 1.00E+30


for Constr1 4
for Constr1 4
for Constr1 1.00E+30
Reason
We know from the exercise that z = 5*x1 + 2*x2.
We have a maximization LP and we know the coefficients from the Variable Cells
We know from the Variable Cells table that the reduced cost of x2 is -0,5 which is not 0, so the Final Valu
WeBecause
know fromthethe
Final Value for
Variable x1table
Cells ≠ 0 inthat
the the
Variable
Final Cells
Valuetable,
for x2then
and the
the reduced
reduced cos
co
By definition the reduced cost is: how much the objective function coefficient of the variable needs to be reduced so thath
This means that the Allowable Increase is 0,5 (we have to reduced by -0,5 so we have to in
Because
We of the from
know reason
theabove the that
exercise Allowable
"2*x1 Decrease
+ 3*x2 ≤ is infinity.
14."
We know from the exercise that "2*x1 + x2 ≤ 10."
We know from the exercise that "2*x1 + 3*x2 ≤ 14." and x1=5 and x2=0 in the opti
So the Final value is 2*5 + 3*0 = 10.
We know from the exercise that "2*x1 + x2 ≤ 10." and x1=5 and x2=0 in the opti
So the Final value is 2*5 + 0 = 10.
We know from the Constraints table that the Final Value = Left Hand Side Value = 10 and the Right Hand Side Value is 14 for t
Right Hand Side Value differs then the Constr1 is not binding. The Shadow Price is always zero (in the feasibilty
We know from the Constraints table that the Final Value = Left Hand Side Value = 20 and the Right Hand Side Value is 16 for t
Right Hand Side Value differs then the Constr2 is not binding. The Shadow Price is always zero (in the feasibilty
We know from the exercise that z = 5*x1 + 2*x2.
To find the Range of Optimality for the coefficient of x1, let us denote the coefficient of x1 by c1, so the objec
Now rearrange it to : x2 = z/2 - c1/2*x1.
We also know that only Const3 is biding (Left Hand Side Value = 10 = Right Hand Side Value) and the slope of Constr3 is -2 (be
Now we got - c1/2 <= -2 (first one is the slope of the objective function and the second one is the slo

We know from the Constraints table that the Constr1 is not binding because the Left Hand Side Value = 10 < 14 = Right Han
Constr1 as well). So the Allowable Decrease is 14 - 10 = 4.
Because the Constr1 is not binding then the Allowable Increase is infinity.
We know from the Constraints table that the Constr3 is not binding because the Left Hand Side Value = 20 > 16 = Right Han
Constr2 as well). So the Allowable Increase is 20 - 16 = 4.
Because the Constr2 is not binding then the Allowable Decrease is infinity.
The Clark County Sheriff’s Department schedules police officers for 8-hour shifts. The beginning times for the shifts
4:00 a.m. An officer beginning a shift at one of these times works for the next 8 hours. During normal weekday opera
the time of day. The department staffing guidelines require the following minimum number of officers on duty:

Minimum No. of
Time of Day
Officers on Duty
8:00 a.m.–noon 5
Noon–4:00 p.m. 6
4:00 p.m.–8:00 p.m. 10
8:00 p.m.–midnight 7
Midnight–4:00 a.m. 4
4:00 a.m.–8:00 a.m. 6
Determine the number of police officers who should be scheduled to begin the 8-hour shifts at each of the six times to

Decision variables

x1 the number of officers that begin work at 08:00


x2 the number of officers that begin work at 12:00
x3 the number of officers that begin work at 16:00
x4 the number of officers that begin work at 20:00
x5 the number of officers that begin work at 00:00
x6 the number of officers that begin work at 04:00

Chaning cells for


Optimal Solution decision variables

x1 x2 x3 x4 x5 x6
Optimal value 3 3 7 - 4 2

Objective function

x1 x2 x3 x4 x5 x6
Coefficient 1 1 1 1 1 1

Constraints

Description x1 x2 x3 x4 x5 x6
08:00 - 12:00 time of day 1 1
12:00 - 16:00 time of day 1 1
16:00 - 20:00 time of day 1 1
20:00 - 00:00 time of day 1 1
00:00 - 04:00 time of day 1 1
04:00 - 08:00 time of day 1 1
Sign constraints x1,x2,x3,x4,x5,x6 are nonnegative
by ,,Make Unconstrained Variables N
Solver window
hour shifts. The beginning times for the shifts are 8:00 a.m., noon, 4:00 p.m., 8:00 p.m., midnight, and
he next 8 hours. During normal weekday operations, the number of officers needed varies depending on
ng minimum number of officers on duty:

egin the 8-hour shifts at each of the six times to minimize the total number of officers required.

haning cells for Set Objective:


ecision variables Objective Cell contents must be formula -> SUMPRODUCT function

z
19

Comment
we would like to minimize the total number of officers needed to meet all shift requirements

Value of Left Hand Side Relation Value of Right Hand Side the minimal number of officiers on duty for given
5 >= 5 for example 08:00-12:00 time of day can be cove
6 >= 6 x1: because it starts at 08:00 and ends 16:00
10 >= 10 x6: because it starts at 04:00 and ends 12:00
7 >= 7
4 >= 4
6 >= 6

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
officiers on duty for given time period
0 time of day can be covered by
08:00 and ends 16:00
04:00 and ends 12:00
Consider the following network representation of a transportation problem:

The supplies, demands, and transportation costs per unit are shown on the network. What is the optimal (cost minimiz

Decision variables

x1 amount shipped from Jefferson City to Des Moines


x2 amount shipped from Jefferson City to Kansas City
x3 amount shipped from Jefferson City to St. Louis
x4 amount shipped from Omaha to Des Moines
x5 amount shipped from Omaha to Kansas City
x6 amount shipped from Omaha to St. Louis

Chaning cells for


Optimal Solution decision variables

x1 x2 x3 x4 x5 x6
Optimal value 5 15 10 20 - -

Objective function

x1 x2 x3 x4 x5 x6
Coefficient 14 16 7 8 10 5
Constraints

Description x1 x2 x3 x4 x5 x6
supply of Jefferson City 1 1 1
supply of Omaha 1 1 1
demand of Des Moines 1 1
demand of Kansas City 1 1
demand of St. Louis 1 1
Sign constraints x1,x2,x3,x4,x5,x6 are nonnegative
by ,,Make Unconstrained Variables Non-negative" optio
Solver window
twork. What is the optimal (cost minimizing) distribution plan?

City to Des Moines


n City to Kansas City
on City to St. Louis
a to Des Moines
ha to Kansas City
aha to St. Louis

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

z
540

Comment
we would like to minimize the total transportation cost ( the coefficients are costs per unit)
Value of Left Hand Side Relation Value of Right Hand Side
30 <= 30 we cannot transport more units than the capacity
20 <= 20
25 >= 25 we do not want to transport more units than it is nec
15 >= 15
10 >= 10

ke Unconstrained Variables Non-negative" option in


window
units than the capacity

t more units than it is neccessary


Consider the following network representation of a transportation problem:

Incorporate the following changes into the model:


1. The demand of St. Loius grows to 20. Des Moines Cannot have a shortage, and one missing unit incurs a cost of 9
2. No more than 7 units can be transported from Jefferson City to Des Moines. Also, the maximum shortage in Kansa

What is the optimal (cost minimizing) distribution plan?

Decision variables

x1 amount shipped from Jefferson City to Des Moines


x2 amount shipped from Jefferson City to Kansas City
x3 amount shipped from Jefferson City to St. Louis
x4 amount shipped from Omaha to Des Moines
x5 amount shipped from Omaha to Kansas City
x6 amount shipped from Omaha to St. Louis
y1 shortage for Kansas City Des Moines Cannot
y2 shortage for St. Louis

Chaning cells for


Optimal Solution decision variables

x1 x2 x3 x4 x5 x6 y1 y2
Optimal value 5 5 20 20 - - 10 -

Objective function
x1 x2 x3 x4 x5 x6 y1 y2
Coefficient 14 16 7 8 10 5 9 6

Constraints

Description x1 x2 x3 x4 x5 x6 y1 y2
supply of Jefferson City 1 1 1
supply of Omaha 1 1 1
sum of shortages 1 1
demand of Des Moines 1 1
demand of Kansas City 1 1 1
demand of St. Louis 1 1 1
Jefferson to Des Moines 1
Maximum shortage 1
Sign constraints x1,x2,x3,x4,x5,x6,y1,y2 are nonnegative

by ,,Make Unconstrained Variables Non-


Solver window
g unit incurs a cost of 9 in Kansas City and 6 in St. Louis.
mum shortage in Kansas City is 8 units.

Des Moines Cannot have a shortage -> we do not introduce a decision variable for the shortage of Des Moines because in any cases it is 0

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

z
540
Comment
we would like to minimize the total transportation cost ( the coefficients are costs per unit)

Value of Left Hand Side Relation Value of Right Hand Side


we cannot transport more units than the capa
30 <= 30
20 <= 20 Sum demand - Sum supply = (25+15+20) - (30+
the total shortage cannot be greater than the differ
10 <= 10
25 >= 25 we do not want to transport more units than i
15 >= 15 modified demand for St. Louis
20 >= 20
no more than 7 units can be transported from
5 <= 7
- <= 8
the maximum shortage in Kansas City is 8 un

Unconstrained Variables Non-negative" option in


dow
use in any cases it is 0
more units than the capacity
upply = (25+15+20) - (30+20) = 60 - 50 = 10
ot be greater than the difference in the previous line (overdemand)
ansport more units than it is neccessary

s can be transported from Jefferson City to Des Moines

tage in Kansas City is 8 units


Brooks Development Corporation (BDC) faces the following capital budgeting decision. Six real estate projects are a
each project (in millions of dollars) are as follows:

Project 1 2 3 4 5 6
Net Present Value ($ Millions) 15 5 13 14 20 9
Expenditure Required ($ Millions) 90 34 81 70 114 50
There are conditions that limit the investment alternatives:
At least two of projects 1, 3, 5, and 6 must be undertaken.
If either project 3 or 5 is undertaken, they must both be undertaken.
Project 4 cannot be undertaken unless both projects 1 and 3 also are undertaken.
The budget for this investment period is $220 million.

Formulate a binary integer program that will enable BDC to find the projects to invest in to maximize net present valu

Decision variables

x1 if we undertake the Project 1 then 1 else 0


x2 if we undertake the Project 2 then 1 else 0
x3 if we undertake the Project 3 then 1 else 0
x4 if we undertake the Project 4 then 1 else 0
x5 if we undertake the Project 5 then 1 else 0
x6 if we undertake the Project 6 then 1 else 0

Chaning cells for


decision variables
Optimal Solution

x1 x2 x3 x4 x5 x6
Optimal value - - 1 - 1 -

Objective function

x1 x2 x3 x4 x5 x6
Coefficient 15 5 13 14 20 9

Constraints

Description x1 x2 x3 x4 x5 x6
At least two of them 1 1 1 1
Project 1 and 4 relationship 1 -1
Project 3 and 4 relationship 1 -1
Project 3 and 5 relationship 1 -1
Budget 90 34 81 70 114 50
Sign constraints x1,x2,x3,x4,x5,x6 are binaries
eting decision. Six real estate projects are available for investment. The net present value and expenditures required for

aken.

cts to invest in to maximize net present value, while satisfying all project restrictions and not exceeding the budget.

binary decision variables: they can be only 0 or 1

roject 1 then 1 else 0


roject 2 then 1 else 0
roject 3 then 1 else 0
roject 4 then 1 else 0
roject 5 then 1 else 0
roject 6 then 1 else 0

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

z
33

Comment
we would like to maximize the total net present value ( the coefficients are the net present values in the first row from the tabl

Value of Left Hand Side Relation Value of Right Hand Side


At least two of projects 1, 3, 5, and 6 must be undertake
2 >= 2
Project 4 cannot be undertaken unless both projects 1 a
- >= 0
Project 4 cannot be undertaken unless both projects 1 a
1 >= 0
If either project 3 or 5 is undertaken, they must both be
- = 0
The budget for this investment period is $220 million
The budget for this investment period is $220 million
195 <= 220
4,x5,x6 are binaries

in Solver there is an option to set the variables to binaries at the drop-


down list
res required for

the budget.

es in the first row from the table)

5, and 6 must be undertaken


en unless both projects 1 and 3 also are undertaken
en unless both projects 1 and 3 also are undertaken
ertaken, they must both be undertaken.
nt period is $220 million
nt period is $220 million
Locating Police Substations. Grave City is considering the relocation of several police substations to obtain better enf
can be covered from these locations are given in the following table:

Potential Locations for Substations Areas Covered


A 1, 5, 7
B 1, 2, 5, 7
C 1, 3, 5
D 2, 4, 5
E 3, 4, 6
F 4, 5, 6
G 1, 5, 6, 7
Formulate an integer programming model that could be used to find the minimum number of locations necessary to p

Decision variables

x1 if we build a police station at location A then 1 else 0


x2 if we build a police station at location B then 1 else 0
x3 if we build a police station at location C then 1 else 0
x4 if we build a police station at location D then 1 else 0
x5 if we build a police station at location E then 1 else 0
x6 if we build a police station at location F then 1 else 0
x7 if we build a police station at location G then 1 else 0
Chaning cells for
decision variables
Optimal Solution

x1 x2 x3 x4 x5 x6
Optimal value - 1 - - 1 -

Objective function

x1 x2 x3 x4 x5 x6
Coefficient 1 1 1 1 1 1

Constraints

Description x1 x2 x3 x4 x5 x6
for Area 1 1 1 1
for Area 2 1 1
for Area 3 1 1
for Area 4 1 1 1
for Area 5 1 1 1 1 1
for Area 6 1 1
for Area 7 1 1
Sign constraints x1,x2,x3,x4,x5,x6,x7 are binaries
ubstations to obtain better enforcement in high-crime areas. The locations under consideration together with the areas that

er of locations necessary to provide coverage to all areas.

binary decision variables: they can be only 0 or 1

hen 1 else 0
hen 1 else 0
hen 1 else 0
hen 1 else 0
hen 1 else 0
hen 1 else 0
hen 1 else 0
Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

x7 z
- 2

x7 Comment
1 we would like to minimize the number of the new police station ( the coefficients are 1 because we can

x7 Value of Left Hand Side Relation Value of Right Hand Side


1 1 >= 1 we have to cover all the areas, but it is en
1 >= 1
for example we can cover Area 1 by only one
1 >= 1 neccessary to build all the stations (full covera
1 >= 1
1 1 >= 1
1 1 >= 1
1 1 >= 1
x7 are binaries

in Solver there is an option to set the variables to binaries at the drop-


down list
r with the areas that

function

coefficients are 1 because we can build only 1 station at the given place)

cover all the areas, but it is enough to cover one area only by one police station

we can cover Area 1 by only one police station from location A, B, C and G and not
build all the stations (full coverage means that it is enough to cover once)
aries at the drop-
Burnside Marketing Research conducted a study for Barker Foods on several formulations for a new dry cereal. T
attributes were found to be most influential in determining which cereal had the best taste: ratio of wheat to corn in
flake, type of sweetener (sugar, honey, or artificial), and the presence or absence of flavor bits. Seven children par
taste tests and provided the following part-worths for the attributes (see Section 13.4 for a discussion of part-worth

Wheat/Corn Sweetener Flavor Bits


Child Low High Sugar Honey Artificial Present Absent
1 15 35 30 40 25 15 9
2 30 20 40 35 35 8 11
3 40 25 20 40 10 7 14
4 35 30 25 20 30 15 18
5 25 40 40 20 35 18 14
6 20 25 20 35 30 9 16
7 30 15 25 40 40 20 11
Suppose that the overall utility (sum of part-worths) of the current favorite cereal is 75 for each child. What produ
maximize the number of children in the sample who prefer the new dry cereal? Note that a child will prefer the ne
only if its overall utility is at least 1 part-worth larger than the utility of their current preferred cereal.

Decision variables

x1 if the Child 1 prefers the product then 1 else 0 our goal to maximize the nu
x2 if the Child 2 prefers the product then 1 else 0 so x1,x2,x3,x4,x5,x6,x7 as b
(but of course we can/will use
x3 if the Child 3 prefers the product then 1 else 0
x4 if the Child 4 prefers the product then 1 else 0
x5 if the Child 5 prefers the product then 1 else 0
x6 if the Child 6 prefers the product then 1 else 0
x7 if the Child 7 prefers the product then 1 else 0
y1 if the product has the property ,,Wheat/Corn = Low" then 1 else 0 in order t
so we hav
y2 if the product has the property ,,Wheat/Corn = High" then 1 else 0
y3 if the product has the property ,,Sweetern = Sugar" then 1 else 0 - low or h
y4 if the product has the property ,,Sweetern = Honey" then 1 else 0 -with sug
- the pres
y5 if the product has the property ,,Sweetern = Artificial" then 1 else 0
y6 if the product has the property ,,Flavor Bits = Present" then 1 else 0 we will u
y7 if the product has the property ,,Flavor Bits = Absent" then 1 else 0

Optimal Solution Chaning cells for ,,main" decision variables


Chaning cells for ,,

x1 x2 x3 x4 x5 x6 x7 y1 y2
Optimal value - 1 1 - - - 1 1 -

Objective function the properties of t


(also possible solu
x1 x2 x3 x4 x5 x6 x7 y1 y2
Coefficient 1 1 1 1 1 1 1 0 0
Constraints

Description x1 x2 x3 x4 x5 x6 x7 y1 y2
for Child 1 -75 15 35
for Child 2 -75 30 20
for Child 3 -75 40 25
for Child 4 -75 35 30
for Child 5 -75 25 40
for Child 6 -75 20 25
for Child 7 -75 30 15
Ratio property 1 1
Sweetener property
Flavor bits property
Sign constraints 1 x1,x2,x3,x4,x5,x6,x7 are binaries
Sign constraints 2 y1,y2,y3,y4,y5,y6,y7 are binaries in Solver there is an

in Solver there is an
for a new dry cereal. Three
ratio of wheat to corn in the cereal
bits. Seven children participated in
discussion of part-worths):

each child. What product design will


child will prefer the new dry cereal
ed cereal.

goal to maximize the number of the children who are willing to take our new product
x1,x2,x3,x4,x5,x6,x7 as binary decision variables stand for this maximization problem
t of course we can/will use them in the Constraints section as well)

in order to reach our goal above, we have to create a new product (only one),
so we have to decide which properties the cereal has

- low or high ratio of wheat to corn (it cannot be both in the same time)
-with sugar or honey or artificial (it cannot be both in the same time)
- the presence or absence of flavor bits (it cannot be both in the same time)

we will use y1,y2,y3,y4,y5,y6 and y7 binary decision variables in the Constraints section

Set Objective:
Chaning cells for ,,technial" decision variables Objective Cell contents must be formula -> S

y3 y4 y5 y6 y7 z
- 1 - - 1 3

the properties of the new product only indirectly effect the objective function -> all the coefficients are zero
(also possible solution: not to include them in the sumproduct)
y3 y4 y5 y6 y7 Comment
0 0 0 0 0 we would like to maximize the number of the child
y3 y4 y5 y6 y7 Value of Left Hand Side Relation
30 40 25 15 9 64 >=
40 35 35 8 11 1 >=
20 40 10 7 14 19 >=
25 20 30 15 18 73 >=
40 20 35 18 14 59 >=
20 35 30 9 16 71 >=
25 40 40 20 11 6 >=
1 =
1 1 1 1 =
1 1 1 =

in Solver there is an option to set the variables to binaries at the drop-down list

in Solver there is an option to set the variables to binaries at the drop-down list
y one),

e)

onstraints section

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

all the coefficients are zero

uld like to maximize the number of the children ( the coefficients are 1 because every child counts 1)
Value of Right Hand Side we know that
1 - the overall utility (sum of part-worths) of the current favorite cereal is 75 for each
- a child will prefer the new dry cereal only if its overall utility is at least 1 part-wort
1
1 for example for Child 1
1 - the coefficient of x1 is -75 (all decision variables are on the Left Hand Side)
- on the Right Hand Side we have 1 (because at least 1-part-worth larger criteria for the utilit
1 - the coefficients for y1,y2,...,y7 come from the table above, because we know the ,,addition
1
1
1 the product can have low or high ratio of wheat to corn at the same time
1
the product can have sugar or honey or artificial at the same time
1
the product can have the presence or absence of flavor bits at the same time
favorite cereal is 75 for each child,
l utility is at least 1 part-worth larger than the utility of their current preferred cereal.

Left Hand Side)


worth larger criteria for the utility)
because we know the ,,additional utility" of the given property of the new product

he same time

e time

at the same time


Burnside Marketing Research conducted a study for Barker Foods on several formulations for a new dry cereal. T
attributes were found to be most influential in determining which cereal had the best taste: ratio of wheat to corn in
cereal flake, type of sweetener (sugar, honey, or artificial), and the presence or absence of flavor bits. Seven childr
participated in taste tests and provided the following part-worths for the attributes (see Section 13.4 for a discussio
part-worths):

Wheat/
Sweetener Flavor Bits
Corn
Child Low High Sugar Honey Artificial Present Absent
1 15 35 30 40 25 15 9
2 30 20 40 35 35 8 11
3 40 25 20 40 10 7 14
4 35 30 25 20 30 15 18
5 25 40 40 20 35 18 14
6 20 25 20 35 30 9 16
7 30 15 25 40 40 20 11
Assume that the overall utility of the current favorite cereal for children 1 to 4 is 70, and the overall utility of the c
favorite cereal for children 5 to 7 is 80. What product design will maximize the number of children in the sample w
prefer the new dry cereal? Note that a child will prefer the new dry cereal only if its overall utility is at least 1 part
larger than the utility of their current preferred cereal.

Decision variables

x1 if the Child 1 prefers the product then 1 else 0 our goal to maximize the num
so x1,x2,x3,x4,x5,x6,x7 as bin
x2 if the Child 2 prefers the product then 1 else 0 (but of course we can/will use th
x3 if the Child 3 prefers the product then 1 else 0
x4 if the Child 4 prefers the product then 1 else 0
x5 if the Child 5 prefers the product then 1 else 0
x6 if the Child 6 prefers the product then 1 else 0
x7 if the Child 7 prefers the product then 1 else 0
in order to
y1 if the product has the property ,,Wheat/Corn = Low" then 1 else 0 so we have
y2 if the product has the property ,,Wheat/Corn = High" then 1 else 0
y3 if the product has the property ,,Sweetern = Sugar" then 1 else 0 - low or hig
-with suga
y4 if the product has the property ,,Sweetern = Honey" then 1 else 0 - the prese
y5 if the product has the property ,,Sweetern = Artificial" then 1 else 0
y6 if the product has the property ,,Flavor Bits = Present" then 1 else 0 we will use
y7 if the product has the property ,,Flavor Bits = Absent" then 1 else 0

Optimal Solution Chaning cells for ,,main" decision variables


Chaning cells fo

x1 x2 x3 x4 x5 x6 x7 y1 y2
Optimal value 1 1 - 1 1 - - - 1

the properties of th
Objective function (also possible soluti

x1 x2 x3 x4 x5 x6 x7 y1 y2
the properties of th
(also possible soluti

Coefficient 1 1 1 1 1 1 1 0 0

Constraints

Description x1 x2 x3 x4 x5 x6 x7 y1 y2
for Child 1 -70 15 35
for Child 2 -70 30 20
for Child 3 -70 40 25
for Child 4 -70 35 30
for Child 5 -80 25 40
for Child 6 -80 20 25
for Child 7 -80 30 15
Ratio property 1 1
Sweetener property
Flavor bits property
Sign constraints 1 x1,x2,x3,x4,x5,x6,x7 are binaries in Solver there is an
Sign constraints 2 y1,y2,y3,y4,y5,y6,y7 are binaries
in Solver there is an
ons for a new dry cereal. Three
ste: ratio of wheat to corn in the
of flavor bits. Seven children
Section 13.4 for a discussion of

d the overall utility of the current


r of children in the sample who
erall utility is at least 1 part-worth

our goal to maximize the number of the children who are willing to take our new product
so x1,x2,x3,x4,x5,x6,x7 as binary decision variables stand for this maximization problem
(but of course we can/will use them in the Constraints section as well)

in order to reach our goal above, we have to create a new product (only one),
so we have to decide which properties the cereal has

- low or high ratio of wheat to corn (it cannot be both in the same time)
-with sugar or honey or artificial (it cannot be both in the same time)
- the presence or absence of flavor bits (it cannot be both in the same time)

we will use y1,y2,y3,y4,y5,y6 and y7 binary decision variables in the Constraints section

Chaning cells for ,,technial" decision variables

y3 y4 y5 y6 y7 z
Set Objective:
1 - - - 1 4 Objective Cell contents must be formula -> S

the properties of the new product only indirectly effect the objective function -> all the coefficients are zero
(also possible solution: not to include them in the sumproduct)

y3 y4 y5 y6 y7 Comment
the properties of the new product only indirectly effect the objective function -> all the coefficients are zero
(also possible solution: not to include them in the sumproduct)

0 0 0 0 0 we would like to maximize the number of the children

y3 y4 y5 y6 y7 Value of Left Hand Side Relation


30 40 25 15 9 4 >=
40 35 35 8 11 1 >=
20 40 10 7 14 59 >=
25 20 30 15 18 3 >=
40 20 35 18 14 14 >=
20 35 30 9 16 61 >=
25 40 40 20 11 51 >=
1 =
1 1 1 1 =
1 1 1 =
in Solver there is an option to set the variables to binaries at the drop-down list

in Solver there is an option to set the variables to binaries at the drop-down list
oduct
blem

uct (only one),

me)
e)
ame time)

n the Constraints section

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

tion -> all the coefficients are zero


tion -> all the coefficients are zero

uld like to maximize the number of the children ( the coefficients are 1 because every child counts 1)

Value of Right Hand Side


we know that
1 - the overall utility (sum of part-worths) of the current favorite cereal is 75 for each
1 - a child will prefer the new dry cereal only if its overall utility is at least 1 part-wo
1
for example for Child 1
1 - the coefficient of x1 is -70 (all decision variables are on the Left Hand Side)
1 - on the Right Hand Side we have 1 (because at least 1-part-worth larger criteria for the uti
1 - the coefficients for y1,y2,...,y7 come from the table above, because we know the ,,additio
1
the product can have low or high ratio of wheat to corn at the same time
1
the product can have sugar or honey or artificial at the same time
1
the product can have the presence or absence of flavor bits at the same time
1
wn list

wn list
t favorite cereal is 75 for each child,
all utility is at least 1 part-worth larger than the utility of their current preferred cereal.

e Left Hand Side)


t-worth larger criteria for the utility)
, because we know the ,,additional utility" of the given property of the new product

rn at the same time


e same time
or bits at the same time
The Martin-Beck Company operates a plant in St. Louis with an annual capacity of 30,000 units. Product is shipped t
Boston, Atlanta, and Houston. Because of an anticipated increase in demand, Martin-Beck plans to increase capacity
more of the following cities: Detroit, Toledo, Denver, or Kansas City. The estimated annual fixed cost and the annual
as follows:

Proposed Plant Annual Fixed Cost Annual Capacity


Detroit 175,000 10,000
Toledo 300,000 20,000
Denver 375,000 30,000
Kansas City 500,000 40,000
The company’s long-range planning group developed forecasts of the anticipated annual demand at the distribution ce

Distribution Center Annual Demand


Boston 30,000
Atlanta 20,000
Houston 20,000
The shipping cost per unit from each plant to each distribution center is as follows:

Distribution Centers
Plant Site Boston Atlanta Houston
Detroit 5 2 3
Toledo 4 3 4
Denver 9 7 5
Kansas City 10 4 2
St. Louis 8 4 3
Formulate a mixed-integer programming model that could be used to help Martin-Beck determine which new plant or
anticipated demand.

Decision variables

x1 if the we would like to have a plant in Detroit then 1 else 0


x2 if the we build a plant in Toledo then 1 else 0
x3 if the we build a plant in Denver then 1 else 0
x4 if the we build a plant in Kansas city then 1 else 0
y1 shipped units from Detroit to Boston
y2 shipped units from Detroit to Atlanta
y3 shipped units from Detroit to Houston
y4 shipped units from Toledo to Boston
y5 shipped units from Toledo to Atlanta
y6 shipped units from Toledo to Houston
y7 shipped units from Denver to Boston
y8 shipped units from Denver to Atlanta
y9 shipped units from Denver to Houston
y10 shipped units from Kansas City to Boston
y11 shipped units from Kansas City to Atlanta
y12 shipped units from Kansas City to Houston
y13 shipped units from St. Louis to Boston
y14 shipped units from St. Louis to Atlanta
y15 shipped units from St. Louis to Houston

Chaning cells for ,,building cost" decision variables


Optimal Solution

x1 x2 x3 x4 y1 y2
Optimal value - - - 1 - -
the coefficient are the annual fixed cost:
Objective function x1 for Detroit, x2 for Toledo, x3 for Denver and
x4 for Kansas City

x1 x2 x3 x4 y1 y2
Coefficient 175,000 300,000 375,000 500,000 5 2

Constraints

Description x1 x2 x3 x4 y1 y2
Detroit Capacity - 10,000 1 1
Toledo Capacity - 20,000
Denver Capacity - 30,000
Kansas City Capacity - 40,000
St. Louis Capacity
Boston Demand 1
Atlanta Demand 1
Houston Demand
Sign constraints 1 x1,x2,x3,x4 are binaries
Sign constraints 2 y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15 are non-negative
s. Product is shipped to regional distribution centers located in
s to increase capacity by constructing a new plant in one or
ed cost and the annual capacity for the four proposed plants are

d at the distribution centers as follows:

ne which new plant or plants to open in order to satisfy

first we would like to decide where we have a new plant (,,capacity plan")
e0 we do not introduce x5 binary decision variable for St. Louis, because we have already have a plant there (in a
x5 = 1, so this is not relevant)

after choosing the ,,capacity plan", we also have to decide the shipped units between the towns
we have 5 (possible plants) and 3 regional distribution centers, so there are 5*3=15 non-negative decision vari
shipping)

logically we cannot ship units from a non-existing plant


for example if x1 = 0 (because we do not want to have a plant in Detroit) then y1=y2=y3=0 has to hold (we have to
decision variables Chaning cells for ,,shipping cost" decision variables

y3 y4 y5 y6 y7 y8 y9 y10 y11 y12


- - - - - - - - 20,000 20,000
ed cost: the coefficient are the costs per unit:
or Denver and y1,y2,y3 from Detroit; y4,y5,y6 from Toledo; y7,y8,y9 from Denver;
y10,y11,y12 from Kansas City and y13,y14,y15 from St. Louis
y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
3 4 3 4 9 7 5 10 4 2

y3 y4 y5 y6 y7 y8 y9 y10 y11 y12


1
1 1 1
1 1 1
1 1 1

1 1 1
1 1 1
1 1 1 1
in Solver there is an option to set the variables to binaries at the drop-down list
non-negative

by ,,Make Unconstrained Variables Non-negative" option in Solver window


)
have already have a plant there (in any cases

ts between the towns


e 5*3=15 non-negative decision variables (all routes are avaible for

y1=y2=y3=0 has to hold (we have to check it at the optimum as well)


y13 y14 y15 z
30,000 - - 860,000 Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT functio

y13 y14 y15 Comment


8 4 3 we would like to minimize the general cost level (=sum of

capacity constraint: w
y13 y14 y15 Value of Left Hand Side Relation Value of Right Hand Side existing capacity for
so technically for exa
- <= 0
- <= 0
- <= 0
in St. Louis we have a
- <= 0
1 1 1 30,000 <= 30,000
we have to ship at le
1 30,000 >= 30,000
1 20,000 >= 20,000 for example for Bost
1 20,000 >= 20,000 (y10) and from St. L
y1+y4+y7+y10+y13
drop-down list
ust be formula -> SUMPRODUCT function

e the general cost level (=sum of annual fixed cost and shipping cost)

capacity constraint: we cannot ship more from a plant than its existing capacity
existing capacity for example in Detroit means that if x1 =1 then the capacity is 10 000 (otherwise 0)
so technically for example in Detroit we would like to use 10 000*x1 on Right Hand Side (but we have to take it to the Left H

in St. Louis we have an existing plant which has 30 000 capacity

we have to ship at least on the level of the demand for the regional distribution towns

for example for Boston: we can ship units from Denver (y1), from Toledo (y4), from Detroit (y7), from Kansas City
(y10) and from St. Louis (y13) to Boston, but we have to fulfill the minimal demand:
y1+y4+y7+y10+y13 >= 30 000 which is the demand in Boston
herwise 0)
ut we have to take it to the Left Hand Side)

t (y7), from Kansas City


The Martin-Beck Company operates a plant in St. Louis with an annual capacity of 30,000 units. Product is shipped t
Atlanta, and Houston. Because of an anticipated increase in demand, Martin-Beck plans to increase capacity by const
following cities: Detroit, Toledo, Denver, or Kansas City. The estimated annual fixed cost and the annual capacity for

Proposed Plant Annual Fixed Cost Annual Capacity


Detroit 175,000 10,000
Toledo 300,000 20,000
Denver 375,000 30,000
Kansas City 500,000 40,000
The company’s long-range planning group developed forecasts of the anticipated annual demand at the distribution ce

Distribution Center Annual Demand


Boston 30,000
Atlanta 20,000
Houston 20,000
The shipping cost per unit from each plant to each distribution center is as follows:

Distribution Centers
Plant Site Boston Atlanta Houston
Detroit 5 2 3
Toledo 4 3 4
Denver 9 7 5
Kansas City 10 4 2
St. Louis 8 4 3
Formulate a mixed-integer programming model that could be used to help Martin-Beck determine which new plant or
demand. Find a second-best solution!

Decision variables

x1 if the we would like to have a plant in Detroit then 1 else 0


x2 if the we build a plant in Toledo then 1 else 0
x3 if the we build a plant in Denver then 1 else 0
x4 if the we build a plant in Kansas city then 1 else 0
y1 shipped units from Detroit to Boston
y2 shipped units from Detroit to Atlanta
y3 shipped units from Detroit to Houston
y4 shipped units from Toledo to Boston
y5 shipped units from Toledo to Atlanta
y6 shipped units from Toledo to Houston
y7 shipped units from Denver to Boston
y8 shipped units from Denver to Atlanta
y9 shipped units from Denver to Houston
y10 shipped units from Kansas City to Boston
y11 shipped units from Kansas City to Atlanta
y12 shipped units from Kansas City to Houston
y13 shipped units from St. Louis to Boston
y14 shipped units from St. Louis to Atlanta
y15 shipped units from St. Louis to Houston

Chaning c
Chaning cells for ,,building cost" decision variables
Optimal Solution

x1 x2 x3 x4 y1
Optimal value 1 - 1 - 0
the coefficient are the annual fixed cost:
Objective function x1 for Detroit, x2 for Toledo, x3 for Denver and
x4 for Kansas City

x1 x2 x3 x4 y1
Coefficient 175,000 300,000 375,000 500,000 5

Constraints

Description x1 x2 x3 x4 y1
Detroit Capacity - 10,000 1
Toledo Capacity - 20,000
Denver Capacity - 30,000
Kansas City Capacity - 40,000
St. Louis Capacity
Boston Demand 1
Atlanta Demand
Houston Demand
Second best - 1 - 1 - 1 1
Sign constraints 1 x1,x2,x3,x4 are binaries
Sign constraints 2 y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15 are non-negative
000 units. Product is shipped to regional distribution centers located in Boston,
s to increase capacity by constructing a new plant in one or more of the
ost and the annual capacity for the four proposed plants are as follows:

al demand at the distribution centers as follows:

k determine which new plant or plants to open in order to satisfy anticipated

first we would like to decide where we have a new plant (,,capacity plan")
then 1 else 0 we do not introduce x5 binary decision variable for St. Louis, because we have already have a plant
1 else 0 x5 = 1, so this is not relevant)
1 else 0
n 1 else 0
on after choosing the ,,capacity plan", we also have to decide the shipped units between the towns
we have 5 (possible plants) and 3 regional distribution centers, so there are 5*3=15 non-negative d
nta shipping)
ton
on logically we cannot ship units from a non-existing plant
for example if x1 = 0 (because we do not want to have a plant in Detroit) then y1=y2=y3=0 has to hold
nta
ton
on
nta
ton
oston
lanta
uston
ton
nta
ston

Chaning cells for ,,shipping cost" decision variables


on variables

y2 y3 y4 y5 y6 y7 y8 y9 y10 y11
10,000 - - - - 30,000 - - - -
annual fixed cost: the coefficient are the costs per unit:
edo, x3 for Denver and y1,y2,y3 from Detroit; y4,y5,y6 from Toledo; y7,y8,y9 from Denver;
y10,y11,y12 from Kansas City and y13,y14,y15 from St. Louis
y2 y3 y4 y5 y6 y7 y8 y9 y10 y11
2 3 4 3 4 9 7 5 10 4

y2 y3 y4 y5 y6 y7 y8 y9 y10 y11
1 1
1 1 1
1 1 1
1 1

1 1 1
1 1 1 1
1 1 1

s
in Solver there is an option to set the variables to binaries at the drop-down list
4,y15 are non-negative

by ,,Make Unconstrained Variables Non-negative" option in Solver window


y plan")
use we have already have a plant there (in any cases

ped units between the towns


here are 5*3=15 non-negative decision variables (all routes are avaible for

then y1=y2=y3=0 has to hold (we have to check it at the optimum as well)
y12 y13 y14 y15 z Set Objective:
- - 10,000 20,000 940,000 Objective Cell contents must be formula -> S

y12 y13 y14 y15 Comment


2 8 4 3 we would like to minimize the general

y12 y13 y14 y15 Value of Left Hand Side Relation


0 <=
- <=
- <=
1 - <=
1 1 1 30,000 <=
1 30,000 >=
1 20,000 >=
1 1 20,000 >=
- 2 <=
ries at the drop-down list

Solver window
Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

we would like to minimize the general cost level (=sum of annual fixed cost and shipping cost)

Value of Right Hand Side


0 capacity constraint: we cannot ship more from a plant than its existing capacity
existing capacity for example in Detroit means that if x1 =1 then the capacity is 10 000 (othe
0 so technically for example in Detroit we would like to use 10 000*x1 on Right Hand Side (bu
0
0 in St. Louis we have an existing plant which has 30 000 capacity
30,000
30,000 we have to ship at least on the level of the demand for the regional distribution towns
20,000
for example for Boston: we can ship units from Denver (y1), from Toledo (y4), from Detroit (
20,000 (y10) and from St. Louis (y13) to Boston, but we have to fulfill the minimal demand:
0 y1+y4+y7+y10+y13 >= 30 000 which is the demand in Boston

for binary decision variables in order to have the second best solution let us definy the follow

A: the set of all binary decision variables which are equal to 1 in the original optimum
B: the set of all binary decision variables which are equal to 0 in the original optimum
c: the sum of the values of all binary decision variables in the original optimum = the numbe
original optimum (because they are binary variables the two definitions of c are equivavelent)

Then the second best solution constraint:

sum of the members of set A - sum of the members of set B <= c - 1

In the exercise:
- in the set A we have only the x4 decision variable
- in the set B we have x1,x2 and x3 decision variables
- c = 1 (because x1+x2+x3+x4= 1 or only x4 is not zero)

So the second best solution constraint in that case (on the Left Hand Side we have the decision v

x4 - (x1+x2+x3) <= 1 - 1 = 0
In the exercise:
- in the set A we have only the x4 decision variable
- in the set B we have x1,x2 and x3 decision variables
- c = 1 (because x1+x2+x3+x4= 1 or only x4 is not zero)

So the second best solution constraint in that case (on the Left Hand Side we have the decision v

x4 - (x1+x2+x3) <= 1 - 1 = 0
ng capacity
capacity is 10 000 (otherwise 0)
on Right Hand Side (but we have to take it to the Left Hand Side)

distribution towns

edo (y4), from Detroit (y7), from Kansas City


inimal demand:

on let us definy the followings:

original optimum
original optimum
al optimum = the number of all binary decision variables which are equal to 1 in the
c are equivavelent)

-1

e we have the decision variables and not their values from the original optimum!):
e we have the decision variables and not their values from the original optimum!):
Gandhi Cloth Company is capable of manufacturing three types of clothing: shirts, shorts, and pants. The manufactur
available. The machinery needed to manufacture each type of clothing must be rented at the following rates: shirt mac
The manufacture of each type of clothing also requires the amounts of cloth and labor shown in Table 2. Each week, 1
for each type of clothing are shown in the Table 3.

Table 2 : Resource Requirements for Gandhi


Clothing Type Labor (hours) Cloth (sq yard) Resources
Shirt 3 4 Labor
Shorts 2 3 Cloth
Pants 6 4
Table 3 : Revenue and Cost Information Gandhi
Clothing Type Sales Price ($) Variable ($) Profit we have to calculate it from the ta
Shirt 12 6 6
Shorts 8 4 4
Pants 15 8 7
Formulate an IP whose solution will maximize Gandhi's weekly profits.

Decision variables

x1 number of shorts produced each week


x2 number of shirts produced each week
x3 number of pants produced each week
y1 if x1 > 0 are manufactured then 1 else 0
y2 if x2 > 0 are manufactured then 1 else 0
y3 if x3 > 0 are manufactured then 1 else 0

Chaning cells for ,,main" decision variables Chaning cells for ,,t
Optimal Solution

x1 x2 x3 y1 y2
Optimal value - - 25 - -

Objective function the coefficient are profit per number the coefficient ar

x1 x2 x3 y1 y2
Coefficient 6 4 7 -200 -150

Constraints

Description x1 x2 x3 y1 y2
Labor resource 3 2 6
Cloth resource 4 3 4
Fixed cost 1 for shorts machine 1 -40
Fixed cost 1 for shirts machine 1 -53.333333
Fixed cost 1 for pants machine 1
Sign constraints 1 x1,x2,x3 are non-negative integers
Sign constraints 2 y1,y2,y3 are binaries

M1 must be at least min {150 / 3; 160 /4} M2 must be at least min {150 / 2; 160 /3}
(we have 150 working hours and 160 sq cloth; and to produce one short we (we have 150 working hours and 160 sq cloth; an
need 3 units of labor and 4 sq cloth) need 2 units of labor and 3 sq cloth)
and pants. The manufacture of each type of clothing requires that Gandhi have the appropriate type of machinery
he following rates: shirt machinery, $200 per week; shorts machinery, $150 per week; pants machinery, $100 per week.
wn in Table 2. Each week, 150 hours of labor and 160 sq yd of cloth are available. The variable unit cost and selling price

Resources Fixed cost


150 Shirts machine 200
160 Shorts machine 150
Pants machine 100

have to calculate it from the table

they are non-negative integer numbers


uced each week
ced each week
ced each week
they are binaries (we will use them for the fixed cost)
ed then 1 else 0
ed then 1 else 0
ed then 1 else 0

Chaning cells for ,,technical" decision variables

Set Objective:
y3 z Objective Cell contents must be formula -> SUMPRODUCT function
1 75

the coefficient are the fixed costs of the machines

y3 Comment
-100 we would like to maximize the net profit level (= gross profit - fixed cost

y3 Value of Left Hand Side Relation Value of Right Hand Side we have only 150 working ho
150 <= 150
we have only 160 sq cloth f
we have only 160 sq cloth f
100 <= 160
- <= 0
- <= 0
for the fixed cost for shorts
-25 - <= 0
x1 <= M1 * y1

x1: number of shorts produ


in Solver there is an option to set the variables to integers at the drop-down list y1: if x1 >0 then 1 else 0
M1: ,,large number": usuall
in Solver there is an option to set the variables to binaries at the drop-down list

t least min {150 / 2; 160 /3} M3 must be at least min {150 / 6; 160 /4}
orking hours and 160 sq cloth; and to produce one shirt we (we have 150 working hours and 160 sq cloth; and to produce one pant we need
abor and 3 sq cloth) 6 units of labor and 4 sq cloth)
machinery
$100 per week.
t and selling price

on

= gross profit - fixed cost)

e have only 150 working hours for manufacturing

we have only 160 sq cloth for manufacturing


we have only 160 sq cloth for manufacturing

or the fixed cost for shorts we have the following constraint:

1 <= M1 * y1

1: number of shorts produced each week


1: if x1 >0 then 1 else 0
M1: ,,large number": usually at least the level of maximal feasible quantity

produce one pant we need


Dorian Auto is considering manufacturing three types of autos: compact, midsize, and large. The resources require

Table 8 : Resources and Profits for Three Types of Cars


Resource Compact Midsize Large Resources
Steel required 1.5 3 5 Steel 6,000
Labor required 30 25 40 Labor 60,000
Profit yielded ($) 2,000 3,000 4,000
For the production of a type of car to be economically feasible, at least 1000 cars of that type must be produced. F

Decision variables

x1 number of compact cars produced


x2 number of midsize cars produced
x3 number of large cars produced
y1 if x1 > 0 are manufactured then 1 else 0
y2 if x2 > 0 are manufactured then 1 else 0
y3 if x3 > 0 are manufactured then 1 else 0

Optimal Solution Chaning cells for ,,main" decision variables Chaning

x1 x2 x3 y1 y2 y3
Optimal value - 2,000 - - 1 -

the coefficient are profit per number techn


Objective function (also p

x1 x2 x3 y1 y2 y3
Coefficient 2,000 3,000 4,000 0 0 0

Constraints

Description x1 x2 x3 y1 y2 y3
Steel constraint 1.5 3 5
Labor constraint 30 25 40
Either-Or constraint 1 for compact site 1 -2000
Either-Or constraint 2 for compact site -1 2000
Either-Or constraint 1 for midsize site 1 -2000
Either-Or constraint 2 for midsize site -1 2000
Either-Or constraint 1 for large site 1 -1200
Either-Or constraint 2 for large site -1 1200
Sign constraints 1 x1,x2,x3 are non-negative integers
Sign constraints 2 y1,y2,y3 are binaries
in Solver there is an option to set the variables to integers at the drop-down list

in Solver there is an option to set the variables to binaries at the drop-down list
in Solver there is an option to set the variables to binaries at the drop-down list

M1 must be at least min {6000 / 1,5; 60000 /30} M2 msut be at least min {6000 / 3; 60000 /25
(we have 60000 working hours and 6000 tons of steel; and to produce one (we have 60000 working hours and 6000 tons of s
compact car we need 30 units of labor and 1.5 tons of steel) midsize car we need 25 units of labor and 3 tons o
The resources required, and the profits yielded, by each type of car are shown in Table 8.

e must be produced. Formulate an IP to maximize the profit.

they are non-negative integer numbers


rs produced
s produced
produced they are binaries (we will use them for the fixed cost)
d then 1 else 0
d then 1 else 0
d then 1 else 0

ariables Chaning cells for ,,technical" decision variables

z Set Objective:
6,000,000 Objective Cell contents must be formula -> SUMPRODUCT function

technical variables and they do not effect the objective function -> all the coefficients are zero
(also possible solution: not to include them in the sumproduct)

Comment
we would like to maximize the profit

Value of Left Hand Side Relation Value of Right Hand Side


we have only 150 working hours for ma
6,000 <= 6,000
50,000 <= 60,000 we have only 160 sq cloth for manufact
- <= 0
About Either - Or constraints
- <= 1000
For example the compact cars we know that
- <= 0 (1A) x1=0 or (2A) x1>=1000
- <= 1000 but we cannot include directly these two constraints with
- <= 0 So we use the following two constraints (this is standa
- <= 200 (1B) x1 <= M1*y1 (where M1 is po
(2B) x1 >= 1000 - M1*(1-y1) (because origina

So by (1B) and (2B) we have the following cases


rs at the drop-down list if y1 = 0 then (1B) is x1<= 0
if y1 = 1 then (1B) is x1<= M1 (which is ,,large")
own list
And because all the decision variables have to be on the
(1B) -> x1 - M1*y1 <= 0
(2B) -> M1*y1 - x1 <= M1 - 1000
(2B) x1 >= 1000 - M1*(1-y1) (because origina

So by (1B) and (2B) we have the following cases


if y1 = 0 then (1B) is x1<= 0
if y1 = 1 then (1B) is x1<= M1 (which is ,,large")
own list
And because all the decision variables have to be on the
(1B) -> x1 - M1*y1 <= 0
(2B) -> M1*y1 - x1 <= M1 - 1000

min {6000 / 3; 60000 /25} M3 must be at least min {6000 / 5; 60000 /40}
hours and 6000 tons of steel; and to produce one (we have 60000 working hours and 6000 tons of steel; and to produce one
units of labor and 3 tons of steel) large car we need 40 units of labor and 5 tons of steel)
T function

s are zero

ofit

ve only 150 working hours for manufacturing


ve only 160 sq cloth for manufacturing

constraints
ompact cars we know that
) x1>=1000
de directly these two constraints without modification (because they make contradiction together)

wing two constraints (this is standard handling and works if and only if M1 >= 1000 -> otherwise 1000 is not relevant)
1 (where M1 is positive ,,large" number: usually at least the level of maximal feasible quantity)
- M1*(1-y1) (because originally x1 was at least 1000 by (2A) we can reduce the Right Hand Side with any non-negative number a

we have the following cases


) is x1<= 0 and (2B) x1>= 1000 - M1 (and because M1 is ,,large": x1=0 is one feasible solution for (1B
) is x1<= M1 (which is ,,large") and (2B) x1>= 1000 - 0 (and any x1>=1000 is feasible solution for (1B) and (2B))

decision variables have to be on the Left Hand Side for the Solver, we rearrange (1B) and (2B)
*y1 <= 0
- x1 <= M1 - 1000
- M1*(1-y1) (because originally x1 was at least 1000 by (2A) we can reduce the Right Hand Side with any non-negative number a

we have the following cases


) is x1<= 0 and (2B) x1>= 1000 - M1 (and because M1 is ,,large": x1=0 is one feasible solution for (1B
) is x1<= M1 (which is ,,large") and (2B) x1>= 1000 - 0 (and any x1>=1000 is feasible solution for (1B) and (2B))

decision variables have to be on the Left Hand Side for the Solver, we rearrange (1B) and (2B)
*y1 <= 0
- x1 <= M1 - 1000

el; and to produce one


el)
r)

otherwise 1000 is not relevant)


maximal feasible quantity)
ight Hand Side with any non-negative number and the inequality remains true)

1 is ,,large": x1=0 is one feasible solution for (1B) and (2B))


00 is feasible solution for (1B) and (2B))
ight Hand Side with any non-negative number and the inequality remains true)

1 is ,,large": x1=0 is one feasible solution for (1B) and (2B))


00 is feasible solution for (1B) and (2B))
Dorian Auto has a $20,000 advertising budget. Dorian can purchase full-page ads in two magazines: Inside Jocks (IJ)
reads a Dorian Auto ad for the first time.

The number of exposures generated by each ad in IJ is as follows: ads 1–6, 10,000 exposures; ads 7–10, 3,000 exposu
would generate 6*(10,000) + 2*(3,000) = 66,000 exposures.

The number of exposures generated by each ad in FS is as follows: ads 1–4, 8,000 exposures; ads 5–12, 6,000 exposu
Thus, 13 ads in FS would generate 4*(8,000) + 8*(6,000) + 1*(2,000) = 82,000 exposures.

Each full-page ad in either magazine costs $1,000. Assume there is no overlap in the readership of the two magazines
limited advertising funds.

Decision variables

x1 number of IJ ads yielding 10 000 exposures


x2 number of IJ ads yielding 3 000 exposures
x3 number of IJ ads yielding 2 500 exposures
y1 number of FS ads yielding 8 000 exposures
y2 number of FS ads yielding 6 000 exposures
y3 number of FS ads yielding 2 000 exposures

Chaning cells for decision variables


Optimal Solution

x1 x2 x3 y1 y2
Optimal value 6 2 - 4 8

the coefficienst are yielded exposures in tho


Objective function

x1 x2 x3 y1 y2
Coefficient 10 3 2.5 8 6

Constraints

Description x1 x2 x3 y1 y2
Budget 1 1 1 1 1
Inside Jocks: 1-6 ads generate 10 000 exposure 1
Inside Jocks: 7-10 ads generate 3 000 exposure 1
Inside Jocks: 11-15 ads generate 2 500 exposure 1
Family Square: 1-4 ads generate 8 000 exposure 1
Family Square: 5-12 ads generate 6 000 exposure 1
Family Square: 13-15 ads generate 2 000 exposure
Sign constraints x1,x2,x3, y1,y2,y3 are non
magazines: Inside Jocks (IJ) and Family Square (FS). An exposure occurs when a person

ures; ads 7–10, 3,000 exposures; ads 11–15, 2,500 exposures; ads 16, 0 exposures. For example, 8 ads in IJ

ures; ads 5–12, 6,000 exposures; ads 13–15, 2,000 exposures; ads 16, 0 exposures.
es.

dership of the two magazines. Formulate an IP to maximize the number of exposures that Dorian can obtain with

s yielding 10 000 exposures


ds yielding 3 000 exposures
ds yielding 2 500 exposures
ds yielding 8 000 exposures
ds yielding 6 000 exposures
ds yielding 2 000 exposures

lls for decision variables Chaning cells for ,,technial" decision variables

y3 z Set Objective:
- 146 Objective Cell contents must be formula -> SUMPRODUCT function

nst are yielded exposures in thousand

y3 Comment
2 we would like to maximize the exposures

y3 Value of Left Hand Side Relation Value of Right Hand Side


our advertising budget is 20 thousand
1 20 <= 20
6 <= 6
2 <= 4 in Inside Jocks only the first 6 ads genera
- <= 5
4 <= 4
in Family Square only the first 4 ads gene
8 <= 8
1 - <= 3
x1,x2,x3, y1,y2,y3 are non-negative integers
UCT function

tising budget is 20 thousand

s only the first 6 ads generate 10 000 exposure

are only the first 4 ads generate 8 000 exposure


Dorian Auto has a $20,000 advertising budget. Dorian can purchase full-page ads in two magazines: Inside Jocks (IJ)
person
reads a Dorian Auto ad for the first time.
Each full-page ad in either magazine costs $1,000. Assume there is no overlap in the readership of the two magazines
that Dorian can obtain with limited advertising funds.

Suppose that the number of exposures generated by each IJ ad was as follows: ads 1–6, 2,500 exposures; ads 7–10, 3,
Suppose also that the number of exposures generated by each FS is as follows: ads 1–4, 2,000 exposures; ads 5–12, 6

Decision variables

x1 number of IJ ads yielding 2 500 exposures


x2 number of IJ ads yielding 3 000 exposures
x3 number of IJ ads yielding 10 000 exposures
y1 number of FS ads yielding 2 000 exposures
y2 number of FS ads yielding 6 000 exposures
y3 number of FS ads yielding 8 000 exposures
u1 if x1 >= 6 (so we use 1-6 ads in IJ) then 1 else 0
u2 if x2 >= 4 (so we use 7-10 ads in IJ) then 1 else 0
u3 if y1 >= 4 (so we use 1-4 ads in FS) then 1 else 0
u4 if y2 >= 8 (so we use 5-12 ads in FS) then 1 else 0

Optimal Solution Chaning cells for decision variables

x1 x2 x3 y1 y2
Optimal value 5 - - 4 8

Objective function the coefficienst are yielded exposures i

x1 x2 x3 y1 y2
Coefficient 2.5 3 10.0 2 6

Constraints

Description x1 x2 x3 y1 y2
Budget 1 1 1 1 1
Inside Jocks: 1-6 ads generate 2 500 exposure 1
Inside Jocks: 7-10 ads generate 3 000 exposure 1
Inside Jocks: 11-15 ads generate 10 000 exposure 1
Family Square: 1-4 ads generate 2 000 exposure 1
Family Square: 5-12 ads generate 6 000 exposure 1
Family Square: 13-15 ads generate 6 000 exposure
1
Inside Jocks: 7-10 ads cannot exists without 1-6 ads
-1
1
Inside Jocks: 11-15 ads cannot exists without 7-10 ads
-1
1
Family Square: 5-12 ads cannot exists without 1-4 ads
-1
1
Family Square: 13-15 ads cannot exists without 5-12 ads
Sign constraints 1 x1,x2,x3, y1,y2,y3 are non-negative integ
Sign constraints 2 u1,u2,u3,u4 are binaries

1-6 ads are six ads

7-10 ads are four ads


gazines: Inside Jocks (IJ) and Family Square (FS). An exposure occurs when a

hip of the two magazines. Formulate an IP to maximize the number of exposures

0 exposures; ads 7–10, 3,000 exposures; ads 11–15, 10,000 exposures.


0 exposures; ads 5–12, 6,000 exposures; ads 13–15, 8,000 exposures.

ng 2 500 exposures nonnegative integer decision variables


ng 3 000 exposures
ng 10 000 exposures
ng 2 000 exposures
ng 6 000 exposures
ng 8 000 exposures binary decision variables
ads in IJ) then 1 else 0
ads in IJ) then 1 else 0
ds in FS) then 1 else 0
ads in FS) then 1 else 0

cells for decision variables Set Objective:


Objective Cell contents must be formula -> SUMPRODUCT

y3 u1 u2 u3 u4 z
3 - - 1 1 93

nst are yielded exposures in thousand technical variables and they do not effect the objective function -> all the coefficients are zer
(also possible solution: not to include them in the sumproduct)
y3 u1 u2 u3 u4 Comment
8 0 0 0 0 we would like to maximize the exposures

our advertis
y3 u1 u2 u3 u4 Value of Left Hand Side Relation Value of Right Hand Side
1 20 <= 20
5 <= 6 in Inside J
- <= 4
- <= 5
4 <= 4 in Family
8 <= 8
1 3 <= 3
-6 5 >= 0 We cannot
4 - >= (1A): x2 >0
0
(2A): x2 <=
-4 - >= 0
5 - >= 0 To handle th
(1B) x1 >=
-4 - >= 0 (2B) x2 <=
8 - >= 0
-8 - >= 0 And because
(1B) -> x
-1 3 - >= 0 (2B) -> 4
3 are non-negative integers
u3,u4 are binaries

four ads
st be formula -> SUMPRODUCT function

-> all the coefficients are zero

exposures

our advertising budget is 20 thousand

in Inside Jocks only the first 6 ads generate 2 500 exposure


in Family Square only the first 4 ads generate 2 000 exposure

We cannot use 7-10 ads in Inside Jocks without using first 1-6 ads, which means
(1A): x2 >0 if and only if x1>=6
(2A): x2 <= 4 (because 7-10 ads are four ads)

To handle these two cases we use u1 binary decision variable (by definition u1 = 1 if x1 >= 6), so
(1B) x1 >= 6*u1
(2B) x2 <= 4*u1

And because all the decision variables have to be on the Left Hand Side for the Solver, we rearrange (1) and (2B)
(1B) -> x1 - 6*u1 >= 0
(2B) -> 4*u1 - x2 >= 0
, so

ge (1) and (2B)


GreenLawns provides a lawn fertilizing and weed control service. The company is adding a special aeration treatmen
is planning to promote this new service in two media: radio and direct-mail advertising. A media budget of $3,000 is
services, GreenLawns has obtained the following estimate of the relationship between sales and the amount spent on

S = -2R2 - 10M2 - 8R*M + 18R + 34M


where
S = total sales in thousands of dollars
R = thousands of dollars spent on radio advertising
M = thousands of dollars spent on direct-mail advertising

GreenLawns would like to develop a promotional strategy that will lead to maximum sales subject to the restriction p

Formulate an optimization problem that can be solved to maximize sales subject to the media budget of spending no m

Decision variables

R thousands of dollars spent on radio advertising


M thousands of dollars spent on direct-mail advertising

Optimal Solution Chaning cells for decision variables

R M z Set Objective:
Optimal value 2.50 0.50 37 Objective Cell contents must be formula -> SUMPROD
(or you can write the formula from the description by

Objective function

R*R M*M R*M R M


Coefficient - 2 - 10 - 8 18 34
Calculated value 6 0 1 3 0 coefficien
we separ
Constraints columns
column to

Description R M Value of Left Hand Side Relation Value of Right Hand Side For calcu
the decis
Budget 1 1 3 <= 3 optimaliz
Sign constraints R,M are nonnegative
by ,,Make Unconstrained Variables N
Solver window
special aeration treatment as a low-cost extra service option that it hopes will help attract new customers. Management
edia budget of $3,000 is available for this promotional campaign. Based on past experience in promoting its other
and the amount spent on promotion in these two media:

ubject to the restriction provided by the media budget.

a budget of spending no more than $3,000 on total advertising.

they are non-negative real numbers


ing
rtising

on variables

must be formula -> SUMPRODUCT function


rmula from the description by hand)

Comment
we would like to maximize the sales
coefficients from the description
we separate all the terms/ calculated variables into different
columns (for example one column for R*R, one column to M*M, one
column to R*M,…)

For calculated value we need to reference for optimal values of


the decision variables, because they are also changing during the
optimalization

ake Unconstrained Variables Non-negative" option in


r window
mers. Management
oting its other
The Cobb-Douglas production function is a classic model from economics used to model output as a function of capit

f(L,C)=c0*Lc1*Cc2

where c0, c1, and c2 are constants. The variable L represents the units of input of labor, and the variable C represents th

In this example, assume c0=5, c1=0.25, and c2=0.75 . Assume each unit of labor costs $25 and each unit of capital cos
amount should be allocated between capital and labor in order to maximize output.

Parameters Costs
c0 5 Labor 25
c1 0.25 Capital 75
c2 0.75

Decision variables they are non-negative real numbers

L the units of input of labor


C the units of input of capital

Optimal Solution Chaning cells for decision variables

L C z Set Objective:
Optimal value 750.00 750.00 3,750 Objective Cell contents must be formula -> P

coefficients from the description


Objective function we separate all the terms/ calculated vari
(one column to L^(c1) and one column to C^

Lc1 Cc2 Comment For calculated value we need to reference


Coefficient 1 1 because they are also changing during th
Calculated value 5 143 we would like to maximize the ouptut

Constraints

Description L C Value of Left Hand Side Relation


Budget 25 75 75,000 <=
Sign constraints L,C are nonnegative
by ,,Make Unconstrained Variables Non-n
Solver window
mics used to model output as a function of capital and labor. It has the form

input of labor, and the variable C represents the units of input of capital.

of labor costs $25 and each unit of capital costs $75. With $75,000 available in the budget, develop an optimization model to det
mize output.

they are non-negative real numbers

n variables

Set Objective:
Objective Cell contents must be formula -> PRODUCT function (not forget about c0 term)

coefficients from the description


we separate all the terms/ calculated variables into different columns
(one column to L^(c1) and one column to C^(c2))

For calculated value we need to reference for optimal values of the decision variables,
because they are also changing during the optimalization
e to maximize the ouptut

Value of Right Hand Side


75,000

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
evelop an optimization model to determine how the budgeted
Let S represent the amount of steel produced (in tons). Steel production is related to the amount of labor used (L) and

S = 20*L0.3*C0.7

In this formula L represents the units of labor input and C the units of capital input. Each unit of labor costs $50, and
Formulate an optimization problem that will determine how much labor and capital are needed to produce 50,000 ton

Parameters Costs
c0 20 Labor 50
c1 0.3 Capital 100
c2 0.7

Decision variables they are non-neg

L the units of input of labor


C the units of input of capital

Optimal Solution Chaning cells for decision variables

L C z Set Objective:
Objective Cell con
Optimal value 2,244.35 2,618.29 374,047

Objective function

L C Comment
Coefficient 50 100 we would like to minimize the cost (to

we have to t
Constraints

Description 20L0.3C0.7 Value of Left Hand Side Relation Value of Right Hand Side
Budget 49999.999984 50,000 >= 50,000
Sign constraints L,C are nonnegative
by ,,Make U
Solver win
ount of labor used (L) and the amount of capital used (C) by the following function:

nit of labor costs $50, and each unit of capital costs $100.
ded to produce 50,000 tons of steel at minimum cost.

they are non-negative real numbers

bles

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function

ke to minimize the cost (to produce 50 000 tons of steel)

we have to type it by hand

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
The profit function for two products is

-3x12 + 42x1 - 3x22 + 48x2 + 700

where x1 represents units of production of product 1 and x 2 represents units of production of product 2.
Producing one unit of product 1 requires 4 labor-hours and producing one unit of product 2 requires 6 labor-hours. Cu
it is possible to schedule overtime at a premium of $5 per hour.

Formulate an optimization problem that can be used to find the optimal production quantity of products 1 and 2 and th
hours should be scheduled?

Decision variables

x1 units of production of product 1


x2 units of production of product 2
x3 number of overtime hours scheduled

Optimal Solution Chaning cells for decision variables Set Objective:


Objective Cell conten
(or you can write the
x1 x2 x3 z
Optimal value 3.67 3.00 8.67 887

Objective function

x1*x1 x1 x2*x2 x2 x3
Coefficient - 3 42 - 3 48 - 5
Calculated value 13 4 9 3 8.67

Constraints

Description x1 x2 x3 Value of Left Hand Side Relation


Labor hour resource constraint 4 6 -1 24 <=
Sign constraints x1,x2,x3 are nonnegative
by ,,Make Unconstrained Va
of product 2.
2 requires 6 labor-hours. Currently, 24 labor-hours are available. The cost of labor-hours is already factored into the profit functio

y of products 1 and 2 and the optimal number of overtime hours to schedule. How much should be produced and how many over

they are non-negative real numbers


n of product 1
n of product 2
hours scheduled

Set Objective:
Objective Cell contents must be formula -> SUMPRODUCT function
(or you can write the formula from the description by hand)

coefficients from the description


we separate all the terms/ calculated variables into different
columns (for example one column for x1*x1, one column to x2*x2,…)

,,constant" Comment
1 we would like to maximize the profit
700
For calculated value we need to reference for optimal values of
the decision variables, because they are also changing during the
optimalization

Value of Right Hand Side


24

by ,,Make Unconstrained Variables Non-negative" option in Solver window


ed into the profit function, but

ced and how many overtime

alues of
during the
TN Communications provides cellular telephone services. The company is planning to expand into the Cincinnati are
transmits over a radius of 10 miles. The locations that must be reached by this tower are shown in the following figur

TN Communications would like to find the tower location that reaches each of these cities and minimizes the sum of

Formulate and solve a model to find the optimal location.

Decision variables

X position at axis X (this is x=? coordinate)


Y position at axis Y (this is y=? coordinate)
Chaning cells for decision variables
Optimal Solution
Set
X Y z Ob
(or
Optimal value 12.00 16.00 17

Objective function us

,,distance Florance" ,,distance Covington" ,,distance Hyde Park"


Calculated value 6 0 4

Constraints we calculated the

Description X Y Value of Left Hand Side


In the radius of Florance 4.00005346634716 35.9999379533645 6
In the radius of Covington 1.7866444835E-10 2.673464092925E-11 0
In the radius of Hyde Park 15.9998930678417 4.00002068224748 4
In the radius of Evendale 1.7866444835E-10 36.000062046689 6
Sign constraints X,Y are real numbers
xpand into the Cincinnati area and is trying to determine the best location for its transmission tower. The tower
shown in the following figure.

s and minimizes the sum of the distances to all locations from the new tower.

Coordinates x y
Florence 10 10
Covington 12 16
Hyde Park 16 18
Evendale 12 22

they are real numbers


axis X (this is x=? coordinate)
axis Y (this is y=? coordinate)
on variables

Set Objective:
Objective Cell contents must be formula -> SUM function
(or you can write the formula from the description by hand)

using the distance formula (it is same as calculating Hypotenuse)

,,distance Evendale" Comment


6 we would like to minimize the distance

we calculated the distance between the citi and optimal location of the new town

Relation Value of Right Hand Side


The tower transmits over a radius of 10 miles
<= 10
<= 10
<= 10
<= 10
miles
TN Communications provides cellular telephone services. The company is planning to expand into the Cincinnati are
over a radius of 10 miles. The locations that must be reached by this tower are shown in the following figure.

TN Communications would like to find the tower location that reaches each of these cities and minimizes the sum of

Formulate and solve a model that minimizes the maximum distance from the transmission tower location to the city lo

Decision variables

X position at axis X (this is x=? coordin


Y position at axis Y (this is y=? coordin
d maximal distinance

Optimal Solution Chaning cells for decision variables

X Y d
Optimal value 11.00 16.00 6.08

Objective function using the distance formula (it is same as calc

,,distance Florance" ,,distance Covington" ,,distance Hyde Park"


Calculated value 6 1 5

Constraints

Description X Y d
In the radius of Florance 0.99716668568227 36.002835380402 -1
In the radius of Covington 1.00283733384906 5.582684337791E-08 -1
In the radius of Hyde Park 25.0141786301826 3.99905494763513 -1
In the radius of Evendale 1.00283733384906 35.9971647312517 -1
Sign constraints 1 X,Y are real numbers
Sign constraints 2 d is non-negative
o expand into the Cincinnati area and is trying to determine the best location for its transmission tower. The tower transmits
in the following figure.

cities and minimizes the sum of the distances to all locations from the new tower.

Coordinates x y
Florence 10 10
Covington 12 16
Hyde Park 16 18
Evendale 12 22

ssion tower location to the city locations.

they are real numbers


ition at axis X (this is x=? coordinate)
ition at axis Y (this is y=? coordinate)
maximal distinance
the maximal distance is also a variable (and it depends on the two other
on variables decision variables)

z Set Objective:
6.08 Objective Cell contents must be formula -> SUM function
(or you can write the formula from the description by hand)

e distance formula (it is same as calculating Hypotenuse)

,,distance Evendale" Comment


6 we would like to minimize the distance
we calculate the distance between the citi and optimal location of the new tow
maximal distance (because of the rearranging)

because d is a variable (maximal distance), then we


Value of Left Hand Side Relation Value of Right Hand Side
0 <= 0
- 5 <= 0
- 1 <= 0
0 <= 0
rs
he tower transmits

numbers

function
n by hand)

l location of the new town minus the

imal distance), then we arrange the inequliaty


A maximization problem has the following incomplete sensitivity report. Fill out the missing values!

We also know the following:


1) The optimal objective function value is 11.
2) The third constraint is x1 + x2 ≥ 8.
3) If the right-hand-side of the third constraint is decreases to 6, the optimal objective function value increases by 10.
4) The shadow price of the first constraint is valid in the interval [32,55] of the right-hand-side.
5) The reduced cost of x3 is valid for any coefficient that is at least 2.

Variable Cells
Cell Name Final Value Reduced Cost Objective Coefficient
$B$3 x1 >=0 8 0 1
$C$3 x2 >=0 0 -2 5
$D$3 x3 >=0 1 0 3

Constraints
Cell Name Final Value Shadow Price Constraint R.H. Side
$E$5 C1 34 1.5 34
$E$6 C2 -20 0 22
$E$7 C3 8 -5 8

Comments for the solution of Variable cells/Constraints

Number of the step Table Description of the cell


0 Objective function Objective function
1 Constraints Constraint R.H. Side for C3
2 Constraints Constraint R.H. Side for C1
3 Constraints Allowable Increase for C1
4 Constraints Allowable Decrease for C1
5 Constraints Allowable Increase for C2
6 Constraints Allowable Decrease for C2
7 Constraints Shadow Price for C2

8 Constraints Shadow Price for C3

9 Constraints Final Value for C2


10 Variable Cells Final Value for x1

11 Variable Cells Final Value for x3

12 Variable Cells Allowable Increase for x3


13 Variable Cells Allowable Decrease for x3
14 Variable Cells Reduced Cost for x1

15 Variable Cells Reduced Cost for x2

16 Variable Cells Reduced Cost for x3


ng values!

tion value increases by 10.


side.

Allowable Increase Allowable Decrease


5 2
2 1.00E+30
1E+030 1

Allowable Increase Allowable Decrease


21 2
1.00E+30 42
0.5 3.818181818

straints

he cell Value
ction max z =1x1 + 5x2 + 3x3
de for C3 8
de for C1 34
se for C1 21
se for C1 2
se for C2 1.00E+30
se for C2 42
for C2 0

for C3 -5

or C2 8
or x1 8

or x3 1

se for x3 1.00E+30
se for x3 1
for x1 0

for x2 -2

for x3 0
Reason
We have a maximization LP and we know the coeffi
We know from the exercise that ,,The thir
Because the Shadow Price = 1,5 ≠ 0, this is a binding constraint. This means tha
We know from the exercise that ,,The shadow price of the first constrai

We know from the table that C2 constraint is not binding (Left Hand Value=Final Value = -20 differs from the Right
We know from the table that C2 constraint is not
We know from the exercise that optimal value of the objective function is 11 and ,,If the right-hand-side of
It means that if the Right Hand Side of the third constraint (which is 8 now) decreases to

So the Shadow Price


(Original optimal value - New Optimal value of the objective function) / (Original RHS of th
Because the Shadow Price = -5 ≠ 0, this is a binding constraint. This means that
We know from the exercise that "The third
We also know that the third constraint is binding (Left Hand Value = 8 is equals to the Rig

So the Final Value of x1 is 8, because x1 + x2 ≥ 8 -> at the opti

We know from the exercise that "The optimal


We also know from Step 0 that the objective f
We calculated before that in the optimum x1=8 and x2=0

So the final value for


z =1*x1 + 5*x2 + 3*x3. = 11 (in the optimum) -> 1*8 + 5*0 + 3*x3 = 11 (Final

We know from the exercise that ,,The reduced cost of x3 is


Because the Final Value for x1 ≠ 0 in the Variable Ce
We know from the Variable Cells table that the
By definition the reduced cost is: how much the objective function coefficient of the variable

So the reduced cost is -2 for the x2 (because we have to reduced by -2 whic


Because the Final Value for x3 ≠ 0 in the Variable Ce
Fill out the incomplete sensitivity output!

1) This is a maximization problem with all nonnegative variables.


2) The optimal objective function value is 43.
3) The third constraint is 2*x1+3*x2+x3 ≥ 10
4) If the RHS of the first constraint increases by 2, the optimal objective function value increases by 1.6.

Variable Cells
Cell Name Final Value Reduced Cost Objective Coefficient
$B$3 x1 2.5 0 4
$C$3 x2 0 -0.1 2
$D$3 x3 5.5 0 6

Constraints
Cell Name Final Value Shadow Price Constraint R.H. Side
$E$5 1st constraint 38 0.8 38
$E$6 2nd constraint 42 0.3 42
$E$7 3rd constraint 10.5 0 10

Comments for the solution of Variable cells/Constraints

Number of the step Table Description of the cell


1 Variable Cells Final Value for x2
2 Variable Cells Reduced Cost for x1
3 Variable Cells Reduced Cost for x3

4 Variable Cells Objective Coefficient for x3

5 Objective function Objective function


6 Variable Cells Allowable Increase for x2

7 Variable Cells Allowable Decrease for x2

8 Constraints Constraint R.H. Side for 3rd constraint


9 Constraints Final Value for 3rd constraint

10 Constraints Shadow Price for 3rd constraint


11 Constraints Constraint R.H. Side for 1st constraint
12 Constraints Shadow Price for 1st constraint
13 Constraints Final Value for 1st constraint
14 Constraints Allowable Increase for 3rd constraint
15 Constraints Allowable Decrease for 3rd constraint
reases by 1.6.

Allowable Increase Allowable Decrease


0.222222222 2
0.1 1.00E+30
6 0.153846154

Allowable Increase Allowable Decrease


25 27.5
110 2
0.5 1.00E+30

straints

he cell Value
or x2 0
for x1 0
for x3 0

ent for x3 6

ction max z =4x1 + 2x2 + 6x3


se for x2 0.1

se for x2 1.00E+30

3rd constraint 10
constraint 10.5

d constraint 0
1st constraint 42
t constraint 0.8
constraint 38
3rd constraint 0.5
3rd constraint 1.00E+30
Rea
We know from the Variable Cells table that the reduced cost of x2
Because the Final Value for x1 ≠ 0 in the Var
Because the Final Value for x3 ≠ 0 in the Var
We know from the exercises that ,,The optimal objective function value is 43." and w
Then the objective function is z= 4*x1+2*x2 + c3*x3 a
So the coefficient for x3 is: c3
We have a maximization LP and we know th

We know from the Variable Cells table that the


By definition the reduced cost is: how much the objective function coefficient of the v
This means that the Allowable Increase is 0,1 (we ha
Because of the reason above th

We know from the exercise that "The third constraint is 2*x1+3*


We know from the exercise that "The t
So the Final Value of the 3rd constraint is
We know from the Constraints table that the Final Value = Left Hand Side Value = 10,5 and the Right Hand Side Value is 10 for
The Shadow Price is always zero (in the fea
We know from the Constraints table that Shadow Price is 0,3 for the 1st constraint which
We know from the exercise that "If the RHS of the first constraint in
So the Shadow Price for the fi
We know from the Constraints table that Shadow Price is 0,8 for the 1st constraint which

We know from the Constraints table that the 3rd constraint is not binding because the Left Hand Side Value = 10,5 > 10 = R
Because the 3rd constraint is not binding
The production planner who oversees the production of four of King City’s machines needs to determine how many o
Shaper, Hone each require three different common components. Each TopLathe requires 6, each BigPress requires 4,
of the first components are available this month. Each TopLathe requires 4, each BigPress requires 4, each Shaper 8 a
components are available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 and each Ho
are available this month. The sales department requires that the total number of machines produced in a month must b
a Shaper and $15 for a Hone.

A) Formulate a linear programming model to determine how many of each product King City should produce
remain?

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone

Optimal Solution Chaning cells for decision variables

x1 x2 x3 x4 z
Optimal value 5.00 5.00 - - 275.00

Objective function the coefficienst are profit rates

x1 x2 x3 x4 Comment
Coefficient 30 25 35 15 we would like to maximize the profit

Constraints

Description x1 x2 x3 x4 Value of Left Hand Side Relation


1st component 6 4 8 12 50 <=
2nd component 4 4 8 6 40 <=
3rd component 8 2 5 6 50 <=
,,At least 5" 1 1 1 1 10 >=
Sign constraints x1,x2,x3,x4 are nonnegative

by ,,Make Unconstrained Variables Non-ne


Solver window
by ,,Make Unconstrained Variables Non-ne
Solver window
nes needs to determine how many of each to produce this month. The machines, TopLathe, BigPress,
quires 6, each BigPress requires 4, each Shaper 8 and each Hone requires 12 of the first component. Only 50
BigPress requires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40 of the second
quires 2, each Shaper 5 and each Hone requires 6 of the third component. Only 60 of the third components
achines produced in a month must be at least 5. The profit for a TopLathe is $30, $25 for a BigPress, $35 for

roduct King City should produce per month to maximize profit. How many unused components

e would like to maximize the profit

Value of Right Hand Side


Only 50 of the first components are available this month
50
40
60
The sales department requires that the total number of machines produced in a month must be at
5 5

by ,,Make Unconstrained Variables Non-negative" option in


Solver window
by ,,Make Unconstrained Variables Non-negative" option in
Solver window
produced in a month must be at least
The production planner who oversees the production of four of King City’s machines needs to determine how many o
require three different common components. Each TopLathe requires 6, each BigPress requires 4, each Shaper 8 and
available this month. Each TopLathe requires 4, each BigPress requires 4, each Shaper 8 and each Hone requires 6 of
Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 and each Hone requires 6 of the third component.
requires that the total number of machines produced in a month must be at least 5. The profit for a TopLathe is $30, $

B) The ratio of the used first and third components needs to be at most 0,8.
What is the new optimal production plan?

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone

Optimal Solution Chaning cells for decision variables

x1 x2 x3 x4 z
Optimal value 7.20 1.20 - - 246.00

Objective function the coefficienst are profit rates

x1 x2 x3 x4 Comment
Coefficient 30 25 35 15 we would like to maximi

Constraints

Description x1 x2 x3 x4 Value of Left Hand Side Relation


1st component 6 4 8 12 48 <=
2nd component 4 4 8 6 34 <=
3rd component 8 2 5 6 60 <=
,,At least 5" 1 1 1 1 8 >=
Ratio between 1st and 3rd -0.4 2.4 4 7.2 0 <=
Sign constraints x1,x2,x3,x4 are nonnegative

by ,,Make Unconstrained Variables Non-neg


Solver window
by ,,Make Unconstrained Variables Non-neg
Solver window
determine how many of each to produce this month. The machines, TopLathe, BigPress, Shaper, Hone each
s 4, each Shaper 8 and each Hone requires 12 of the first component. Only 50 of the first components are
ach Hone requires 6 of the second component. Only 40 of the second components are available this month.
of the third component. Only 60 of the third components are available this month. The sales department
or a TopLathe is $30, $25 for a BigPress, $35 for a Shaper and $15 for a Hone.

e would like to maximize the profit

Value of Right Hand Side


50
40 Only 50 of the first components are available this month
60
The sales department requires that the total number of machines produced in a month must be at
5 5
0

The ratio of the used first and third components needs to be at most 0,8 which means th
6*x1+4*x2+8*x3+12*x4 <= 0,8 * (8*x1+2*x2+5*x3+6*x4)

After rearrangement we get -0,4*x1 + 2,4*x2 + 4*x3 + 7,2 * x4 <= 0

nstrained Variables Non-negative" option in


w
The ratio of the used first and third components needs to be at most 0,8 which means th
6*x1+4*x2+8*x3+12*x4 <= 0,8 * (8*x1+2*x2+5*x3+6*x4)

After rearrangement we get -0,4*x1 + 2,4*x2 + 4*x3 + 7,2 * x4 <= 0

nstrained Variables Non-negative" option in


w
produced in a month must be at least

o be at most 0,8 which means that


4)

2 * x4 <= 0
o be at most 0,8 which means that
4)

2 * x4 <= 0
The production planner who oversees the production of four of King City’s machines needs to determine how many o
each require three different common components. Each TopLathe requires 6, each BigPress requires 4, each Shaper 8
components are available this month. Each TopLathe requires 4, each BigPress requires 4, each Shaper 8 and each Ho
available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 and each Hone requires 6 of
The sales department requires that the total number of machines produced in a month must be at least 5. The profit fo

C) We have a weekly (1 month = 4 weeks) maintenance cost of machinery to be paid if producing any positive a
produced amount. However, it is not paid if zero is produced of the respective machines. The cost is $8 for Top
optimal production plan?

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone
y1 if x1 > 0 are manufactured then 1 else 0 they are binaries (we
y2 if x2 > 0 are manufactured then 1 else 0
y3 if x3 > 0 are manufactured then 1 else 0
y4 if x4 > 0 are manufactured then 1 else 0

Optimal Solution Chaning cells for decision variables

x1 x2 x3 x4 y1 y2 y3 y4
Optimal value - 10.00 - - - 1 - -

Objective function the coefficient are the fixed costs of the


the coefficienst are profit rates we have weekly costs and we produce

x1 x2 x3 x4 y1 y2 y3 y4
Coefficient 30 25 35 15 - 32 - 8 -12 -4

Constraints

Description x1 x2 x3 x4 y1 y2 y3 y4
1st component 6 4 8 12
2nd component 4 4 8 6
3rd component 8 2 5 6
,,At least 5" 1 1 1 1
Fixed cost for Toplathe 1 -7.5
Fixed cost for BigPress 1 -10
Fixed cost for Shaper 1 -5
Fixed cost for Hone 1 -4.1666666667
Sign constraints 1 x1,x2,x3,x4 are nonnegative
Sign constraints 2 y1,y2,y3,y4 are binaries

M1 must be at least min {50 / 6; 40 /4; 60/8}


(we have 50 units of 1st components, 40 units of 2nd components and 60 units of 3rd components;
and to produce one Toplatehe we need 6 units of 1st component, 4 units of 2nd component and 8 units of 3rd component) in So
o determine how many of each to produce this month. The machines, TopLathe, BigPress, Shaper, Hone
equires 4, each Shaper 8 and each Hone requires 12 of the first component. Only 50 of the first
ch Shaper 8 and each Hone requires 6 of the second component. Only 40 of the second components are
each Hone requires 6 of the third component. Only 60 of the third components are available this month.
e at least 5. The profit for a TopLathe is $30, $25 for a BigPress, $35 for a Shaper and $15 for a Hone.

roducing any positive amount of the different machines. This cost is the same regardless of the
. The cost is $8 for TopLathe, $2 for BigPress, $3 for Shaper and $1 for Hone. What is the new

they are binaries (we will use them for the fixed cost)

z
242.00

nt are the fixed costs of the machines


kly costs and we produce monthly (we have to multiply by 4)

Comment
we would like to maximize the profit

Value of Left Hand Side Relation Value of Right Hand Side


40 <= 50 Only 50 of the first components are available this month
40 <= 40
20 <= 60
10 >= The sales department requires that the total number of machines produc
5
5
The sales department requires that the total number of machines produc
5
- <= 0
- <= 0
- <= 0
- <= 0
- by ,,Make Unconstrained Variables Non-negative" option in
Solver window

component) in Solver there is an option to set the variables to binaries at the drop-down list
e available this month

mber of machines produced in a month must be at least


mber of machines produced in a month must be at least
The production planner who oversees the production of four of King City’s machines needs to determine how many o
each require three different common components. Each TopLathe requires 6, each BigPress requires 4, each Shaper 8
components are available this month. Each TopLathe requires 4, each BigPress requires 4, each Shaper 8 and each Ho
available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 and each Hone requires 6 of
The sales department requires that the total number of machines produced in a month must be at least 5. The profit fo

A) Formulate a linear programming model to determine how many of each product King City should produce

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone
y1 if 1st component is not required then 1 else 0
y2 if 2nd component is not required then 1 else 0
y3 if 3rd component is not required then 1 else 0

Optimal Solution Chaning cells for decision variables

x1 x2 x3 x4 y1 y2 y3
Optimal value - 12.50 - - - 1 -

Objective function the coefficienst are profit rates technical variables and they do no
(also possible solution: not to inclu

x1 x2 x3 x4 y1 y2 y3
Coefficient 30 25 35 15 0 0 0

Constraints

Description x1 x2 x3 x4 y1 y2 y3
1st component 6 4 8 12 -1000
2nd component 4 4 8 6 -1000
3rd component 8 2 5 6 -1000
,,At least 5" 1 1 1 1
Only two are required 1 1 1
Sign constraints 1 x1,x2,x3,x4 are nonnegative
Sign constraints 2 u1,u2,u3,u4 are binaries

by ,,Make Unconstrained Variables Non-n


Solver window
s needs to determine how many of each to produce this month. The machines, TopLathe, BigPress, Shaper, Hone
igPress requires 4, each Shaper 8 and each Hone requires 12 of the first component. Only 50 of the first
ires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40 of the second components are
er 5 and each Hone requires 6 of the third component. Only 60 of the third components are available this month.
h must be at least 5. The profit for a TopLathe is $30, $25 for a BigPress, $35 for a Shaper and $15 for a Hone.

duct King City should produce per month to maximize profit. How many unused components remain?

z
312.50

technical variables and they do not effect the objective function -> all the coefficients are zero
(also possible solution: not to include them in the sumproduct)

Comment
we would like to maximize the profit

Value of Left Hand Side Relation Value of Right Hand Side


50 <= 50
For the 1st component the avaible quanti
- 950 <= 40
25 <= 60 If 1st component is not required (so we h
13 >= If 1st component is required then y1 = 0
5
1 <= 1 The sales department requires that the
5

Only 2 required = Only 1 is not required


The sales department requires that the
5

Only 2 required = Only 1 is not required

y ,,Make Unconstrained Variables Non-negative" option in


olver window
ponent the avaible quantity is 50 + M1*y1 where M1 is a large number

nt is not required (so we have infinty for example) then y1 = 1 and the Right Hand Side is 50 + M1 *1 where M1 is large
nt is required then y1 = 0 and the Right Hand Side is 50 + M1 * 0 = 50
artment requires that the total number of machines produced in a month must be at least

ed = Only 1 is not required (at most)


artment requires that the total number of machines produced in a month must be at least

ed = Only 1 is not required (at most)


M1 is large
The production planner who oversees the production of four of King City’s machines needs to determine how many o
Shaper, Hone each require three different common components. Each TopLathe requires 6, each BigPress requires 4,
of the first components are available this month. Each TopLathe requires 4, each BigPress requires 4, each Shaper 8 a
components are available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 and each Ho
are available this month. The sales department requires that the total number of machines produced in a month must b
a Shaper and $15 for a Hone.

E) It is possible to have more available components from both types. We can get at most 5 more units of the fir
components costs are 3$ per unit in case of the first type and 2$ per unit in case of the second type. It is not pos
production plan?

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone
z1 extra units from 1st component (max 5)
z2 extra units from 2nd component (max 7)

Optimal Solution Chaning cells for decision variables ,,Extra unit for 1st and 2nd co

x1 x2 x3 x4 z1 z2 z
Optimal value 1.50 10.25 - - 0.0 7.0 287.25

Objective function the coefficienst are profit rates cost of extra unit

x1 x2 x3 x4 z1 z2 Comment
Coefficient 30 25 35 15 -3 -2 we would like to m

Constraints

Description x1 x2 x3 x4 z1 z2 Value of Left Hand Side


1st component 6 4 8 12 -1 50
2nd component 4 4 8 6 -1 40
3rd component 8 2 5 6 33
,,At least 5" 1 1 1 1 12
Max 5 1st component 1 -
Max 7 1st component 1 7
Sign constraints 1 x1,x2,x3,x4 are nonnegative
by ,,Make Unconstrained Variables Non-negat
Solver window
Sign constraints 2 z1,z2 are nonnegative by ,,Make Unconstrained Variables Non-negat
Solver window
eds to determine how many of each to produce this month. The machines, TopLathe, BigPress,
6, each BigPress requires 4, each Shaper 8 and each Hone requires 12 of the first component. Only 50
s requires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40 of the second
2, each Shaper 5 and each Hone requires 6 of the third component. Only 60 of the third components
produced in a month must be at least 5. The profit for a TopLathe is $30, $25 for a BigPress, $35 for

most 5 more units of the first and at most 7 more of the second component. The extra
he second type. It is not possible to get more of the third component. What is the new optimal

Extra units
Component Price Maximal quantity
1st 3 5
2nd 2 7

,,Extra unit for 1st and 2nd component" decision variables

st of extra unit

we would like to maximize the profit

Relation Value of Right Hand Side


We have only 50 of the first components and we can use extra 5 units at 3 dollar
<= 50 per unit price level
<= 40
<= 60
>= The sales department requires that the total number of machines produced in a mo
5 5
<= 5
<= 7 We can get at most 5 more units of the first and

Unconstrained Variables Non-negative" option in


ndow
Unconstrained Variables Non-negative" option in
ndow
se extra 5 units at 3 dollar

of machines produced in a month must be at least


The production planner who oversees the production of four of King City’s machines needs to determine how many o
Shaper, Hone each require three different common components. Each TopLathe requires 6, each BigPress requires 4,
Only 50 of the first components are available this month. Each TopLathe requires 4, each BigPress requires 4, each S
of the second components are available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper
third components are available this month. The sales department requires that the total number of machines produced
for a BigPress, $35 for a Shaper and $15 for a Hone.

F) How does the solution differ in question e, if the delivery of the extra components needs to be in entirety? Th
units should be taken into consideration, thus if any amount is delivered, then the whole package needs to be b

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone
y1 if we use at least 1 extra 1st component then 1 else 0
y2 if we use at least 1 extra 2st component then 1 else 0

Optimal Solution Chaning cells for decision variables ,,Extra unit for 1st and 2nd com

x1 x2 x3 x4 y1 y2 z
Optimal value 1.50 10.25 - - 0.0 1.0 287.25
if we use
Objective function the coefficienst are profit rates
For y1 =
x1 x2 x3 x4 y1 y2 Comment
Coefficient 30 25 35 15 -15 -14 we would like to maxim

Constraints the whole package contains 5 units for the 1st comp

Description x1 x2 x3 x4 y1 y2 Value of Left Hand Side Relation


1st component 6 4 8 12 -5 50 <=
2nd component 4 4 8 6 -7 40 <=
3rd component 8 2 5 6 33 <=
,,At least 5" 1 1 1 1 12 >=
Sign constraints 1 x1,x2,x3,x4 are nonnegative
Sign constraints 2 y1,y2 are binaries by ,,Make Unconstrained Variables Non-negat
Solver window
determine how many of each to produce this month. The machines, TopLathe, BigPress,
h BigPress requires 4, each Shaper 8 and each Hone requires 12 of the first component.
ress requires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40
equires 2, each Shaper 5 and each Hone requires 6 of the third component. Only 60 of the
of machines produced in a month must be at least 5. The profit for a TopLathe is $30, $25

s to be in entirety? This means that if more components will be available, all extra
package needs to be bought (still separately for the two products though).

Extra units
Component Price Maximal quantity
1st 3 5
2nd 2 7

a unit for 1st and 2nd component" decision variables

if we use at least 1 additional unit then we have to pay for the whole package

For y1 = 1 case: 3 is the cost per unit and the package contains 5 -> 3*5=15

we would like to maximize the profit

s 5 units for the 1st component

Value of Right Hand Side


We have only 50 of the first components and we can use extra 5 units at 3 dollar
50 per unit price level
40
60
The sales department requires that the total number of machines produced in a month m
5 5

rained Variables Non-negative" option in


a 5 units at 3 dollar

hines produced in a month must be at least


The production planner who oversees the production of four of King City’s machines needs to determine how many o
Shaper, Hone each require three different common components. Each TopLathe requires 6, each BigPress requires 4,
Only 50 of the first components are available this month. Each TopLathe requires 4, each BigPress requires 4, each S
of the second components are available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper
third components are available this month. The sales department requires that the total number of machines produced
for a BigPress, $35 for a Shaper and $15 for a Hone.

G) What if in question f the extra amounts are 80 and 100 instead?

Decision variables

x1 number of Toplathe
x2 number of BigPress
x3 number of Shaper
x4 number of Hone
y1 if we use at least 1 extra 1st component then 1 else 0
y2 if we use at least 1 extra 2st component then 1 else 0

Optimal Solution Chaning cells for decision variables ,,Extra unit for 1st and 2nd com

x1 x2 x3 x4 y1 y2 z
Optimal value - 30.00 - - 1.0 1.0 310.00

Objective function the coefficienst are profit rates if we use at leas

For y1 = 1 case:
x1 x2 x3 x4 y1 y2 Comment
Coefficient 30 25 35 15 -240 -200 we would like to maxi

Constraints
the whole package contains 80 units for the 1st com

Description x1 x2 x3 x4 y1 y2 Value of Left Hand Side


1st component 6 4 8 12 -80 40
2nd component 4 4 8 6 -100 20
3rd component 8 2 5 6 60
,,At least 5" 1 1 1 1 30
Sign constraints 1 x1,x2,x3,x4 are nonnegative
Sign constraints 2 y1,y2 are binaries by ,,Make Unconstrained Variables Non-negat
Solver window
needs to determine how many of each to produce this month. The machines, TopLathe, BigPress,
res 6, each BigPress requires 4, each Shaper 8 and each Hone requires 12 of the first component.
ach BigPress requires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40
igPress requires 2, each Shaper 5 and each Hone requires 6 of the third component. Only 60 of the
l number of machines produced in a month must be at least 5. The profit for a TopLathe is $30, $25

Extra units
Component Price Maximal quantity
1st 3 80
2nd 2 100

,,Extra unit for 1st and 2nd component" decision variables

if we use at least 1 additional unit then we have to pay for the whole package

For y1 = 1 case: 3 is the cost per unit and the package contains 80 -> 3*80=240

we would like to maximize the profit

e contains 80 units for the 1st componens

Relation Value of Right Hand Side


We have only 50 of the first components and we can use extra 5 units at 3 dolla
<= 50 per unit price level
<= 40
<= 60
>= The sales department requires that the total number of machines produced in a
5 5

ake Unconstrained Variables Non-negative" option in


window
n use extra 5 units at 3 dollar

er of machines produced in a month must be at least


The production planner who oversees the production of four of King City’s machines needs to determine how man
Shaper, Hone each require three different common components. Each TopLathe requires 6, each BigPress requires
50 of the first components are available this month. Each TopLathe requires 4, each BigPress requires 4, each Sha
second components are available this month. Each TopLathe requires 8, each BigPress requires 2, each Shaper 5 a
components are available this month. The sales department requires that the total number of machines produced in
BigPress, $35 for a Shaper and $15 for a Hone.

H) We know that the unit profit increases if more units are produced. After the first 3, 4, 2 and 2 units resp
What is the new optimal production plan?

Decision variables

x1 number of Toplathe with 30 profit rate


x2 number of BigPress with 25 profit rate
x3 number of Shaper 35 porift rate
x4 number of Hone 15 profit rate
y1 number of Toplathe with 31 profit rate
y2 number of BigPress with 27 profit rate
y3 number of Shaper 50 porift rate
y4 number of Hone 60 profit rate
u1 if x1 >= 3 then 1 else 0
u2 if x2 >= 4 then 1 else 0
u3 if x3 >= 2 then 1 else 0
u4 if x4 >= 2 then 1 else 0

Optimal Solution Chaning cells for decision variables

x1 x2 x3 x4 y1 y2
Optimal value 3 4 0 - 2 1

Objective function

x1 x2 x3 x4 y1 y2
Coefficient 30 25 35 15 31 27

Constraints

Description x1 x2 x3 x4 y1 y2
1st component 6 4 8 12 6 4
2nd component 4 4 8 6 4 4
3rd component 8 2 5 6 8 2
,,At least 5" 1 1 1 1 1 1
-1
After 3 Toplathe the profit rate will be 31 1
1
-1
After 4 BigPress the profit rate will be 27 1
1
-1
After 2 Shaper the profit will be 50 1

-1
After 2 Hone the profit will be 60 1

Sign constraints 1 x1,x2,x3,x4 are nonnegative


Sign constraints 2 y1,y2,y3,y4 are nonnegative
Sign constraints 3 u1,u2,u3,u4 are binaries
needs to determine how many of each to produce this month. The machines, TopLathe, BigPress,
res 6, each BigPress requires 4, each Shaper 8 and each Hone requires 12 of the first component. Only
igPress requires 4, each Shaper 8 and each Hone requires 6 of the second component. Only 40 of the
s requires 2, each Shaper 5 and each Hone requires 6 of the third component. Only 60 of the third
ber of machines produced in a month must be at least 5. The profit for a TopLathe is $30, $25 for a

irst 3, 4, 2 and 2 units respectively, the unit profit increases to 31$, 27$, 50$ and 60$, respectively.

decision variables with ,,original profit rates"


profit rate
profit rate
ft rate
t rate
decision variables with ,,new profit rates" (after we reach a given number in production)
profit rate
profit rate
ft rate
t rate
binary decision variables
0
0
0
0

ecision variables

y3 y4 u1 u2 u3 u4 z
- 0 1 1 - - 279

technical variables and they do not effect the objective function -> all the
(also possible solution: not to include them in the sumproduct)

y3 y4 u1 u2 u3 u4 Comment
50 60 0 0 0 0 we would like to maximize the pr

y3 y4 u1 u2 u3 u4 Value of Left Hand Side Relation


8 12 50 <=
8 6 40 <=
5 6 50 <=
1 1 10 >=
3 - <=
3 <=
-7.5 - 6 <=
4 - <=
4 <=
-10 - 9 <=
2 - 0 <=
0 <=
1 -5 - <=
2 - <=
- <=
1 -4.1666666667 0 <=

by ,,Make Unconstrained Variables Non-negative" option in


e binaries Solver window
M1 must
(we have 5
and to pro
production)

ect the objective function -> all the coefficients are zero
hem in the sumproduct)

e would like to maximize the profit

Value of Right Hand Side Only 50 of the first components are available this month
50
40 The sales department requires that the total number of machines produced in a month mu
60 5
The sales department requires that the total number of machines produced in a month mu
5
5
0 x1: number of Toplathe with 30 profit rate (the first 3 quantities)
3 y1: number of Toplathe with 31 profit rate (from the 4th and so on)
0 (1A): y1 >0 if and only if x1>=3
(2A): x1 <= 3 (because only the first 3 quantities belong to x1)
0 (3A): y1 <= M1 (M1 is the technically produceable upper limit)
4
To handle these two cases we use u1 binary decision variable (by definition u1 = 1 if x1 >=
0
(1B) x1 >= 3*u1
0 (2B) x1 <= 3
2 (2B) y1 <= M1*u1

0 And because all the decision variables have to be on the Left Hand Side for the Solver, we rear
0 (1B) -> 3*u1 - x1 <= 0
(2B) -> x1 <=3
2
(3B) -> y1 - M1*u1 <= 0
0
We know that M1 must be at least min {50 / 6; 40 /4; 60/8}

M1 must be at least min {50 / 6; 40 /4; 60/8}


(we have 50 units of 1st components, 40 units of 2nd components and 60 units of 3rd components;
and to produce one Toplatehe we need 6 units of 1st component, 4 units of 2nd component and 8 units of 3rd component)
nes produced in a month must be at least
nes produced in a month must be at least

antities)
and so on)
to x1)
r limit)

(by definition u1 = 1 if x1 >= 3), so

Hand Side for the Solver, we rearrange them

60/8}

mponents;
t and 8 units of 3rd component)

You might also like