0% found this document useful (0 votes)
8 views36 pages

Chapter 2 - Introduction To LP

Uploaded by

zqweo23
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)
8 views36 pages

Chapter 2 - Introduction To LP

Uploaded by

zqweo23
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/ 36

Chapter 2

Introduction to Linear Programs

Prof. Hai Yang


Department of Civil and Environmental Engineering
HKUST

1
Mathematical Models

• Not physical models


• Describe a system of interest
using mathematical concepts
and language
• Applied in nature sciences,
engineering disciplines,
social sciences, etc.
• Classified from different
perspectives, i.e.,
functionality, certainty of
data used, etc.

2
Koopmans and Kantorovich, Nobel Prize in Economics in 1975
“for their contributions to the theory of optimum allocation of resources”

3
Key Elements of Mathematical Models

Decision Objective Functions Optimal Results of


Variables (Decision Variables) System Objectives

Mathematical
System Inputs Models System Outputs

Controllable System Optimal Values


Inputs Objectives of Objectives

Values of
Uncontrollable System Controllable
Inputs Constraints Inputs

Corresponding Decision
Exogenous Variables Constraint Functions
Variables of Optimal
(Parameters/Constants) (Decision Variables)
System Objectives
4
Mathematical Representations

• Decision Variables

• Exogenous Variables
(Parameters/Constants)

• Objective Functions are with


respect to decision variables

• Constraint Functions are


dependent on decision
variables

5
Linearity of Functions

• For simplicity, linear functions are those in which each


variable appears in a separate term raised to the first
power and is multiplied by a constant (which could be 0)
𝑓 𝑥1 , ⋯ , 𝑥𝑗 , ⋯ , 𝑥𝐽 = 𝑐1 𝑥1 + ⋯ + 𝑐𝑗 𝑥𝑗 + ⋯ + 𝑐𝐽 𝑥𝐽

• Check the linearity of the following functions


5𝑥1 + 7𝑥2 + 9𝑥3
5𝑥12 + 7𝑥2 + 9𝑥3
5𝑥1 𝑥2 + 9𝑥3

6
Linear Programs

• Mathematical models are Objective function Decision variables


linear programs if the with respect to x1 x1 and x2
objective functions and the and x2

constraint functions are all


linear functions with respect
to decision variables
– A group of decision variables
(generally nonnegative), which
represent an alternative
decision or plan
– The maximization or
minimization of some quantity
is the objective
– Constraints that limit the Constraint functions
degree to which the objective with respect to x1
can be pursued and x2
7
Various Applications of Linear Programs

8
Balancing study and other activities (linear programs for time allocation)
Problem Statement

• I have 10 productive hours per day to allocate among


study (x1), dating (x2), and private tutoring (x3). For each
hour of dating, I would need to spend $150, and for each
hour of private tutoring, I will make $120.

• To maintain my relationship with my G/B friend, at least I


need to spend one hour per day with her/him

• To maintain my CGA at an acceptable level, at least I need


to spend 2 hours per day on academic studies.

9
Linear Programs for Time Allocation

• Time constraint: x1 + x2 + x3  10

• Budget constraint: 150 x2 − 120 x3  0

• Dating constraint: x2  1

• Study constraint: x1  2

10
Linear Programs for Time Allocation

• What should I do if I want to x* = ( x1* , x2* , x3* )


– Maximize money saving for the future
max120 x3 − 150 x2 x* = (2,1,7)
– Maximize my academic performance
max x1 x* = (7.75,1,1.25)
– Maximize my dating life
max x2 x* = (2,3.6, 4.4)
– Maximize a combination of my academic performance,
dating, and money saving
max a1 x1 + a2 x2 + a3 x3

11
Mixing Gravels to Produce an Aggregate (Linear Programs)
Problem Statement

• An aggregate mixture of a defined composition (ranges for


different materials) is needed for a construction project
Material Coarse Fine Sand
Name Material Material
Range 48%-55% 30%-35% 15-20%

• Four sources are available for the project with different


compositions
% Coarse % Fine % Sand Cost($/pound)
Source 1 35 30 35 0.20
Source 2 10 50 40 0.30
Source 3 60 30 10 0.45
Source 4 50 35 15 0.65
12
Coarse Material
48%-55%

