0% found this document useful (0 votes)
91 views

Overview of Optimization Models: Handout #2

This document outlines key concepts in optimization modeling. It discusses the components of optimization models, including decision variables, objective functions, and constraints. It also describes different types of optimization models, such as linear vs. nonlinear, static vs. dynamic, deterministic vs. stochastic, and integer vs. non-integer models. Finally, it provides a seven-step procedure for building optimization models to help organizations make better decisions.

Uploaded by

Hussain Salman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

Overview of Optimization Models: Handout #2

This document outlines key concepts in optimization modeling. It discusses the components of optimization models, including decision variables, objective functions, and constraints. It also describes different types of optimization models, such as linear vs. nonlinear, static vs. dynamic, deterministic vs. stochastic, and integer vs. non-integer models. Finally, it provides a seven-step procedure for building optimization models to help organizations make better decisions.

Uploaded by

Hussain Salman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Outline of the Handout

EE 477: Optimization Techniques


1. Overview of Optimization Models
Handout #2
2. Examples of Optimization Models
Modeling of Optimization
Problems

Prof. Mohamed Zribi


Updated 24 Sept. 2017
EE 477 Dr. Mohamed Zribi
1 2

Mathematical Models

The scientific approach to decision making requires the

1. Overview of use of one or more mathematical models.

Optimization Models A mathematical model is a mathematical representation


of the actual situation that may be used to make better
decisions or clarify the situation.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


3 4
Prescriptive or Optimization Models Static and Dynamic Models
Prescriptive models “prescribes” behavior for an organization A static model is one in which the decision variables
that will enables it to best meet its goals. Components of this do not involve sequences of decisions over
model include: decision variables, objective function,
multiple periods. A dynamic model is a model in
which the decision variables do involve sequences
constraints of decisions over multiple periods.
An optimization model seeks to find values of the decision In a static model, we solve a one shot problem whose
variables that optimize (maximize or minimize) an objective solutions are prescribe optimal values of the
decision variables at all points in time. While a
function among the set of all values for the decision variables
dynamic model, decisions must be made over
that satisfy the given constraints. multiple periods and thus posses a dynamic model.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


5 6

Linear and Nonlinear Models Integer and Non-integer Models


If one or more of the decision variables must be integer, then we
Suppose that when ever decision variables appear in the say that an optimization model is an integer model. If all the
objective function and in the constraints of an decision variables are free to assume fractional values, then an
optimization model is a noninteger model.
optimization model the decision variables are always
multiplied by constants and then added together.
If decision variables in a model represent the number of workers
Such a model is a linear model. Otherwise the model
starting during each shift, then clearly we have a integer
is nonlinear model. In general, nonlinear models are model.
much harder to solve. Integer models are much harder to solve then non-integer models.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
7 8
Deterministic and Stochastic Models Types of Optimization Problems

• Linear: Linear functions for objective and constraints


Suppose that for any value of the decision variables • Nonlinear: Nonlinear functions…
the value of the objective function and whether or • Convex
• Integer
not the constraints are satisfied is known with
• Mixed-Integer
certainty. We then have a deterministic model. • Combinatorial
If this is not the case, then we have a stochastic • Unconstrained: No constraints
model. • Dynamic: Solved in stages

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


9 10

Representation of Optimization Models


Seven-step model building procedure
• Variables: x ( x1 , x2 ,..., xn )
1. Formulate the Problem
• Objective: min or max f ( x)
ci ( x) 0, i • Define the problem.
• Subject to Constraints:
ci ( x) 0, i • Specify the objectives.
• Sometimes additional
constraints: • Determine parts of the organization to be studied.
– Non-negative 2. Observe the System
– Integer
– Binary • Determines parameters affecting the problem.
• Sometimes uncertainty in parameters (stochastic
optimization) • Collect data to estimate values of the parameters.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
11 12
3. Formulate a Mathematical Model of the
Problem 5. Select a Suitable Alternative
Given a model and a set of alternative solutions,
4. Verify the Model and Use the Model for determine which solution best meets the
Prediction
organizations objectives.
• Does the model yield results for values of decision
variables not used to develop the model?

• What eventualities might cause the model to become


invalid?

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


13 14

6. Present the Results and Conclusion (s) of the Study


to the Organization 7. Implement and Evaluate Recommendations
Upon acceptance of the study by the organization, the analyst:
• Present the results to the decision maker (s)
• Assists in implementing the recommendations.
• If necessary, prepare several alternative solutions and
permit the organization to chose the one that best meets their • Monitors and dynamically updates the system as the
needs. environment and parameters change to ensure that
recommendations enable the organization to meet its
• Any non-approval of the study’s recommendations may
goals.
have stemmed from an incorrect problem definition or failure
to involve the decision maker(s) from the start of the project.
In such a case, return to step 1, 2, or 3.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
15 16
Example 1: Flair Furniture Co.

Two products: Chairs and Tables

2. Examples of Decision: How many of each to make this month?

Optimization Models Objective: Maximize profit

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


17 18

Data: Decision Variables:


Tables Chairs T = Num. of tables to make
(per table) (per chair)
C = Num. of chairs to make
Profit Hours
7 KD 5 KD
Contribution Available
Carpentry 3 hrs 4 hrs 2400 Objective Function: Maximize Profit
Painting 2 hrs 1 hr 1000 Maximize Z=7 T + 5 C
Other Limitations:
• Make no more than 450 chairs
• Make at least 100 tables

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


19 20
Constraints: More Constraints:
• Make no more than 450 chairs
• Have 2400 hours of carpentry time available C < 450 (num. chairs)
3 T + 4 C < 2400 (hours) • Make at least 100 tables
T > 100 (num. tables)

• Have 1000 hours of painting time available Nonnegativity:


Cannot make a negative number of chairs or tables
2 T + 1 C < 1000 (hours)
T>0
C>0

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


21 22

Model Summary: Example 2:


Max 7T + 5C (profit) Bottled water and medical supplies are to be shipped to
Subject to: victims of an earth-quake by plane. Each container of
3T + 4C < 2400 (carpentry hrs) bottled water will serve 10 people and each medical kit
2T + 1C < 1000 (painting hrs) will aid 6 people. If x represents the number of bottles
C < 450 (max # chairs) of water to be shipped and y represents the number of
T > 100 (min # tables) medical kits, write the objective function that describes
T, C > 0 (nonnegativity) the number of people that can be helped.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


23 24
Solution: Each plane can carry no more than 80,000 Kg. The bottled
water weighs 20 Kg per container and each medical kit
Because each bottle of water serves 10 people and each weighs 10 Kg.
If x represents the number of bottles of water to be shipped
medical kit aids 6 people, we have and y represents the number of medical kits, write an
inequality that describes this constraint .
The number of
People helped is
10 times the number
of bottles of water plus
6 times the number
of medical kits. Solution: Because each plane can carry no more than 80,000
Kg,
= 10x + 6y.
The total weight of The total weight of must be less than 80,000 Kg
the water bottles plus the medical kits or equal to
Using z to represent the objective function, we have
z = 10x + 6y. 20x + 10y < 80,000.
The objective function is an equation in three variables. For a Each bottle is Each kit is
20 Kg. 10 Kg
value of x and a value of y, there is one and only one value of z.
The plane's volume constraint is described by the inequality 20x + 10y < 80,000.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


25 26

Planes can carry a total volume for supplies that does not exceed
6000 cubic feet. Each water bottle is 1 cubic foot and each medical Summary of the model:
kit also has a volume of 1 cubic foot. With x still representing the
number of water bottles and y the number of medical kits, write an
inequality that describes this constraint. Max z =10x+ 6y
Subject to: 20x+ 10y ≤ 80000
Solution: Because each plane can carry a volume of supplies
that does not exceed 6000 cubic feet, we have x+ y ≤ 6000
The total volume of The total volume of must be less than 6000 x ≥ 0 and y ≥ 0
the water bottles plus the medical kits or equal to cubic feet.

lx + ly < 6000.
Each bottle is Each kit is
1 cubic foot. 1 cubic foot.

The plane's volume constraint is described by the inequality x + y < 6000.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


27 28
Solution:
Example 3:
Giapetto’s woodcarving shop manufactures two types of wooden toys: soldiers Step 1: Model formulation
and trains. A soldier sells for $27and uses $10 worth of raw materials. Each 1. Decision variables: we begin by finding the decision
variables. In any LP, the decision variables should
soldier that is manufactured increases Giapetto’s variable labor and overhead
completely describe the decisions to be made. Clearly,
costs by $14. A train sells for $21 and uses $9 worth of row materials. Each
Giapetto must decide how many soldiers and trains
train built increases Giapetto’s variable labor and overhead costs by $10. The should be manufactured each week. With this in mind,
manufacture of wooden soldiers and trains requires two types of skilled labor: we define:
carpentry and finishing. A soldier requires 2 hours of finishing labor and 1 x1 = number of soldiers produced each week
hour of carpentry labor. A train requires 1 hours of finishing labor and 1 hour x2 = number of trains produced each week
of carpentry labor. Each week, Giapetto can obtain all the needed raw material
but only 100 finishing hours and 80 carpentry hours. Demand for trains is
unlimited but at most 40 soldiers are bought each week. Giapetto wants to
maximize weekly profit. Formulate a mathematical model of Giapetto’s
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
29 30
situation.

2. Objective function: in any LP, the decision maker wants to


Company’s weekly profit can be expressed in terms of
maximize (usually revenue or profit) or minimize (usually costs)
some function of the decision variables. The function to be the decision variables x1 and x2:
maximized or minimized is called the objective function. For the
Giapetto problem, we will maximize the net profit (weekly Weekly profit = weekly revenue
revenues – raw materials cost – labor and overhead costs).
– weekly raw material costs

– the weekly variable costs


Weekly revenues and costs can be expressed in terms of the
decision variables, x1 and x2 as following:

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


31 32
3. Constraints: as x1 and x2 increase, Giapetto’s objective function
grows larger. This means that if Giapetto were free to choose any
Weekly revenues = weekly revenues from soldiers + weekly
revenues from trains values of x1 and x2, the company could make an arbitrarily large
= 27 x1 + 21 x2 profit by choosing x1 and x2 to be very large. Unfortunately, the
Also, values of x1 and x2 are limited by the following three restrictions
Weekly raw materials costs = 10 x1 + 9 x2 (often called constraints):
Other weekly variable costs = 14 x1 + 10 x2 Constraint 1: each week, no more than 100 hours of finishing time
Therefore, the Giapetto wants to maximize:
may be used.
(27 x1 + 21 x2) – (10 x1 + 9 x2) – (14 x1 + 10 x2) Constraint 2: each week, no more than 80 hours of carpentry time
= 3 x 1 + 2 x2 may be used.
Hence, the objective function is: Constraint 3: because of limited demand, at most 40 soldiers should
be produced.
Maximize z = 3 x1 + 2 x2
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
33 34

Constraint 1 Each week, no more than 100 hours of The coefficients of the constraints are often called the
finishing time may be used. technological coefficients.

2 x1 + x2 ≤ 100 The number on the right-hand side of the constraint is called


the constraint’s right-hand side (or rhs).
Constraint 2 Each week, no more than 80 hours of
carpentry time may be used. Sign Restrictions
x1 + x2 ≤ 80 If the decision variable can assume only nonnegative values,
the sign restriction xi ≥ 0 is added.
Constraint 3 Because of limited demand, at most 40
soldiers should be produced. If the variable can assume both positive and negative values,
the decision variable xi is unrestricted in sign (often
x1 ≤ 40 abbreviated urs).

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


35 36
• Sign restrictions: to complete the formulation of the LP problem, Combining the non-negativity constraints with the
the following question must be answered for each decision objective function and the structural constraints yield the
variable: can the decision variable only assume nonnegative following optimization model (usually called LP model):
values, or it is allowed to assume both negative and positive Max z = 3x1 + 2x2 (objective function)
values? Subject to (s.t.)

If a decision variable xi can only assume a nonnegative values, we 2 x1 + x2 ≤ 100 (finishing constraint)

add the sign restriction (called non-negativity constraints) xi 0. x1 + x2 ≤ 80 (carpentry constraint)


x1 ≤ 40 (constraint on demand for soldiers)
If a variable xi can assume both positive and negative values (or
x1 ≥ 0 (sign restriction)
zero), we say that xi is unrestricted in sign (urs).
x2 ≥ 0 (sign restriction)
In our example the two variables are restricted in sign, i.e., x1 0 The optimal solution to this problem is :
and x2 0 X1 = 20, and X2 = 60, Z = 180
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
37 38

Example 4:
Solution:
How many tonnes of regular and premium gas to
produce in order to maximize weekly profit? Let x1 = 1 tonne of regular gas
x2 = 1 tonne of premium gas
Products
Resource Regular Premium Resource Maximize Z = 150x1 + 175x2
Availability subject to
Raw gas 7 m3/tonne 11 m3/tonne 77 m3/week 7x1 + 11x2 ≤ 77 (material constraint) (1)
Production 10 hr/tonne 8 hr/tonne 80 hr/week 10x1 + 8x2 ≤ 80 (time constraint) (2)
time x1 ≤ 9 (regular gas storage) (3)
Storage 9 tonne 6 tonne x2 ≤ 6 (premium gas storage) (4)
x1, x2 ≥ 0 (positivity) (5, 6)
Profit $150/tonne $175/tonne

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


39 40
Example 5: Minutes per unit
A garment company manufactures men's shirts and women’s Garment Cutting Sewing Packaging Unit
blouses for Walmark Discount stores. Walmark will accept all the profit($)

production supplied by Burroughs. Shirts 20 70 12 8.00

The production process includes cutting, sewing and packaging.


Blouses 60 60 4 12.00
The company employs 25 workers in the cutting department, 35
in the sewing department and 5 in the packaging department. The
factory works one 8-hour shift, 5 days a week. The following Determine the optimal weekly production schedule for
table gives the time requirements and the profits per unit for the the company.
two garments:
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
41 42

The objective is to find x1, x2 so as to


Solution: Assume that Burroughs produces x1 shirts and
x2 blouses per week. maximize the profit z = 8 x1 + 12 x2

8 x1 + 12 x2 satisfying the constraints:


Profit got =
20 x1 + 60 x2 ≤ 25 40 60
Time spent on cutting = 20 x1 + 60 x2 mn
70 x1 + 60 x2 ≤ 35 40 60
Time spent on sewing = 70 x1 + 60 x2 mn 12 x1 + 4 x2 ≤ 5 40 60
x1, x2 ≥ 0, integers
Time spent on packaging = 12 x1 + 4 x2 mn

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


43 44
This is a typical optimization problem.
More generally, an optimization problem looks as
follows:
Any values of x1, x2 that satisfy all the constraints of
the model is called a feasible solution. Determine the decision variables x1, x2, …, xn so as
to optimize an objective function f (x1, x2, …, xn)
satisfying the constraints
We are interested in finding the optimum feasible
solution that gives the maximum profit while gi (x1, x2, …, xn) ≤ bi (i=1, 2, …, m).
satisfying all the constraints.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


45 46

Example 6: The SOBOGH Company Solution:


Let x1 = tons produced daily of exterior paint
- The SOBOGH company produces both interior and exterior paints
from two raw materials M1 and M2 x2 = tons produced daily of interior paint
Let z represent the total daily profit (in thousands of
dollars)
Tons of raw material per ton of
Objective:
Exterior paint Interior paint Maximum daily
availability (tons) Maximize z = 5 x1 + 4 x2
Raw material M1 6 4 24
Raw material M2 1 2 6________ (Usage of a raw material by both paints) < (Maximum raw
material availability)
Profit per ton ($1000) 5 4
Usage of raw material M1 per day = 6x1 + 4x2 tons
Usage of raw material M2 per day = x1 + 2x2 tons
-Daily demand for interior paint cannot exceed that of exterior paint by
more than 1 ton
-Maximum daily demand of interior paint is 2 tons - daily availability of raw material M1 is 24 tons
- The SOBOGH company wants to determine the optimum product mix - daily availability of raw material M2 is 6 tons
of interior and exterior paints that maximizes the total daily profit
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
47 48
Restrictions: Complete The SOBOGH company model:

6x1 + 4x2 < 24 (raw material M1) Maximize z = 5 x1 + 4 x2 (total daily profit)

x1 + 2x2 < 6 (raw material M2) subject to


6x1 + 4x2 < 24 (raw material M1)
- Difference between daily demand of interior (x2) and
exterior (x1) paints does not exceed 1 ton, x1 + 2x2 < 6 (raw material M2)
so x2 - x1 < 1 x2 - x1 < 1
x2 < 2
- Maximum daily demand of interior paint is 2 tons, x1 > 0
so x2 < 2 x2 > 0

- Variables x1 and x2 cannot assume negative - Objective and the constraints are all linear functions in this
values, example.
so x1 > 0 , x2 > 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
49 50

Example 7:
Suppose that a farmer has a piece of farm land, say A square If we denote the area planted with wheat and barley
kilometers large, to be planted with either wheat or barley or
with x1 and x2 respectively, then the optimal number
some combination of the two. The farmer has a limited
of square kilometers to plant with wheat vs. barley
permissible amount F of fertilizer and P of insecticide which
can be expressed as a linear programming problem:
can be used, each of which is required in different amounts per
unit area for wheat (F1, P1) and barley (F2, P2). Let S1 be the
selling price of wheat, and S2 the price of barley.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


51 52
maximize Z= S1x1 + S2x2
Example 8:
subject to x1 +x2 < A (limit on total area) The Stratton Company produces two basic types of plastic
F1x1 + F2x2 < F (limit on fertilizer) pipe. Three resources are crucial to the output of pipe:
P1x2 + P2x2 < P (limit on insecticide) extrusion hours, packaging hours, and a special additive to the
x1 > 0, x2 > 0 (cannot plant a negative area) plastic raw material. The following data represent next week’s
situation. All data are expressed in units of 100 feet of pipe.
which in matrix form becomes
Resource Type 1 Type 2 Resource Availability
maximize Extrusion 4 hr 6 hr 48 hr
Packaging 2 hr 2 hr 18 hr
subject to Additive 2 lb 1 lb 16 lb

The contribution to profits and overhead per 100 m of pipe is


$34 for type 1 and $40 for type 2. Formulate a linear
programming model to determine how much of each type of
pipe should be produced to maximize contribution to profits
EE 477 Dr. Mohamed Zribi
53
and to overhead. EE 477 Dr. Mohamed Zribi
54

Solution: Next, we define the objective function. The goal is to

To define the decision variables that determine product maximize the total contribution that the two products

mix, we let make to profits and overhead. Each unit of x1 yields


$34, and each unit of x2 yields $40. For specific
x1 = amount of type 1 pipe to be produced and sold values of and x1 and x2, we find the total profit by
next week, measured in 100-foot increments multiplying the number of units of each product
(e.g., x1 = 2 means 200 feet of type 1 pipe) produced by the profit per unit and adding them.
Thus, our objective function becomes
x2 = amount of type 2 pipe to be produced and
sold next week, measured in 100-foot Maximize: Z= 34x1 + 40x2
increments
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
55 56
The final step is to formulate the constraints. Each unit of
x1 and x2 produced consumes some of the critical
resources. In the extrusion department, a unit of x1 These three constraints restrict our choice of values for the
requires 4 hours and a unit of x2 requires 6 hours. The decision variable because the values we choose for x1 and x2
total must not exceed the 48 hours of capacity available, must satisfy all of the constraints. Negative values do not
so we use the ≤ sign. Thus, the first constraint is
make sense, so we add nonnegativity restrictions to the model:
4x1 + 6x2 ≤ 48

Similarly, we can formulate constraints for packaging


and raw materials:
2x1 + 2x2 ≤ 18 (packaging) x1 ≥ 0 and x2 ≥ 0 (nonnegativity restrictions)
2x1 + x2 ≤ 16 (additive mix)

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


57 58

Example 9:
We can now state the entire model, made complete with the The Crandon Manufacturing Company produces two principal product
lines, a portable circular saw and a precision table saw. There are two
definitions of variables. crucial operations: fabrication and assembly. Maximum market demand
next year is 3500 saws per month for both products. The average
Maximize: Z= 34x1 + 40x2 contribution to profits and overhead is $900 for each circular saw and $600
for each table saw.
4x1 + 6x2 ≤ 48 Management wants to determine the best product mix for the next year so
2x1 + 2x2 ≤ 18 as to maximize contribution to profits and overhead. Also, it is interested in
Subject to:
2x1 + x2 ≤ 16 the payoff of expanding capacity or increasing market share.

x1 ≥ 0 and x2 ≥ 0
Resource Circular Saw Table Saw Maximum Capacity
where
Fabrication 2 hrs/month 1 hrs/month 4,000 hrs/month
x1 = amount of type 1 pipe to be produced and sold next week, measured in
100-foot increments Assembly 1 hrs/month 2 hrs/month 5,000 hrs/month
x2 = amount of type 2 pipe to be produced and sold next week, measured in
100-foot increments
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
59 60
Solution: Example 10: Product Mix Problem
Definition of Decision Variables
Fertilizer manufacturing company, 2 types of fertilizer

x1 = number of circular saws produced and sold per month Type A: high phosphorus
x2 = number of table saws produced and sold per month
Type B: low phosphorus
Formulation Tons Required/ ton of Fertilizer Maximum amount
Maximize: Z=900x1 + 600x2 Item available per day
Type A Type B
Subject to: Urea 2 1 1500
2x1 + 1x2 ≤ 4,000 (Fabrication)
Potash 1 1 1200
1x1 + 2x2 ≤ 5,000 (Assembly)
1x1 + 1x2 ≤ 3,500 (Demand) Rock Phosphate 1 0 500
x1, x2 ≥0 (Nonnegativity)
Net profit per ton 15 10
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
61 62

Solution:

Step 1: The decision variables


Step 3: The constraints

Daily production of Type A: x tons Limited supply of raw materials per day:
Type B: y tons
Urea: 2x + y ≤ 1500

Step 2: The objective function (maximize profit) Potash: x + y ≤ 1200


z = 15x + 10y
Rock Phosphate: x ≤ 500

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


63 64
Complete model Example 11: A Product Mix Example
Maximize z( x, y) = 15 x + 10y
- Four-product T-shirt/sweatshirt manufacturing company.
subject to 2x + y ≤ 1500
- Must complete production within 72 hours
x + y ≤ 1200
x ≤ 500 - Truck capacity = 1,200 standard sized boxes.
x ≥ 0, - Standard size box holds12 T-shirts.
y≥0 - One-dozen sweatshirts box is three times size of standard box.
- $25,000 available for a production run.
- 500 dozen blank T-shirts and sweatshirts in stock.
- How many dozens (boxes) of each type of shirt to produce?

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


65 66

Solution:
A Product Mix Example Data Decision variables:
x1 = sweatshirts, front printing
x2 = sweatshirts, back and front printing
Processing Cost Profit x3 = T-shirts, front printing
Time (hr) ($) ($) x4 = T-shirts, back and front printing
Per dozen per dozen per dozen
Objective function:
Sweatshirt - F 0.10 36 90 maximize Z = $90x1 + 125x2 + 45x3 + 65x4
Model constraints:
Sweatshirt – 0.25 48 125
B/F 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 hr
3x1 + 3x2 + x3 + x4 1,200 boxes
T-shirt - F 0.08 25 45
$36x1 + 48x2 + 25x3 + 35x4 $25,000

T-shirt - B/F 0.21 35 65 x1 + x2 500 dozed sweatshirts


x3 + x4 500 dozen T-shirts

x1, x2, x3, x4 0

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


67 68
Example 12:
Step 1: Define the Decision Variables
Problem Statement and Data xij = ounces of ingredient i in pet food j per week, where i = h (horse meat), f (fish) and

- Canned catfood, Meow Chow; dogfood, Bow Chow. c (cereal), and j = m (Meow chow) and b (Bow Chow).
Step 2: Formulate the Objective Function
- Ingredients/week: 600 lb horse meat; 800 lb fish; 1000 lb cereal. maximize Z = $0.05(xhm + xfm + xcm) + 0.06(xhb + xfb + xcb)

- Recipe requirement: Meow Chow at least half fish; Bow Chow Step 3: Formulate the Model Constraints

at least half horse meat. Amount of each ingredient available each week:
xhm + xhb 9,600 ounces of horse meat
- 2,250 sixteen-ounce cans available each week. xfm + xfb 12,800 ounces of fish

-Profit /can: Meow Chow $0.80; Bow Chow $0.96. xcm + xcb 16,000 ounces of cereal additive
Recipe requirements:
- How many cans of Bow Chow and Meow Chow should be Meow Chow xfm/(xhm + xfm + xcm) 1/2, or, - xhm + xfm- xcm 0
produced each week in order to maximize profit? Bow Chow xhb/(xhb + xfb + xcb) 1/2, or, xhb- xfb - xcb 0
Can content constraint: xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


69 70

Example 13: Blending Problem


Step 4: Model Summary and Computer Solution

maximize Z = $0.05 xhm+ 0.05 xfm+ 0.05 xcm + 0.06 xhb + 0.06 xfb + 0.06 xcb Background: Petroleum Refinery

subject to xhm + xhb 9,600 ounces of horse meat


xfm + xfb 12,800 ounces of fish
xcm + xcb 16,000 ounces of cereal additive
- xhm + xfm- xcm 0 Three types of petrol (minimum Octane rating: 85, 90, 95)
xhb- xfb - xcb 0
xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces
Four types of oils (Octane rating: 68, 86, 91, 99)
xij 0

Blending oils petrol, with proportional Octane rating

Objective: best product mix [how much of each petrol, oil to sell]
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
71 72
The data for the Blending Problem Solution:
Step 1: The decision variables
Raw OcR Available amount Cost/barrel Sale price
oil (barrels/day) xij = barrels/day of oil i ( i = 1, 2, 3, or 4)
to make petrol j (j = 1, 2, or 3)
1 68 4000 31.02 36.85
2 86 5050 33.15 36.85
3 91 7100 36.35 38.95
4 99 4300 38.75 38.95
Total premium petrol per day = x11 + x21 + x31 + x41
Petrol Type Min OcR Selling Price Demand
(barrels/day) 68x11 + 86x21 + 91x31 + 99x41
Its Octane Rating: ≥ 95,
1 (Premium) 95 45.15 ≤ 10,000 x11 + x21 + x31 + x41

2 (Super) 90 42.95 No limit


68x11 + 86x21 + 91x31 + 99x41 - 95(x11 + x21 + x31 + x41) ≥ 0.
3 (Regular) 85 40.99 ≥ 15,000
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
73 74

Step 3: The constraints

Step 2. The objective function a) The OcR constraints:

Maximize profit <==> Maximize revenue


68x11 + 86x21 + 91x31 + 99x41 - 95(x11 + x21 + x31 + x41) ≥ 0

45.15(x11 + x21 + x31 + x41) + premium


68x12 + 86x22 + 91x32 + 99x42 - 90(x12 + x22 + x32 + x42) ≥ 0
42.95(x12 + x22 + x32 + x42) + super
40.99(x13 + x23 + x33 + x43) + regular
68x13 + 86x23 + 91x33 + 99x43 - 85(x13 + x23 + x33 + x43) ≥ 0
36.85 (4000 – (x11 + x12 + x13)) + Oil 1

36.85 (5050 – (x21 + x22 + x23)) + Oil 2

38.95 (7100 –(x31 + x32 + x33)) + Oil 3


Oil 4
38.95 (4300 – (x41 + x42 + x43))

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


75 76
Step 3: The constraints Step 3: The constraints...

b) Can’t use more oil than we have: (c) The demand constraints:

x11 + x12 + x13 ≤ 4000 x11 + x21 + x31 + x41 ≤ 10,000

x21 + x22 + x23 ≤ 5050 x13 + x23 + x33 + x43 ≥ 15,000

x31 + x32 + x33 ≤ 7100

x41 + x42 + x43 ≤ 4300 (d) Allowed values of variables

xij ≥ 0 for i = 1, 2, 3, 4, and j = 1, 2, 3.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


77 78

Complete model
Example 14: A Transportation Example
Maximize:
45.15(x11 + x21 + x31 + x41) + 42.95(x12 + x22 + x32 + x42) + 40.99(x13 + x23 + x33 + x43) +
Warehouse supply of televisions sets: Retail store demand for television sets:
36.85(4000 – (x11 + x12 + x13)) + 36.85 (5050 – (x21 + x22 + x23)) +
1- Cincinnati 300 A - New York 150
38.95 (7100 –(x31 + x32 + x33)) + 38.95 (4300 – (x41 + x42 + x43))
2- Atlanta 200 B - Dallas 250
Subject to:
3- Pittsburgh 200 C - Detroit 200
68x11 + 86x21 + 91x31 + 99x41 - 95(x11 + x21 + x31 + x41) ≥ 0
Octane total 700 total 600
68x12 + 86x22 + 91x32 + 99x42 - 90(x12 + x22 + x32 + x42) ≥ 0
68x13 + 86x23 + 91x33 + 99x43 - 85(x13 + x23 + x33 + x43) ≥ 0 rating
From To Store
x11 + x12 + x13 ≤ 4000
Warehouse
A B C
x21 + x22 + x23 ≤ 5050 (New. York) (Dallas) (Detroit)
Supply
x31 + x32 + x33 ≤ 7100 1 (Cin.) $16 $18 $11
2 (Atl.) 14 12 13
x41 + x42 + x43 ≤ 4300
3 (Pitt.) 13 15 17
x11 + x21 + x31 + x41 ≤ 10,000
Demand
x13 + x23 + x33 + x43 ≥ 15,000
xij ≥ 0 for I = 1, 2, 3, 4, and j = 1, 2, 3. EE 477 Dr. Mohamed Zribi
EE 477 Dr. Mohamed Zribi 79 80
Model Summary Example 15: A Marketing Example
Minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3C Data and Problem Definition
Exposure Cost
subject to (people/ad or
commercial)
x1A + x1B+ x1 300
x2A+ x2B + x2C 200
Television 20,000 $15,000
commercial
x3A+ x3B + x3C 200 Radio commercial 12,000 6,000
x1A + x2A + x3A = 150
Newspaper ad 9,000 4,000
x1B + x2B + x3B = 250
x1C + x2C + x3C = 200
xij 0 - Budget limit $100,000
- Television time for four commercials
- Radio time for 10 commercials
- Newspaper space for 7 ads
- Resources for no more than 15 commercials and/or ads.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


