You are on page 1of 13

Production Examples

On each example worksheet, read the comments at the bottom of the sheet, then
click Tools Solver... to examine the decision variables, constraints, and objective.
To find the optimal solution, click the Solve button.
One of the areas where linear and non-linear programming is applied most frequently is
in manufacturing and production. There are many different ways in which the Solver can
be used to increase productivity, lower cost, reduce waste, etc. We will limit ourselves to
5 different types of models.
First, in the ProductMix worksheet we examine a production mix model. Here we see how
to use parts to build different products and maximize profit.
Second, we look at a machine allocation problem, in two different versions (Alloc1 and
Alloc2). This model determines which machines to use to produce products, in order to
meet a certain demand and minimize cost.
Third, in worksheets Blend1 and Blend2, we look at a 'continuous' rather than 'discrete'
production problem, where the end product requires certain qualities and is a mixture
of previously produced products. This kind of blending problem is very common in
the oil industry and in agriculture, for example.
Fourth, worksheet Process is a process selection problem, where we have several
different ways of producing something (planed wood in this example) and we want to
pick the process that minimizes cost (or maximizes profit).
Finally, in worksheet Cutstock we look at a classic example of a cutting stock problem.
In this model we determine how to cut steel sheets so as to minimize the waste of steel.

335793316.xlsx

Product mix problem.


Your company manufactures TVs, stereos and speakers, using a common parts inventory
of power supplies, speaker cones, etc. Parts are in limited supply and you must determine
the most profitable mix of products to build.

Part Name
Chassis
Picture Tube
Speaker Cone
Power Supply
Electronics

Number to Build->
Inventory
No. Used
450
0
250
0
800
0
450
0
600
0

TV set
0

Stereo
0

Speaker
0

1
1
2
1
2

1
0
2
1
1

0
0
1
0
1

Profits:
By Product
Total

$0
$0

$0

$0

Problem
Your company builds TVs, stereos and speakers, using a common parts inventory of power supplies,
speaker cones, etc. Parts are in limited supply. What is the best combination of products to build
that maximizes profit?
Solution
1) The variables are clearly the number of TVs, stereos and speakers to build. In this worksheet, they
are given the name Number_to_build.
2) The constraints specify that the number of parts used cannot exceed the supply. This leads to
Number_used <= Number_available
There is also the logical constraint
Number_to_build >= 0 via the Assume Non-Negative option
3) The objective is to maximize profit. In the ProductMix worksheet this is defined as Total_profit.
Remarks
Although this is a good example of a product mix problem, bear in mind the limitations of the
model. For example, market demand and price elasticity is not included in the model -- we assume
that it doesn't matter how many TVs we build, we will always be able to sell them. Nor are there any
pre-specified minimum or maximum of products that need to be made. The effect of introducing
these restrictions can be studied by examining a Sensitivity Report, which you can select from the
dialog appears with the message 'Solver found a solution.'

Page 3

335793316.xlsx

Allocation Problem 1 (Single-Period)


Minimize the cost of operating 3 different types of machines while meeting product demand.
Each machine has a different cost and capacity. There are a certain number of machines
available for each type.
Information on machines
Additional
Initial cost per cost per
day
product

$200
$275
$325

Alpha-1000
Alpha-2000
Alpha-3000

$1.50
$1.80
$1.90

Products per Number of


day (Max)
machines

40
60
85

8
5
3

Number of machines to use

1
1
1

Alpha-1000
Alpha-2000
Alpha-3000

Number of products to make per day

300
300
300
900
750

Alpha-1000
Alpha-2000
Alpha-3000
Total
Demand

Maximum number of products that can be made per day

40
60
85

Alpha-1000
Alpha-2000
Alpha-3000
Cost

$2,360.00

Problem
A company has three different types of machines that all make the same product. Each
machine has a different capacity, start-up cost and cost per product. How should the company
produce its product with the available machines to meet the daily demand?
Solution
1) The variables are the number of machines to use and the number of products to make on
each machine. In worksheet Alloc1, these are given the names Products_made and
Machines_used.
2) First, there are the logical constraints. These are
Products_made >= 0 via the Assume Non-Negative option
Machines_used >= 0 via the Assume Non-Negative option
Machines_used = integer.
Second, there are the demand and capacity constraints. These are:
Machines_used <= Machines_available
Products_made <= Maximum_products
Total_made >= Demand
3) The objective is to minimize cost. This is defined on the worksheet as Total_cost.