Fine Material
30%-35%

Aggregate Mixture Sand Material


15-20%

13
Mixing Gravels to Produce an Aggregate (Linear Programs)
Problem Statement (cont.)

• It is costly to separate the levels of Source Source


size and then re-blend them in the 1 2
desired mixture
• Assume that the project manager
1000
wants to order from the four pounds
sources to make 1000 pounds of aggregate
the aggregate
• Also the project manager wants to
Source Source
spend the least money to make the 3 4
amount of aggregate

14
Source 1 Source 2 Source 3 Source 4

Coarse 35% Coarse 10% Coarse 60% Coarse 50%


Fine 30% Fine 50% Fine 30% Fine 35%
Sand 35% Sand 40% Sand 10% Sand 15%

1000 pounds of aggregate needed

How to choose
the amount of
aggregate from
each source to
minimize the
Coarse 48%-55% total cost ?
Fine 30%-35%
Sand 15-20%
15
Mixing Gravels to Produce an Aggregate (Linear Programs)
System Analysis
• Decision variables: amount of aggregate ordered from four
sources
– xj is the amount of aggregate from the j-th source
• Objective function: the least money spend on the aggregate
– Minimize 0.20x1+0.30x2+0.45x3+0.65x4
• Constraint functions
– 1000 pounds aggregates: x1+x2+x3+x4=1000
– Composition requirement of coarse material (example)

16
Mixing Gravels to Produce an Aggregate (Linear Programs)
Mathematical Representation of the Linear Program
Objective
Decision Variables Linear or not
Function

Constraint
Functions Linear or not 17
Mixing Gravels to Produce an Aggregate (Linear Programs)
Solution to the Linear Program

Optimal values of cost

x1* = 400
x2* = 0
Values of decision
variables with the x3* = 600
optimal solution
x4* = 0

18
Mixing Gravels to Produce an Aggregate (Multiple Objectives LP)
Problem Statement & Analysis

• Further to the previous example, the project manager has


another concern to minimize the amount of material taken
from Source 1 and Source 3 due to special reasons
• Then the objective functions change to
– Minimize the cost of the 1000 pounds aggregate
– Minimize the material from Source 1 and Source 3

19
Mixing Gravels to Produce an Aggregate (Multiple Objectives LP)
Mathematical Representation
Objective
Decision Variables Linear or not
Functions

Constraint
Functions Linear or not 20
Cutting Plywood (Integer Programming)
Problem Statement

• One construction material company tends to provide


precut pieces for different furniture components and
their weekly demand is also shown in the table
Furniture Size (dimension in Weekly Demand
Component feet)
Shelving 1×4 200
Small desk tops 2×4 40
Large desk tops 3×6 30
Table tops 4×4 20

• A standard plywood sheet used for cutting is 8 ft. × 4 ft.


and the manager wants to use the least number of this
kind of plywood sheet
21
Cutting Plywood (Integer Programming)
Problem Statement (Cont.)

• There are ten cutting patterns available in the company


and the yields of each pattern are summarized as
follows
Furniture Cutting Patterns and Yield
Components Size #1 #2 #3 #4 #5 #6 #7 #8 #9 #10
Shelving 1×4 8 6 0 4 2 2 0 0 1 3
Small desk 2×4 0 1 0 2 1 3 2 4 1 0
tops
Large desk 3×6 0 0 0 0 0 0 0 0 1 1
tops
Table tops 4×4 0 0 2 0 1 0 1 0 0 0

8 22
Cutting Plywood (Integer Programming)
System Analysis

• Decision variables: number of plywood sheets for


different cutting patterns
– xj is the number of plywood for the j-th cutting pattern
• Objective function: the least number of plywood
sheets
– Minimize 𝑍 = 𝑥1 + ⋯ + 𝑥10 = σ10
𝑗=1 𝑥𝑗

• Constraint functions
– Weekly demand for different kinds of furniture
components (table tops): 2𝑥3 + 𝑥5 + 𝑥7 ≥ 20
– All xj are the positive integers

23
Cutting Plywood (Integer Programming)
Mathematical Representation of Integer Programming

Objective
Decision Variables Linear or not
Function