81 82

Example 16: A Blend Example


Solution: Determine the optimal mix of the three components in each grade of motor oil that will maximize
profit. Company wants to produce at least 3,000 barrels of each grade of motor oil.

maximize Z = 20,000x1 + 12,000x2 + 9,000x3 Component M aximum Barrels


Available/day
Cost/barrel

1 4,500 $12
subject to
2 2,700 10

$15,000x1 + 6,000x 2+ 4,000x3 100,000 3 3,500 14

x1 4
Grade Component Specifications Selling Price ($/bbl)
x2 10
Super At least 50% of 1 $23
x3 7 Not more than 30% of 2

Premium At least 40% of 1 20


x1 + x2 + x3 15 Not more than 25% of 3

x1, x2, x3 0 Extra At least 60% of 1


At least 10% of 2
18

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


83 84
Example 17: A Data Envelopment Analysis (DEA)
Decision variables: The quantity of each of the three components used in each grade of DEA compares a number of service units of the same type based on their inputs (resources) and
gasoline (9 decision variables); xij = barrels of component i used in motor oil grade j per day, outputs. The result indicates if a particular unit is less productive, or efficient, than other units.
where i = 1, 2, 3 and j = s (super), p(premium), and e(extra). Elementary school comparison:
Model Summary: maximize Z = 11x1s + 13x2s + 9x3s + 8x1p + 10x2p + 6x3p + 6x1e + 8x2e + 4x3e input 1 = teacher to student ratio output 1 = average reading SOL score

subject to input 2 = supplementary $/student output 2 = average math SOL score

x1s + x1p + x1e 4,500 input 3 = parent education level output 3 = average history SOL score
x2s + x2p + x2e 2,700
x3s + x3p + x3e 3,500 Inputs Outputs
0.50x1s - 0.50x2s - 0.50x3s 0
School 1 2 3 1 2 3
0.70x2s - 0.30x1s - 0.30x3s 0
0.60x1p - 0.40x2p - 0.40x3p 0 Alton .06 $260 11.3 86 75 71
0.75x3p - 0.25x1p - 0.25x2p 0
Beeks .05 320 10.5 82 72 67
0.40x1e- 0.60x2e- - 0.60x3e 0
0.90x2e - 0.10x1e - 0.10x3e 0 Carey .08 340 12.0 81 79 80
x1s + x2s + x3s 3,000
x1p+ x2p + x3p 3,000 Delancey .06 460 13.1 81 73 69

x1e+ x2e + x3e 3,000


EE 477 Dr. Mohamed Zribi
xij 0 EE 477 Dr. Mohamed Zribi
85 86

Example 18: Transportation problem


Decision variables:
xi = a price per unit of each output where i = 1, 2, 3
yi = a price per unit of each input where i = 1, 2, 3
Model summary:
maximize Z = 81x1 + 73x2 + 69x3
subject to
.06 y1 + 460y2 + 13.1y3 = 1
86x1 + 75x2 + 71x3 .06y1 + 260y2 + 11.3y3 Background:
82x1 + 72x2 + 67x3 .05y1 + 320y2 + 10.5y3
81x1 + 79x2 + 80x3 .08y1 + 340y2 + 12.0y3 Company has several factories (sinks), and several
81x1 + 73x2 + 69x3 .06y1 + 460y2 + 13.1y3
suppliers (sources)
xi, yi 0
Objective: Minimize the cost of transportation
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
87 88
Transportation problem, the data The model of a Transportation problem:

Step 1: The decision variables


transportation cost per ton
xij = amount of ore shipped from mine i to plant j per day.

mine plant 1 plant 2 plant 3


capacity/day Step 2: The objective function
Mine 1 800 11 8 2

Mine 2 300 7 5 4 Minimize the transportation costs:

daily ore requirement at each plant:


Minimize: 11x11 + 8x12 + 2x13 + 7x21 + 5x22 + 4x23
400 500 200

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


89 90

Example 19: Scheduling Postal Workers


Step 3. The constraints
Each postal worker works for 5 consecutive days, followed
(a) Shipment from each mine less than daily production by 2 days off, repeated weekly.
x11 + x12 + x13 ≤ 800 [capacity of mine 1]
x21 + x22 + x23 ≤ 300 [capacity of mine 2] Day Mon Tues Wed Thurs Fri Sat Sun
(b) Demand of each plant must be met
Demand 17 13 15 19 14 16 11
x11 + x21 ≥ 400 [demand at plant 1]
x12 + x22 ≥ 500 [demand at plant 2]
x13 + x23 ≥ 200 [demand at plant 3]
Minimize the number of postal workers (for the time being,
(c) Decision variables can’t be negative
we will permit fractional workers on each day.)
xij ≥ 0, for all i= 1, 2, j = 1, 2, 3.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
91 92
Select the decision variables
Minimize z = x1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7
– Let x1 be the number of workers who start working on

Monday, and work till Friday subject to: x1 + x4 + x5 + x6 + x7 17


x1 + x2 + x5 + x6 + x7 13
– Let x2 be the number of workers who start on Tuesday
x1 + x2 + x3 + x6 + x7 15

… x1 + x2 + x3 + x4 + x7 19
x1 + x2 + x3 + x4 + x5 14
– Let x3, x4, …, x7 be defined similarly. x2 + x3 + x4 + x5 + x6 16
x3 + x4 + x5 + x6 + x7 11

xj 0 for j = 1 to 7
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
93 94

Some Enhancements of the Model Some Enhancements of the Model

Suppose that there was a pay differential. The cost of workers who
start work on day j is cj per worker. • Suppose that one can hire part time workers (one day at a time),

and that the cost of a part time worker on day j is PTj.

Minimize z = c1 x1 + c2 x2 + c3 x3 + … + c7 x7 • Let yj = number of part time workers on day j

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


95 96
Minimize z = c1 x1 + c2 x2 + c3 x3 + … + c7 x7 Example 20:
+ PT1 y1 + PT2 y2 + … + PT7 y7 A Post Office requires different number of full-time employees
on different days of the week. The number of employees
required on each day is given in the table below. Union rules
subject to: x1 + x4 + x5 + x6 + x7 17
x1 + x2 + x5 + x6 + x7 13 say that each full-time employee must receive two days off
x1 + x2 + x3 + x6 + x7 15 after working for five consecutive days. The Post Office wants
x1 + x2 + x3 + x4 + x7 19 to meet its requirements using only full-time employees.
x1 + x2 + x3 + x4 + x5 14
Formulate the above problem as a LPP so as to minimize the
x2 + x3 + x4 + x5 + x6 16
number of full-time employees hired.
x3 + x4 + x5 + x6 + x7 11

xj 0 for j = 1 to 7
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
97 98