Page 4

335793316.xlsx

Remarks
Notice that we used an integer constraint to make sure no fractions of machines were used.
This has the usual drawback; the problem is much more difficult to solve than the 'relaxed'
version without the integer constraint. When large numbers of machines are involved, the
integer constraint can often be dropped. It is most often not critical whether 1586 or 1587
machines are used, for example. This means that a number of 1586.4 would be acceptable.
However, in this case there are only a few machines and it does make a big difference whether
2 or 3 machines are used. An answer of 2.5 would not be satisfactory.

Page 5

335793316.xlsx

Allocation Problem 2 (Multi-period)


Minimize the cost of operating 3 different types of machines while meeting product demand over a
week's time. Each machine has a different cost and capacity. There are a certain number of machines
available for each type.
Information on machines
Initial cost per Additional cost Products per
day
per product
day (Max)
Alpha-1000
Alpha-2000
Alpha-3000

$200
$275
$325

Number of
machines

$1.00
$1.80
$1.90

40
60
85

8
5
3

Monday

Tuesday

Wednesday

Thursday

Friday

0
0
0

0
0
0

0
0
0

0
0
0

0
0
0

Number of machines to use


Alpha-1000
Alpha-2000
Alpha-3000

Number of products to make per day


Alpha-1000
Alpha-2000
Alpha-3000
Made
Carry-over
Total
Demand

Monday

Tuesday

Wednesday

Thursday

Friday

0
0
0
0
0
0
600

0
0
0
0
-600
-600
800

0
0
0
0
-1400
-1400
1000

0
0
0
0
-2400
-2400
725

0
0
0
0
-3125
-3125
750

Maximum number of products that can be made


Alpha-1000
Alpha-2000
Alpha-3000

Monday

Tuesday

Wednesday

Thursday

Friday

0
0
0

0
0
0

0
0
0

0
0
0

0
0
0

$0.00

$0.00

$0.00

$0.00

$0.00

Total
Cost

$0.00

Problem
A company has three different types of machines that all make the same product. Each machine has
a different capacity, start-up cost and cost per product. How should the company produce its
product with the available machines to meet the demand over a week's time?
Solution
The solution is very similar in structure to the one found on worksheet Alloc1.
1) The variables are the number of machines to use and the number of products to make on each
machine. In worksheet Alloc2, these given the names Products_made and Machines_used.
2) First, there are the logical constraints. These are
Products_made >= 0 via the Assume Non-Negative option
Machines_used >= 0 via the Assume Non-Negative option
Machines_used = integer.

Page 6

335793316.xlsx

Second, there are the demand and capacity constraints. These are:
Alpha1000s_used <= Alpha1000s_available
Alpha2000s_used <= Alpha2000s_available
Alpha3000s_used <= Alpha3000s_available
Products_made <= Maximum_products
Total_made >= Demand
3) The objective is to minimize cost. This is defined on the worksheet as Total_cost..
Remarks
Please see the comments on integer constraints in worksheet Alloc1. In this model we allow for
products made on one day to be carried over to the next. This makes it possible to meet a demand
for one day that exceeds the capacity of the machines on that particular day.

Page 7

335793316.xlsx

Blending Problem 1 (Single-period)


What rock quarries should be used and how much should they produce to meet a certain
quality of limestone (calcium and magnesium content) and minimize cost? There are 4 quarries with
different qualities, capacity and cost to operate. A minimum output of 6000 tons per year is required.
Information on rock quarries
Calcium
contents
(relative to
required
quality)
Quarry 1
Quarry 2
Quarry 3
Quarry 4

1
0.7
1.5
0.7

Magnesium
contents
(relative to
required
quality)

Maximum
production
per year
(tons)

2.3
1.6
1.2
4.1

2000
2500
1300
3000

Amounts to produce (tons).


Quarry 1
Quarry 2
Quarry 3
Quarry 4
Totals
Required

Cost to keep
quarry open Quarry in
per year
use (1=yes,
($Million)
0=no)

3.5
4
4
2

1
1
1
1

Avail Prod

0.00
0.00
0.00
0.00
0
6000

2000
2500
1300
3000

Calcium restrictions
Total Amount of
Calcium

Total Amount
Required

Calcium Required
per Ton

0.9

Magnesium restrictions
Total Amount of
Magnesium

Total Amount
Required

Magnesium
Required per Ton
Cost

2.3
$14

Million