Constraint
Functions Linear or not 24
Cutting Plywood (Integer Programming)
Solution to the Integer Programming Problem

The least number of Z * = 64


plywood sheets used

x1* = 3
x2* = 18
x3* = 10
Values of decision
variables with the x8* = 3
optimal solution
x9* = 11
x10* = 19
x*j = 0 for j =4,5,6,7
25
Selecting Projects for Bidding (Zero-One Programming)
Problem Statement
• A company plans to bid for several projects out of 8
possible ones within its limits of time for preparing the
bids, skilled labors, and cranes. The potential profits of
them are presented as follows:
Project No. Time to Prepare Bid Skilled Labor Needed Crane Profit
(Person-week) (103) (103)
#1 8 6 1 80
#2 12 5 0 110
#3 13 4 1 100
#4 11 7 0 90
#5 9 8 0 70
#6 7 3 1 80
#7 8 4 1 90
#8 8 5 1 60
26
Selecting Projects for Bidding (Zero-One Programming)
Problem Statement

• Assume that once submitting a bid, the company will


get the project due to its good reputation, etc.

• The total time for preparing bids, skilled labors and


cranes available in the company is 50 person-weeks,
30,000 hours of skilled labor, and 3 cranes respectively

• The manager wants to maximize the profits through


choosing the optimal combination of projects to bid for.

27
Selecting Projects for Bidding (Zero-One Programming)
System Analysis
• Decision variables: whether to bid one project or not
– xj is the decision to bid the j-th project, 1 for bidding, 0
for not bidding
• Objective function: the maximum profit
– Maximize 𝑍 = 80𝑥1 + ⋯ + 60𝑥8 = σ8𝑗=1 𝑝𝑗𝑥𝑗

• Constraint functions
– Resource constraints (crane limits): 𝑥1 + 𝑥3 + 𝑥6 + 𝑥7 +
𝑥8 ≤ 3
– All xj are either 1 or 0

28
Selecting Projects for Bidding (Zero-One Programming)
Mathematical Representation
Objective
Decision Variables Linear or not
Function

Constraint
Functions Linear or not 29
Selecting Projects for Bidding (Zero-One Programming)
Solution to the Zero-One Programming Problem

The maximum profit Z * = 45, 000


of bidding

x2* = 1
x3* = 1
Values of decision x5* = 1
variables with the
optimal solution
x6* = 1
x7* = 1
x*j = 0 for j =1,4,8

30
The Transportation Problem (LP Models of Network Flow)
Problem Statement

𝑐𝑖𝑗 : unit transportation cost from i to j

31
The Transportation Problem (LP Models of Network Flow)
Problem Statement (Cont.)

• The monthly availability of the construction material


at warehouse are a1, a2, and a3 for warehouse A,
warehouse B, and warehouse C respectively.

• The monthly required amount of the construction


material in construction sites are b1, b2, and b3 for site
1, site 2, and site 3 respectively.

• The manager wants to deliver the construction


material with the least cost.

32
The Transportation Problem (LP Models of Network Flow)
System Analysis
• Decision variables: the amount of construction material
delivered from warehouse to construction site
– xij is the amount of the construction material delivered from the
i-th warehouse to the j-th construction site

• Objective function: the least cost


– Minimize 𝑍 = 𝑐11𝑥11 + ⋯ + 𝑐33𝑥33 = σ3𝑖=1 σ3𝑗=1 𝑐𝑖𝑗𝑥𝑖𝑗

• Constraint functions
– Construction material availability at warehouses:
𝑥11 + 𝑥12 + 𝑥13 ≤ 𝑎1
– Construction material required by construction sites:
𝑥11 + 𝑥21 + 𝑥31 ≥ 𝑏1
33
The Transportation Problem (LP Models of Network Flow)
Mathematical Representation

Objective
Decision Variables Linear or not
Function

Linear or not
Constraint
Functions

34
Summary

35
Summary

• Key elements of a mathematical model


– Decision variables and exogenous variables
– Objective functions and constraint functions
• Linear programs
– Both objective functions and constraint functions are
linear with respect to decision variables
– Linear programs include special cases, i.e., integer
programs, zero-one programs, linear programs of
network flow, linear programs with multiple objectives
– Linear programs are widely applied in many industries

36

You might also like