Solution:
Requirements of full-time employees day-wise Let xi be the number of full-time employees employed at the
beginning of day i (i = 1, 2, …, 7). Thus our problem is to find xi
Day No. of full-time so as to
Minimize z x1 x2 x3 x4 x5 x6 x7
employees required
Subject to
1 - Monday 10 x1 x4 x5 x6 x7 10 (Mon)
2 - Tuesday 6 x1 x2 x5 x6 x7 6 (Tue)
x1 x2 x3 x6 x7 8 (Wed)
3 - Wednesday 8 x1 x2 x3 x4 x7 12 (Thu)
x1 x2 x3 x4 x5 7 (Fri)
4 - Thursday 12
x2 x3 x4 x5 x6 9 (Sat)
5 - Friday 7 x3 x4 x5 x6 x7 4 (Sun)

6 - Saturday 9
xi 0 (i 1,...7) and integers
7 - Sunday 4
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
99 100
Example 21: A Multi-period Scheduling Decision variables:
Problem Definition and Data rj = regular production of computers per week j (j = 1, 2, 3, 4, 5, 6)

Production capacity : 160 computers per week oj = overtime production of computers per week j (j = 1, 2, 3, 4, 5, 6)

Additional 50 computers with overtime ij = extra computers carried over as inventory in week j (j = 1, 2, 3, 4, 5)

Assembly costs: $190/comp. regular time; $260/comp. overtime Model summary:


Inventory cost: $10/comp. per week minimize Z = 190(r1 + r2 + r3 + r4 + r5 + r6) + 260(o1 + o2 + o3 + o4 + o5 +o6)
Order schedule: Week Computer Orders + 10(i1, + i2 + i3 + i4 + i5)

1 105 subject to rj 160 (j = 1, 2, 3, 4, 5, 6)


oj 150 (j = 1, 2, 3, 4, 5, 6)
2 170
r1 + o1 - i1 105
3 230
r2 + o2 + i1 - i2 170
4 180
r3 + o3 + i2 - i3 230
5 150 r4 + o4 + i3 - i4 180
6 250 r5 + o5 + i4 - i5 150
r6 + o6 + i5 250
EE 477 Dr. Mohamed Zribi rj, oj, ij 0EE 477 Dr. Mohamed Zribi
101 102

Example 22: A Diet problem


My diet requires that all the food I eat come from one of the four “basic food
groups” (chocolate cake, ice cream, soda, and cheesecake). At present, the
Calories Chocolate Sugar Fat
following four foods are available for consumption: brownies, chocolate ice
cream, cola, and pineapple cheesecake. Each brownie costs 50 cents, each Brownie 400 3 ounce 2 ounce 2 ounce

scoop of chocolate ice cream costs 20 cents, each bottle of cola costs 30 cents,
Chocolate ice cream 200 2 2 4
and each piece of pineapple cheesecake costs 80 cents. Each day, I must ingest (1 scoop)
at least 500 calories, 6 oz of chocolate, 10 oz of sugar, and 8 oz of fat. The Cola (1 bottle) 150 0 4 1
nutritional content per unit of each food is shown in the following table.
Pineapple cheesecake 500 0 4 5
Formulate a linear programming model that can be used to satisfy my daily (1piece)
nutritional requirements at minimum costs.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


103 104
Solution:

• Decision variables: as always, we begin by determining • Objective function: my objective function is to


the decisions that must be made by the decision maker: minimize the cost of my diet. The total cost of
how much of each food type should be eaten daily. Thus, my diet may be the determined from the
we define the decision variables: following relation:
x1 = number of brownies eaten daily Total cost of diet = (cost of brownies) + (cost of ice
x2 = number of scoops of chocolate ice cream eaten daily cream) + (cost of cola) + (cost of cheesecake)
x3 = number of bottles of cola drunk daily Thus, the objective function is:
x4 = number of pieces of pineapple cheesecake eaten daily Min z = 50 x1 + 20 x2 + 30 x3 + 80 x4

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


105 106

• Constraints: the decision variables must satisfy the following four The four constraints are:
constraints:
Constraint 1: daily calorie intake must be at least 500 calories. 400 x1 + 200 x2 + 150 x3 + 500 x4 500
Constraint 2: daily chocolate intake must be at least 6 oz.
Constraint 3: daily sugar intake must be at least 10 oz. 3 x1 + 2 x2 6
Constraint 4: daily fat intake must be at least 8 oz. 2 x1 + 2 x2 + 4 x3 + 4 x4 10
To express constraint 1 in terms of the decision variables, note that
(daily calorie intake) = (calorie in brownies) + (calories in 2 x1 + 4 x2 + x3 + 5 x4 8
chocolate ice cream) + (calories in cola) + (calories in pineapple
cheesecake)
Therefore,
the daily calorie intake = 400 x1 + 200 x2 + 150 x3 + 500 x4 must be Nonnegativity constraints: it is clear that all decision
greater than 500 ounces
By the same way the other three constraints can be formulated. variables are restricted in sign, i.e., xi 0, for all i = 1,
2, 3, and 4
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
107 108
• Combining the objective function, constraints, and Example 23: A Nutrition Aid Problem
nonnegativity constraints, the LP model is as follows:
• A Nutrition Aid Program is considering two food supplements

Min z = 50 x1 + 20 x2 + 30 x3 + 80 x4 S1 and S2 for distribution among a population deficient in


st. nutrients N1, N2, and N3. The nutritional content and prices of
400 x1 + 200 x2 + 150 x3 + 500 x4 500 the food supplements and the minimum daily nutritional
3 x 1 + 2 x2 6
requirements per person are given in the following Table.
2 x1 + 2 x2 + 4 x3 + 4 x4 10
2 x 1 + 4 x2 + x3 + 5 x4 8 • For example, each unit of S1 provides 4 units of N1, 8 units of
xi 0, for all i = 1, 2, 3, and 4 N2, 5 units of N3, and costs 6 pesos.

The optimal solution to this LP is x1 = x4 = 0, • The problem is to determine the daily quantities of the food
x2 = 1, and z = 90 cents supplements for each person that meet the minimum daily
EE 477 Dr. Mohamed Zribi
109 requirements and entail the least cost. EE 477 Dr. Mohamed Zribi 110

Table. Dietary and Price Data To formulate this problem mathematically, let x i (i = 1,2)
denote the quantity of Si (i = 1,2) needed per person per day.
The cost C (assuming no discounts) is given by
S1 S2 Minimum Daily C = 6x1 + 4x 2 .
To satisfy the.minimum.daily requirements, we must have
(Per Unit) (Per Unit) Requirement
4x1 + 12x 2 > 96
(Per Person) 8x1 + 4x 2 > 112
N1 4 12 96 5x1 + 5x 2 > 100.
Finally, the quantities x i must not be negative, i.e.,
N2 8 4 112 x1 >0, x 2 0.
N3 5 5 100 The problem is expressed formally as follows:
Minimize 6x1 + 4x 2
Price P6 P4 subject to 4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100
and x1 >0, x 2 0.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


111 112
Solution:
Example 24: A Diet Example Model Construction: Decision Variables
Breakfast Fat Cholesterol Iron Calcium Protein Fiber Cost
Food Calories (g) (mg) (mg) (mg) (g) (g) ($)
x1 = cups of bran cereal
1. Bran cereal (cup) 90 0 0 6 20 3 5 0.18
2. Dry cereal (cup) 110 2 0 4 48 4 2 0.22 x2 = cups of dry cereal
3. Oatmeal (cup) 100 2 0 2 12 5 3 0.10
4. Oat bran (cup) 90 2 0 3 8 6 4 0.12 x3 = cups of oatmeal
5. Egg 75 5 270 1 30 7 0 0.10
6. Bacon (slice) 35 3 8 0 0 2 0 0.09 x4 = cups of oat bran
7. Orange 65 0 0 1 52 1 1 0.40
8. Milk-2% (cup) 100 4 12 0 250 9 0 0.16
9. Orange juice (cup) 120 0 0 0 3 1 0 0.50
x5 = eggs
10. Wheat toast (slice) 65 1 0 1 26 3 3 0.07
x6 = slices of bacon
Data and Problem Definition x7 = oranges
x8 = cups of milk
Breakfast to include at least 420 calaries, 5 milligrams of iron, x9 = cups of orange juice
400 milligrams of calcium, 20 grams of protein, 12 grams of fiber,
x10 = slices of wheat toast
and must have no more than 20 grams of fat and 30 milligrams of
cholesterol. EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
113 114

Example 25:
The Swiss Construction Company is building roads on the side of the
minimize Z =0.18x1 + 0.22x2 + 0.10x3 + 0.12x4 + 0.10x5 + 0.09x6+ 0.40x7
Alps. It is necessary to use explosives to blow up the underground
+ 0.16x8 + 0.50x9 0.07x10
boulders to make the surface level. There are three ingredients (A, B,
subject to
and C) in the explosive used. It is known that at least 10 grams of the
90x1 + 110x2 + 100x3 + 90x4 + 75x5 + 35x6 + 65x7 + 100x8 + 120x9 + 65x10 420
explosive must be used to get results. If more than 20 grams are used,
2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20
270x5 + 8x6 + 12x8 30 the explosion will be too damaging. Also, for an explosion, at least 1/4

6x1 + 4x2 + 2x3 + 3x4+ x5 + x7 + x10 5 gram of ingredient C must he used for every gram of ingredient A, and
20x1 + 48x2 + 12x3 + 8x4+ 30x5 + 52x7 + 250x8 + 3x9 + 26x10 400 at least 1 gram of ingredient B must be used for every gram of
3x1 + 4x2 + 5x3 + 6x4 + 7x5 + 2x6 + x7+ 9x8+ x9 + 3x10 20 ingredient C. The costs of ingredients A, B, and C are 6 Swiss francs
5x1 + 2x2 + 3x3 + 4x4+ x7 + 3x10 12 (SFr), 18 SFr, and 20 SFr per gram, respectively. Find the least-cost
xi 0
explosive mix necessary to produce a safe explosion.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
115 116
Solution:

• Decision variables: Quantities of A,B,C to be used


Constraints:
in (Ounces) • (1)Total amount ≥ 10
Let : x1+x2+x3 ≥10
x1, x2, x3 for Quantities of A, B, C • (2) Total amount ≤ 20
x1+x2+x3 ≤ 20
Objective: Min: Total Cost
• (3) Technique Requirement:
Cost Coef.: C1, C2, C3 = 6,18, 20
Min: Z = 6x1 + 18x2 +20x3 1 unit of x1 (A) must with ¼ unit of x3 (C) or
more
That is : ¼x1 ≤ x3 or ¼x1- x3 ≤ 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
117 118

Example 26:
• (3) x1- 4x3 ≤0
Sun Electric can produce three chips:
• (4) Technical requirement:
• Chip A which costs $6 per unit and sells for $9 per unit.
• x2 ≥ x3 OR x2 - x3 ≥ 0
• Chip B which costs $5 per unit and sells for $6 per unit.
• (5) Non-negative: x1, x2, x3≥0
• Chip C which costs $8 per unit and sells for $9 per unit.
• So: The company’s declared objective is profit maximization. The
(1) x1+ x2+x3 ≥ 10 company is planning a monthly production schedule. The
(2) x1+ x2+x3 ≤ 20 marketing department requires the production of at least 100
(3) x1 -4x3 ≤ 0 units of chip C and no more than 1,000 units of chip A.

(4) x2- x3 ≥ 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
119 120
The production department cannot produce more than 4,000 units of
all chips. Products are made on the "chipping" machine, -which
Decision variables: Quantities of A, B, C to be produced
can produce 20, 30, or 40 units of chips A, B, or C, respectively,
per hour. The machine is available for up to 100 hours each
month. The marketing department also requires that there be at Let :
least twice as many units of B as of C in the monthly schedule. x1, x2, x3 for Quantities of A, B, C.
The finance department has set an upper budget of S $15,000 for Objective: Max: Profit:
the schedule. Coefficients of the profit:
C1=9-6=3, C2=6-5=1, C3=9-8=1
• How many units of A, B, and C should the company produce?

So: Max: Z = 3x1 + x2 + x3


EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
121 122

Constraints: • (3) Machine-hour Capacity:


• (1) Marketing Requirement: x1/20+x2/30+x3/40 ≤ 100
x3 ≥ 100 (C chip) (1) • (Total hour for A), That is:
x1 ≤ 1000 (A chip) (2) 6x1 + 4x2 + 3x3 ≤ 12,000 (4)
• (4)Marketing Requirement:
• (2) Production limit: x2 ≥ 2x3, so, x2-2x3 ≥ 0 (5)
x1+x2+x3 ≤ 4000 (all A,B,C) (3) • (5)Budget limit:
6x1+5x2+8x3 ≤ 15,000 (6)
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
123 124
Example 27: • The following requirements are imposed:
• a. The total number (responding and non-responding) of
A French market research firm wishes to conduct home visit morning calls must not exceed the total number of afternoon
interviews according to the quotas specified iii the first column calls.
of the following table: • b. The total number of responding evening calls must be at
Type of Morning Calls Afternoon Calls Evening Calls Responding call least 20 percent and no more than 30 percent of the total
Household (%) (%) (%) (Quota)
Single .1 .1 .5 50
number of all responding calls.
Married –No- .5 .4 .7 100 • a. An evening call costs twice as much as a morning or an
Children
afternoon call.
Married with .75 .6 .9 150
Children

• Decide how the calls should he distributed among the three


• Since not all persons are it home at the time of the visit and not types of households (by the three times during the day) such
all person cooperate, there is only a certain “probability of that tile expected quotas are fulfilled at minimum cost.
response” to the home visits (calls). Formulate only.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
125 126

Solution:

Min: Z=x11+x21+x31+x12+x22+x32+2x13+2x23+2x33
TIME
• Decision variables = 9 HOUSE M N E
Subject to:
• Objective function: Single x11 x12 x13
• Min: Total cost
(1)Quota:
50
0.1 0.1 0.5
0.1x11+0.1x12+0.5x13 ≥ 50
M/NC x21 x22 x23
• C11=C12=C21
0.5x21+0.4x22+0.7x23 ≥ 100
=C22=C31=C32=1 100 0.5 0.4 0.7
• C13=C23=C33=2 0.75x31+0.6x32+0.9x33 ≥ 150
M/C x31 x32 x33
150 0.75 0.6 0.9

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


127 128
• (2) M<N x11+x21+x31-x12-x22-x32≤0 • 0.5x13+0.7x23+0.9x33

• (3) 0.5X13+0.7x23+0.9x33≥0.2x∑aij xij ≥0.2 (0.1x11+0.1x12+……+0.9x33)


≥0.02x11+0.02x12+0.1x13+0.1x21+0.08
• 0.5X13+0.7x23+0.9x33≤0.3x∑aij xij
x22+0.14x23+0.15X31+0.12x32+0.18x33

Where:
∑aij xij = 0.1x11+0.1x12+0.5x13+0.5x21+
• Then :
0.4x22+0.7x23+0.75X31+0.6x32+0.9x33
0.02x11+0.02x12-0.4x13+0.1x21+0.08x22-
0.56x23+0.15X31+0.12x32-0.72x33 < 0

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


129 130

Example 28: Problem Mix Model


• 0.1x11+0.1x12+0.5x13+0.5x21+……
+0.9x33 ≥ 50 - Two machines X and Y

- X is designed for 5-ounce bottles


• 0.1x11+……+0.5x21+0.4x22+0.7x23+0.75x31+
…… ≥ 100 - Y is designed for 10-ounce bottles

- X can also produce 10-ounce bottles with some loss of


• 0 …+0.75x31+0.6x32+0.9x33 ≤ 150 efficiency

- Y can also produce 5-ounce bottles with some loss of


• x11-x12+x21-x22……x31-x32…… ≤ 0
efficiency
• x11,…….x33 ≥ 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
131 132
Machine 5-ounce bottles 10-ounce bottles
Solution:
X 80/min 30/min
Y 40/min 50/min Let x1 = number of 5-ounce bottles to be produced per week
x2 = number of 10-ounce bottles to be produced per week
- X and Y machines can run 8 hours per day for 5 days a week
Objective:
- Profit on 5-ounce bottle is 20 cents Maximize profit z = (0.20x1 + 0.30x2)
Constraints:
- Profit on 10-ounce bottle is 30 cents - Time constraint on machine X,
(x1/80) + (x2/30) < 8 X 60 X 5 = 2400 minutes
- Weekly production of the drink cannot exceed 500,000 ounces - Time constraint on machine Y,
(x1/40) + (x2/50) < 8 X 60 X 5 = 2400 minutes
- Market can utilize 30,000 (5-ounce) bottles and 8000 (10-ounce) - Weekly production of the drink cannot exceed 500,000 ounces,
bottles per week 5x1 + 10x2 < 500,000 ounces
- Market demand per week,
- To maximize the profit x1 > 30,000 (5-ounce bottles)
x2 > 8,000 (10-ounce bottles)

non-negativity: x1 > 0 and x2 > 0


EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
133 134

Example 29: Production Allocation Model Solution:


Let x1 = number of products of type A
x2 = number of products of type B
- Two types of products A and B
- Profit of Rs.4 on type A Objective:
- Profit of Rs.5 on type B - Profit of Rs.4 on type A , therefore 4x1 will be the profit on selling x1 units of type A
- Both A and B are produced by X and Y machines
- Profit of Rs.5 on type B, therefore 5x2 will be the profit on selling x2 units of type B
Machine Machine
Products X Y Total profit,
A 2 minutes 3 minutes z = 4x1 + 5x2
B 2 minutes 2 minutes Constraints:

- Machine X is available for maximum 5 hours and 30 minutes during any - Time constraint on machine X,
2x1 + 2x2 < 330 minutes
working day
- Time constraint on machine Y,
3x1 + 2x2 < 480 minutes
- Machine Y is available for maximum 8 hours during any working day - Non-negativity restrictions are,
x1 > 0 and x2 > 0
- Formulate the problem as a LP problem.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


135 136
Example 30:
Complete LP model is,
- Hot dog mixture in 1000-pound batches.
Maximize Z = 4x1 + 5x2 - Two ingredients, chicken ($3/lb) and beef ($5/lb),
- Recipe requirements:
at least 500 pounds of chicken
subject to:
at least 200 pounds of beef.
2x1 + 2x2 < 330 minutes - Ratio of chicken to beef must be at least 2 to 1.

3x1 + 2x2 < 480 minutes - Determine optimal mixture of ingredients that will
minimize costs.
x1 > 0

x2 > 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
137 138

Step 3: Establish Model Constraints


x1 + x2 = 1,000 lb
Solution:
x1 500 lb of chicken
Step 1: Identify decision variables.
x2 200 lb of beef
x1 = lb of chicken
x1/x2 2/1 or x1 - 2x2 0
x2 = lb of beef x1,x2 0
The model: minimize Z = $3x1 + 5x2

Step 2: Formulate the objective function. subject to