Problem
A company owns four rock quarries from which it can extract limestone with different qualities. Two
qualities are important, the relative amount of calcium and magnesium in the stone. The company
must produce a certain total amount of limestone (6000 tons in this case), and this stone must contain
at least a certain amount of calcium per ton and a certain amount of magnesium per ton. There is a
large fixed cost to keep a quarry operating for extraction purposes each year. Which quarries should
be used to meet the production requirement, and how much limestone should each one produce?
Solution
1) The variables are 0-1 or binary integer variables which determine whether each quarry is open,

Page 8

335793316.xlsx

and amounts of limestone to be extracted from each quarry. In worksheet Blend1 these are given
the names Quarry_use and Amounts_to_produce.
2) First, there are the logical constraints. These are
Amounts_to_produce >= 0 via the Assume Non-Negative option
Quarry_use = binary
Second, there are constraints on the total production and the amount that can be produced at each
quarry. These constraints are:
Total_produced >= Total_required
Amounts_to_produce <= Avail_Production
The right hand side of the second constraint depends on the binary integer variables.
Third, there are constraints on the qualities (calcium and magnesium content) of the limestone:
Calcium_produced >= Calcium_required
Magnesium_produced >= Magnesium_required
Both the left-hand and right-hand sides of these constraints depend on the Amounts_to_produce
decision variables.
3) The objective is to minimize the cost of operating the quarries. This is defined on the worksheet as
Total_cost.
Remarks
Blending problems are characterized by 'ratio constraints' where the constraint is often thought of as
a quality ratio where the numerator and denominator contain decision variables. These would be
nonlinear, but the ratios can be expressed as linear constraints by multiplying both sides by the
denominator of the ratio.

Page 9

335793316.xlsx

Blending Problem 2 (Multi-period)


What rock quarries should be used and how much should they produce to meet a certain
quality of limestone (calcium and magnesium content) and minimize cost? There are 4 quarries with
different qualities, capacity and cost to operate. A different output and quality is required each year.
Due to environmental restrictions, only 3 quarries are allowed to be open each year.
Information on rock quarries
Calcium
contents
(relative to
required
quality)

Magnesium
contents
(relative to
required
quality)

1
0.7
1.5
0.7

Quarry 1
Quarry 2
Quarry 3
Quarry 4

Maximum Cost to keep


production quarry open
per year
per year
(tons)
($Million)

2.3
1.6
1.2
4.1

2000
2500
1300
3000

3.5
4
4
2

Year 2
0
0
0
0
0

Year 3
0
0
0
0
0

Year 4
0
0
0
0
0

Year 5
0
0
0
0
0

Year 2
0
0
0
0
0
3100

Year 3
0
0
0
0
0
3500

Year 4
0
0
0
0
0
3700

Year 5
0
0
0
0
0
4000

Quarries to be used (1=yes, 0=no)


Quarry 1
Quarry 2
Quarry 3
Quarry 4
Total

Year 1
0
0
0
0
0

Amounts to produce (tons).


Quarry 1
Quarry 2
Quarry 3
Quarry 4
Total
Required

Year 1
0
0
0
0
0
4500

Amounts that can be produced (tons)

Year 1
0
0
0
0

Year 2
0
0
0
0

Year 3
0
0
0
0

Year 4
0
0
0
0

Year 5
0
0
0
0

Year 1

Year 2

Year 3

Year 4

Year 5

Total Amount of
Calcium

Total Amount
Required

0.9

1.2

1.1

0.8

Year 1

Year 2

Year 3

Year 4

Year 5

Quarry 1
Quarry 2
Quarry 3
Quarry 4
Calcium restrictions

Calcium Required per


Ton (Minimum)
Magnesium restrictions

Page 10

335793316.xlsx

Total Amount of
Magnesium

Total Amount
Required

1.9

1.7

2.8

1.9

2.1

Year 1
$0.00

Year 2
$0.00

Year 3
$0.00

Year 4
$0.00

Year 5
$0.00

Magnesium Required
per Ton (Minimum)
Cost

Total
$0.00

Problem
A company owns four rock quarries from which it can extract limestone with different qualities. Two
qualities are important, the relative amount of calcium and magnesium in the stone. The company
must produce a certain total amount of limestone, with certain qualities, each year. There is a large
fixed cost to keep a quarry operating for extraction purposes each year. Which quarries should be
used each year, and how much limestone should each one produce each year?
Solution
The solution is very similar in structure to the one found in worksheet Blend1.
1) The variables are 0-1 or binary integer variables which determine whether each quarry is open,
and amounts of limestone to be extracted from each quarry. These variables occur in each year.
In worksheet Blend2, these variables the names Quarry_decisions and Amounts_produced.
2) First, there are the logical constraints. These are
Amounts_produced >= 0 via the Assume Non-Negative option
Quarry_decisions = binary
Second, there are contraints on the total production and the amount that can be produced at each
quarry. These constraints are:
Total_produced >= Total_required
Amounts_produced <= Maximum_Production
The right hand side of the second constraint depends on the binary integer variables.
Third, there are constraints on the quality (calcium and magnesium content) of the limestone:
Calcium_production >= Calcium_requirement
Magnesium_production >= Magnesium_requirement
Both the left-hand and right-hand sides of these constraints depend on the Amounts_produced
decision variables.
Fourth, there is a constraint that limits the number of quarries that can be open each year:
Number_of_open_quarries <= 3
3) The objective is to minimize the cost of operating the quarries. This is defined on the worksheet as
Total_cost.
Remarks
See the comments on worksheet Blend1 about the characteristics of blending problems, which also
apply here.

Page 11

335793316.xlsx

Process Selection
A planing mill uses 3 different types of planers. What planers should the company use
to minimize cost? The total job has to be finished in

hours.

Characteristics of planers

Planer 1
Planer 2
Planer 3

Speed
(ft/min)

Cost
($/hour)

Maximum
wood
thickness
(inches)

5
7
8

$150
$190
$225

6
4
2

Wood to be planed (ft)


1"
2"
0
0
Planer 1
0
0
Planer 2
0
0
Planer 3
0
0
Total
500
800
Demand

3"
0
0

5"
0

0
600

0
300

Hours

0.00
0.00
0.00

Cost

$0.00
$0.00
$0.00
$0.00

Problem
A planing mill has three different planers. Each planer has a different speed, cost to operate and
maximum thickness of wood it can handle. What planers should the mill use to minimize cost, given
an amount of wood and no more than 3 hours to do the job?
Solution
The solution is structurally very similar to the one found on worksheet Alloc1.
1) The variables are the amounts of wood that go through the different planers. In worksheet
Process, these are given the names Wood_through_planer1, Wood_through_planer2 and
Wood_through_planer3.
2) The logical constraints are all defined via the Assume Non-Negative option:
Wood_through_planer1 >= 0
Wood_through_planer2 >= 0
Wood_through_planer3 >= 0
The time and demand constraints give
Total_hours <= Hours_available
Total_planed >= Demand
3) The objective is to minimize cost and this is defined on the worksheet as Total_cost.
Remarks
This is only a small example of a process selection. An example where process selection is very
important is the oil industry. A process selection model is often used to decide what method to use
to create a product.

Page 12

335793316.xlsx

Cutting Stock
A steel mill produces sheets of steel in 3 sizes. These sizes are 100, 80 and 55 inches. Unfortunately,
demand is in 3 other sizes; 45,30 and 18 inches.How should the mill cut the sheets to minimize waste?

Possible combinations
45" sheet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

100" sheet

80" sheet

55" sheet

Totals
Demand

30" sheet

18" sheet

2
1
1
0
0
0
0
1
1
0
0
0
1
0
0

0
1
0
3
2
1
0
1
0
2
1
0
0
1
0

0
1
3
0
2
3
5
0
1
1
2
4
0
1
3

7
150

12
200

26
175

Waste
(inches)

Number of
sheets

Total
Waste

10
7
1
10
4
16
10
5
17
2
14
8
10
7
1

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

10
7
1
10
4
16
10
5
17
2
14
8
10
7
1
Total

122

Problem
A steel mill produces sheets of steel in three different sizes. Demand, however, is in 3 other, smaller, sizes.
How should the company cut the sheets of steel in order to minimize waste?
Solution
1) There are only a limited number of ways to cut the sheets. The variables are the number of times we have
to cut a sheet in a certain way. In worksheet Cutstock these are defined as Sheets_used.
2) The constraints are simple and straightforward.
Sheets_made = Demand
Sheets_used >= 0 via the Assume Non-Negative option
Sheets_used = integer
3) The objective is to minimize waste. This is defined on the worksheet as Total_waste.
Remarks
In some situations it may seem rather difficult to write out all the possibilities for cutting stock as is done in
this model. There is a technique that lets the computer do this, called column generation. It is beyond the
scope of this example to fully discuss this technique.

Page 13