x1 + x2 = 1,000 lb
minimize Z = $3x1 + 5x2
x1 50
where Z = cost per 1,000-lb batch
x2 200
$3x1 = cost of chicken x1 - 2x2 0
5x2 = cost of beef x1,x2 0

EE 477 Dr. Mohamed Zribi


EE 477 Dr. Mohamed Zribi
139 140
Example 31: All products manufactured are shipped out of the storage area at the
The N. Dustrious Company produces two products: I and II. The
end of the day. Therefore, the two products must share the total raw
raw material requirements, space needed for storage, production
rates, and selling prices for these products are given in Table 1. material, storage space, and production time. The company wants to
determine how many units of each product to produce per day to
maximize its total income.

Solution:
• The company has decided that it wants to maximize its sale
income, which depends on the number of units of product I and II
The total amount of raw material available per day for both products
that it produces.
is 15751b. The total storage space for all products is 1500 ft2, and a
maximum of 7 hours per day can be used for production.
• Therefore, the decision variables, x1 and x2 can be the number of
EE 477 Dr. Mohamed Zribi
141 units of products I and II, respectively, produced per day. 142

• This must be less than or equal to the total amount of raw


• The object is to maximize the equation: material available, which is 1575 Lb. Therefore,
Z = 13x1 + 11x2 5x1 + 3x2 1575
subject to the constraints on storage space, raw materials, and • Prouct I can be produced at the rate of 60 units per hour.
production time. Therefore, it must take I minute or 1/60 of an hour to produce I
unit. Similarly, it requires 1/30 of an hour to produce 1 unit of
product II. Hence a total of x1/60 + x2/30 hours is required for the
• Each unit of product I requires 4 ft2 of storage space and each unit of
daily production. This quantity must be less than or equal to the
product II requires 5 ft2. Thus a total of 4x1 + 5x2 ft2 of storage space is
needed each day. This space must be less than or equal to the available total production time available each day. Therefore,
storage space, which is 1500 ft2. Therefore, x1 /60 + x2 /30 7
4x1 + 5x2 1500 or x1 + 2x2 420
• Similarly, each unit of product I and II produced requires 5 and 3 1bs,
• Finally, the company cannot produce a negative quantity of any
respectively, of raw material. Hence a total of 5xl + 3x2 Ib of raw
material is used. product, therefore x1 and x2 must each be greater than or equal to
EE 477 Dr. Mohamed Zribi
zero.
EE 477 Dr. Mohamed Zribi
143 144
Example 32:
Solution:

Need: Energy (2000 kcal),


Protein (55 g),
Calcium (800 mg)
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
145 146

Example 33: Media selection problem


A company has budgeted up to $8000 per week for local
advertisement. The money is to be allocated among four
promotional media: TV spots, newspaper ads, and two types of
radio advertisements. The company goal is to reach the largest
possible high-potential audience through the various media. The
following table presents the number of potential customers
reached by making use of advertisement in each of the four
media. It also provides the cost per advertisement placed and the
maximum number of ads than can be purchased per week.

EE 477 Dr. Mohamed Zribi


EE 477 Dr. Mohamed Zribi
147 148
Solution:
Let
x1 = number of 1-miute TV spots taken Each week
Medium Audience Cost per Maximum
x2 = number of full-page daily newspaper ads taken each week.
Reached per ad ads per
week x3 = number of 30-second prime-time radio spots taken each week.
ad
x4 = number of 1-minute afternoon radio spots taken each week.
TV spot (1 minute) 5000 800 12

Daily newspaper 8500 925 5 Max Z = 5000 x1 + 8500 x2 + 2400 x3 + 2800 x4


(full-page ad) st
x1 12 (maximum TV spots/week)
Radio spot 2400 290 25 x2 5 (maximum newspaper ads/week)
(30 second, prime time) x3 25 (maximum 30-second radio spots/week)
Radio spot 2800 380 20 x4 20 (maximum 1-minute radio spots/week)
(1 minute, afternoon) 800 x1 + 925 x2 + 290 x3 + 380 x4 8000 (weekly budget)
x3 + x4 5 (minimum radio spots contracted)
The company arrangements require that at least five radio spots be 290 x3 + 380 x4 1800 (maximum dollars spent on radio)
placed each week. To ensure a board-scoped promotional x1 , x2 , x3 , x4 0
campaign, management also insists that no more than $1800 be The optimal solution is: x1 = 1.97, x2 = 5, x3 =6.2, and x4 = 0, Z = 67240
spent on radio advertising every
EE 477 week.
Dr. Mohamed Zribi
149
EE 477 Dr. Mohamed Zribi
150

Example 34: Assignment problem


Client case
A law firm maintains a large staff of young attorneys who hold
the title of junior partner. The firm concerned with the effective
Lawyer Divorce Corporate embezzlement exhibitionism
utilization of this personnel resources, seeks some objective
merger
means of making lawyer-to-client assignments. On march 1, four
new clients seeking legal assistance came to the firm. While the Adam 6 2 8 5
current staff is overloads and identifies four junior partners who,
although busy, could possibly be assigned to the cases. Each Brook 9 3 5 8
young lawyer can handle at most one new client. Furthermore
each lawyer differs in skills and specialty interests.
Carter 4 8 3 4

Darwin 6 7 6 4
Seeking to maximize the overall effectiveness of the new client
assignment, the firm draws up the following table, in which he
rates the estimated effectiveness (of a scale of 1 to 9) of each
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
lawyer on each new case. 151 152
Solution: Max Z = 6 x11 + 2 x12 + 8 x13 + 5 x14 + 9 x21 + 3 x22 +
5 x23 + 8 x24 + 4 x31 + 8 x32 + 3 x33 + 4 x34 +
Decision variables: 6 x41 +7 x42 + 6 x43 + 4 x44
St.
x11 + x21 + x31 + x41 = 1 (divorce case)
x12 + x22 + x32 + x42 = 1 (merger)
Let xij = 1 if attorney i is assigned to case j x13 + x23 + x33 + x43 = 1 (embezzlement)
0 otherwise x14 + x24 + x34 + x44 = 1 (exhibitionism)

Where : i = 1, 2, 3, 4 stands for Adam, Brook, Carter, and x11 + x12 + x13 + x14 = 1 (Adam)
x21 + x22 + x23 + x24 = 1 (Brook)
Darwin respectively x31 + x32 + x33 + x34 = 1 (Carter)
j = 1, 2, 3, 4 stands for divorce, merger, x41 + x42 + x43 + x44 = 1 (Darwin)
embezzlement, and exhibitionism respectively.
The optimal solution is: X13 = X24 = X32 = X41 = 1. All other variables
are equal to zero.
The LP formulation will be as follows:

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


153 154

Example 35: Transportation problem


The Top Speed Bicycle Co. manufactures and markets a line of 10-
speed bicycles nationwide. The firm has final assembly plants in
two cities in which labor costs are low, New Orleans and Omaha.
Its three major warehouses are located near the larger market New Chicago Los
areas of New York, Chicago, and Los Angeles. York Angeles
New Orleans 2 3 5
The sales requirements for next year at the New York warehouse are
10000 bicycles, at the Chicago warehouse 8000 bicycles, and at Omaha 3 1 4
the Los Angeles warehouse 15000 bicycles. The factory capacity
at each location is limited. New Orleans can assemble and ship
20000 bicycles; the Omaha plant can produce 15000 bicycles per
year. The cost of shipping one bicycle from each factory to each The company wishes to develop a shipping schedule
warehouse differs, and these unit shipping costs are:
that will minimize its total annual transportation cost.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
155 156
Solution:
To formulate this problem using LP, we again employ the concept of Min Z = 2 x11 + 3 x12 + 5 x13 + 3 x21 + x22 + 4 x23
double subscribed variables. We let the first subscript represent the
origin (factory) and the second subscript the destination
(warehouse). Thus, in general, xij refers to the number of bicycles St
shipped from origin i to destination j. Therefore, we have six x11 + x21 = 10000 (New York demand)
decision variables as follows: x12 + x22 = 8000 (Chicago demand)
x13 + x23 = 15000 (Los Angeles demand)
x11 = # of bicycles shipped from New Orleans to New York x11 + x12 + x13 20000 (New Orleans Supply
x12 = # of bicycles shipped from New Orleans to Chicago x21 + x22 + x23 15000 (Omaha Supply)
x13 = # of bicycles shipped from New Orleans to Los Angeles
x21 = # of bicycles shipped from Omaha to New York xij 0 for i = 1, 2 and j = 1, 2, 3
x22 = # of bicycles shipped from Omaha to Chicago
x23 = # of bicycles shipped from Omaha to Los Angeles The optimal solution is: x11 = 10000, x12 = 0, x13 = 8000, x21 =
0, x22 = 8000, x23 = 7000, and Z = $96000

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


157 158

Example 36: Portfolio selection


Investment Interest Maximum
The International City Trust (ICT) invests in short-term trade
earned investment
credits, corporate bonds, gold stocks, and construction loans. To % ($ Million)
encourage a diversified portfolio, the board of directors has placed
Trade credit 7 1
limits on the amount that can be committed to any one type of Corporate bonds 11 2.5
investment. The ICT has $5 million available for immediate
Gold stocks 19 1.5
investment and wishes to do two things: (1) maximize the interest Construction loans 15 1.8
earned on the investments made over the next six months, and (2)
satisfy the diversification requirements as set by the board of In addition, the board specifies that at least 55% of
the funds invested must be in gold stocks and
directors. The specifics of the investment possibilities are:
construction loans, and that no less than 15% be
EE 477 Dr. Mohamed Zribi
invested in trade credit.
EE 477 Dr. Mohamed Zribi
159 160
Solution:
Max Z = 0.07 x1 + 0.11 x2 + 0.19 x3 + 0.15 x4
St.
To formulate ICT’s investment problem as a linear x1 1
programming model, we assume the following x2 2.5
decision variables: x3 1.5
x4 1.8
x1 = dollars invested in trade credit x3 + x4 0.55(x1 + x2 + x3 + x4)
x1 0.15(x1 + x2 + x3 + x4)
x2 = dollars invested in corporate bonds
x3 = dollars invested in gold stocks x1 + x2 + x3 + x4 5
xi 0 , i = 1, 2, 3, 4
x4 = dollars invested in construction loans
The optimal is: x1 = 75,000, x2 = 950,000, x3 = 1,500,000, and x4 =
1,800,000, and total interest Z = 712,000
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
161 162

Integer Programming Example 37: Integer Programming

Classic Knapsack Problem:


Key characteristic of an Integer Program (IP) or Mixed Integer Item Value ($) Weight (lbs)
Linear Program (MILP): You want to maximize the value A 15 18

of items you can pack into a B 20 10


One or more of the decision variable must be integer. single suitcase (or knapsack). C 18 21
However, you are limited to a D 13 11
In some cases a problem that requires an Integer solution can be weight of 50 Kg. E 12 11
solved as a Linear program.
xi = 0 if not chosen
When rounding off a real number to an integer number has no = 1 if put in knapsack
“effect” on your solution?
Max 15 x A 20 xB 18 xC 13 xD 12 xE
s.t. 18 x A 10 xB 21xC 11xD 11xE 50
EE 477 Dr. Mohamed Zribi
x A , xB , xC , xD , xEEE477 0Dr.or 1
Mohamed Zribi
163 164
Classic Knapsack Problem: If integer constraint relaxed -
Classic Knapsack Problem: With integer constraint -

Max 15 x A 20 xB 18 xC 13xD 12 xE Max 15 x A 20 xB 18 xC 13xD 12 xE


s.t. 18 x A 10 xB 21xC 11xD 11xE 50 s.t. 18 x A 10 xB 21xC 11xD 11xE 50
x A , xB , xC , xD , xE 0 x A , xB , xC , xD , xE 0 or 1
x A , xB , xC , xD , xE 1 LP OPTIMUM FOUND AT STEP 4 OBJECTIVE FUNCTION VALUE

OBJECTIVE FUNCTION VALUE 1) 60.00000

1) 60.42857 VARIABLE VALUE


XA 1.000000
VARIABLE VALUE XB 1.000000
XA 0.000000 XC 0.000000
XB 1.000000 XD 1.000000
XC 0.857143 XE 1.000000
XD 1.000000
XE 1.000000

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


165 166

Classic Knapsack Problem: Example 38: Trim Loss problem


Max 15 x A 20 xB 18 xC 13 xD 12 xE
s.t. 18 x A 10 xB 21xC 11xD 11xE 50 A company has to manufacture the circular tops of cans. Two
x A , xB , xC , xD , xE 0 or 1 sizes, one of diameter 10 cm and the other of diameter 20 cm are
required. They are to be cut from metal sheets of dimensions 20
How would you modify this formulation if you
realized that you could not select item A without cm by 50 cm. The requirement of smaller size is 20,000 and of
selecting item D? larger size is 15,000. The problem is : how to cut the tops from
Add constraint: xA ≤ xD
the metal sheets so that the number of sheets used is a minimum.
How would you modify if you could select at most 3 Formulate the problem as a LPP.
items?
Add constraint: xA + xB + xC + xD + xE ≤ 3
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
167 168
Solution: A sheet can be cut into one of the following three patterns:
Pattern I: cut into 10 pieces of size 10 by 10 so as to make 10
10
tops of size 1
10
Pattern I
Pattern II: cut into 2 pieces of size 20 by 20 and 2 pieces of size

Pattern II 20 10 by 10 so as to make 2 tops of size 2 and 2 tops of size 1


10
20 10 Pattern III: cut into 1 piece of size 20 by 20 and 6 pieces of size

Pattern III 10
10 by 10 so as to make 1 top of size 2 and 6 tops of size 1
20
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
169 170

So assume that x1 sheets are cut according to pattern I, x2 according Example 39: Mo’s Programming
to pattern II, x3 according to pattern III Mo's Programming has five idle Programmers and four custom
Programs to develop. The estimated time (in hours) it would take
The problem is to each Programmer to write each Program is listed below. (An 'X' in
the table indicates an unacceptable Programmer-Program
assignment.)
Minimize Z = x1 + x2 + x3 Programmer
Program 1 2 3 4 5
Subject to 10 x1 + 2 x2 + 6 x3 ≥ 20,000 Java 19 23 20 21 18
C++ 11 14 X 12 10
2 x2 + x3 ≥ 15,000 Assembler 12 8 11 X 9
Pascal X 20 20 18 21
x1, x2, x3 ≥ 0, integers
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
171 172
Formulate an integer program for determining the Programmer- Define the decision variables
Program assignments that minimize the total estimated time xij = 1 if Program i is assigned to Programmer j
= 0 otherwise.
spent writing the four Programs. No Programmer is to be
Number of decision variables =
assigned more than one Program and each Program is to be [(number of Programs)(number of Programmers)]
worked on by only one Programmer. - (number of unacceptable assignments)
= [4(5)] - 3 = 17

Solution: Define the objective function


This problem can be formulated as a 0-1 integer program. The Minimize total time spent writing Programs:
LP solution to this problem will automatically be integer (0-1). Min 19x11 + 23x12 + 20x13 + 21x14 + 18x15 + 11x21

+ 14x22 + 12x24 + 10x25 + 12x31 + 8x32 + 11x33

EE 477 Dr. Mohamed Zribi


+ 9x35 + 20x42 + 20x43 + 18x44 + 21x45
173 EE 477 Dr. Mohamed Zribi 174

Define the Constraints • Define the Constraints (continued)


Exactly one Programmer per Program: No more than one Program per Programmer:
1) x11 + x12 + x13 + x14 + x15 = 1 5) x11 + x21 + x31 < 1
2) x21 + x22 + x24 + x25 = 1 6) x12 + x22 + x32 + x42 < 1
3) x31 + x32 + x33 + x35 = 1 7) x13 + x33 + x43 < 1
4) x42 + x43 + x44 + x45 = 1 8) x14 + x24 + x44 < 1
9) x15 + x25 + x35 + x45 < 1
Non-negativity:
xij > 0 for i = 1, . . ,4 and j = 1, . . ,5
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
175 176
Example 40: Charity Work

The local college’s School of American Craftsman has decided to


participate seriously in a local charity event by manufacturing Resources Desk Table Chair
special commemorative desks, tables, and chairs. Resources are
Lumber (Board 8 6 1
restricted as shown in the next table. The local lumber feet)

cooperative has donated 48 board feet of lumber. Faculty and


Finishing hours 4 2 1.5
staff have volunteered 20 finishing hours and 8 carpentry hours.
(hours)
The desk will be sold for $60, the table $30 and the chair for $20.
The school does not expect to sell more than 5 tables. How does Carpentry (hours) 2 1.5 0.5

the school should do to maximize the profit?


EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
177 178

Solution: MATLAB Code


max z 60 x1 30 x2 20 x3
s.t. 8 x1 6 x2 x3 48 b=[48;20;8;5];

4 x1 2 x2 1.5 x3 20 Aeq=[];beq=[];

2 x1 1.5 x2 0.5 x3 8 UB=[Inf Inf Inf]';LB=[0 0 0]';

f=[-60;-30;-20];
x2 5
A=[8 6 1;4 2 1.5;2 1.5 0.5;0 1 0];
x1 , x2 , x3 0
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=LINPROG(f,A,b,Aeq,beq,LB,UB);

X'

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


179 180
>> Optimization terminated successfully.

ans =
2.0000 0.0000 8.0000
Example 41: Rappaport Communications
ans =
0.0000 • Rappaport Communications provides cellular phone
10.0000
10.0000 service in several mid-western states.
0.0000
• The want to expand to provide inter-city service between
Optimization terminated successfully.
ans = four cities in northern Ohio.
0.0000 10.0000 10.0000 0.0000
• A new communications tower must be built to handle these
ans =
2.0000 inter-city calls.
0.0000
8.0000
• The tower will have a 40 mile transmission radius.

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


181 182

Graph of the Tower Location Problem


Y Solution:
50

Cleveland Defining the Decision Variables:


x=5, y=45
40

30
x1 = location of the new tower with respect to the x-axis
Youngstown
Akron
x=12, y=21 x=52, y=21 y1 = location of the new tower with respect to the y-axis
20

10
Canton
x=17, y=5
0
40
X
0 10 20 30 50 60
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
183 184
Defining the Objective Function: Defining the Constraints

• Cleveland
• Minimize the total distance from the new tower to the 5-X
2
45 Y
2
40
1 1

existing towers • Akron


min: 5- X
1
2
45 Y
1
2
12 - X
1
2
21 Y
1
2 12 - X
1
2
21 Y
1
2
40

2 2 2 2
• Canton
17 - X 5 Y 52 - X 21 Y
1 1 1 1 2 2
17 - X 5 Y 40
1 1

• Youngstown
2 2
52 - X 21 Y 40
1 1

EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi


185 186

You might also like