Sei sulla pagina 1di 9

ISyE 323 Lecture #2

Announcements
ISyE 323 Lecture #2
First homework assignment will be posted on the course web site
this weekend, due Tues. Sep. 16

Prof. Jim Luedtke

There will be a 10 min. quiz Sep. 16, at beginning of class

Readings

September 4, 2014

Today: 3.1 3.2

For next Tuesday: 3.3 3.4

ISyE 323 Lecture #2


ISyE 323 Lecture #2

ISyE 323 Lecture #2

Outline

Giapettos Woodcarving Example (Section 3.1)

Outline

Outline

Giapettos Woodcarving Example (Section 3.1)


Problem Statement
Formulating the Model

Giapettos Woodcarving Example (Section 3.1)


General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

LP Solution Concepts

LP Solution Concepts

ISyE 323 Lecture #2

ISyE 323 Lecture #2

ISyE 323 Lecture #2

ISyE 323 Lecture #2

Giapettos Woodcarving Example (Section 3.1)

Giapettos Woodcarving Example (Section 3.1)

Problem Statement

Problem Statement

Example 1

Problem Definition
The problem:

Giapettos Woodcarving.
I

Produces wooden soldiers ($27) and trains ($21)

Unit Costs
I
I

Soldiers: $10 materials, $14 labor


Trains: $9 materials, $10 labor

Limited labor resources: Finishing (100 hrs/wk) and


Carpentry (80 hrs/wk)

Demand for trains is unlimited (e.g., my sons)

At most 40 soldiers/wk can be sold

ISyE 323 Lecture #2

Choose production quantity of each product

To maximize weekly profit

Subject to capacity restrictions on the labor resources

We might find:

ISyE 323 Lecture #2

It is optimal to produce both products

It is optimal to max out capacity with one product and not


produce the other

It is optimal to produce neither product (cant turn a profit)

There is not enough capacity to produce either product (the


problem is infeasible)

ISyE 323 Lecture #2

ISyE 323 Lecture #2

Giapettos Woodcarving Example (Section 3.1)

Giapettos Woodcarving Example (Section 3.1)

Problem Statement

Problem Statement

Data Requirements

Data Requirements, contd

We need to know:

Summarized Data

Number of hours each labor resource is available per week

Number of hours of each labor resource is required to produce


one unit of each type of product

Minimum and maximum number of each product that can be


sold

Net profit of each product produced

ISyE 323 Lecture #2

Production Time
(hrs/unit)

Resource
Finishing
Carpentry
Profit per unit
Maximum units

ISyE 323 Lecture #2

Soldiers
2
1
$3
40

Trains
1
1
$2

Available Hours
100
80

ISyE 323 Lecture #2

ISyE 323 Lecture #2

Giapettos Woodcarving Example (Section 3.1)

Giapettos Woodcarving Example (Section 3.1)

Formulating the Model

Formulating the Model

Decision Variables

Objective Function
I

We want to maximize weekly profit

Weekly profit (in $) is given by

Let
I
I

3x1 + 2x2

x1 = number of soldiers produced per week


x2 = number of trains produced per week

We dont know the values of x1 and x2 yetthe model is


supposed to decide

These are called decision variables

ISyE 323 Lecture #2

(recall: soldiers net $3 each, trains net $2 each)


I

So we want to
maximize z = 3x1 + 2x2

ISyE 323 Lecture #2

This is called the objective function

The numbers multiplying the decision variables (3 and 2) are


called objective function coefficients

ISyE 323 Lecture #2

10

ISyE 323 Lecture #2

Giapettos Woodcarving Example (Section 3.1)

Giapettos Woodcarving Example (Section 3.1)

Formulating the Model

Formulating the Model

Constraints

The Linear Program

I Finishing time: at most 100 hours/week

maximize z = 3x1 + 2x2


subject to
2x1 + x2
x1 + x2
x1
x1
x2

I Soldiers require 2 hour/soldier, trains require 1 hour/train


I To avoid exceeding the finishing capacity, we have to say:

2x1 + x2 100
Check the units!
I Similarly, for carpentry:

x1 + x2 80

I We can sell at most 40 soldiers:


I These are called constraints

x1 40

I
I

I Also, the production amounts have to be non-negative:

I These are called sign restrictions (special type of constraint)


ISyE 323 Lecture #2

I
11

100
80
40
0
0

This is called a linear program (LP)


Linear because the objective function and constraints are all
linear functions of the decision variables
I

x1 0, x2 0

f (x1 , x2 , . . . , xn ) = c1 x1 + c2 x2 + + cn xn

No x21 , x2 , x1 x2 , etc.

Program: Historically plan

ISyE 323 Lecture #2

12

ISyE 323 Lecture #2

ISyE 323 Lecture #2

Giapettos Woodcarving Example (Section 3.1)

General LP Models and Assumptions (Section 3.1)

Formulating the Model

Linear inequalities

Outline

Constraints that can be rearranged to obtain the form:


c1 x2 + c2 x2 + + cn xn b

Giapettos Woodcarving Example (Section 3.1)

c1 x2 + c2 x2 + + cn xn b

General LP Models and Assumptions (Section 3.1)


Proportionality
Additivity
Divisibility
Certainty

or
are called linear inequalities.

Are these linear inequalities?


I 2.2x1 + 5x2 3x3 5.5
I 2x1 + ex2 x3 3
I 2x1 + 8x2 + 9x1 5 + 2x3
I

LP Solution Concepts

x1
2x4 2
x1 + 2x2 + 5x3

ISyE 323 Lecture #2

13

ISyE 323 Lecture #2

ISyE 323 Lecture #2

14

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

What is an optimization model?

A note on notation

Every optimization problem consists of:


Standard notation used in generic LP modeling

1. Decision variables we need to find the values of


2. An objective function we want to maximize or minimize
3. Constraints on the allowed values of the decision variables
A Linear Programming Problem (LP) is an optimization
problem in which:
I

the objective function is a linear function,

the constraints are linear inequalities,

decision variables either have a sign restriction or are


unresticted in sign (urs).

ISyE 323 Lecture #2

xj : decision variable j

cj : objective coefficient for decision variable j

aij : contribution a unit of decision variable j makes to


constraint i

bi : right-hand side of constraint i i.e., the limit of resource i

cj , aij , and bi are all parameters: also called data, constants, or


inputs

15

ISyE 323 Lecture #2

16

ISyE 323 Lecture #2

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)


Proportionality

A generic LP model

LP assumes proportionality

Objective:

Proportionality Assumption
I The contribution of each decision variable to the objective
function is proportional to the value of the decision variable.

maximize

z=

c1 x1

c2 x2

...

cn xn

Constraints:
subject to

a11 x1
a21 x1

+
+

a12 x2
a22 x2

+
+

...
...

+
+

a1n xn
a2n xn

am1 x1

am2 x2

...

amn xn

..
.

b1
b2

The contribution of each decision variable to the left-hand


side of each constraint is proportional to the value of the
decision variable.
Contribution
of xj to Z

bm

12

Sign restrictions:
9

x1
x2
xn

..
.

0
0

E.g., Objective
function: 3xj

0
1

ISyE 323 Lecture #2

17

ISyE 323 Lecture #2

xj

ISyE 323 Lecture #2

18

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

Proportionality

Proportionality

Start-up costs violate


proportionality
(

Increasing marginal profits violate proportionality


Objective function: 3x1.5
j

3xj 1, if xj > 0
0,
if xj = 0

Objective function:

Contribution
of xj to Z
Contribution
of xj to Z
12

ISyE 323 Lecture #2

xj

19

ISyE 323 Lecture #2

xj

20

ISyE 323 Lecture #2

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

Proportionality

Proportionality

Quantity discounts violate proportionality

Is proportionality a reasonable assumption?

Contribution
of xj to Z

Often real-life problems violate proportionality in one or more


of these ways.

But its often reasonable to assume proportionality even if its


violated.

There are ways of handling some forms of non-proportionality


in an LP.

Otherwise, use mixed-integer programming (Chapter 9) or


nonlinear programming (Chapter 11).

xj

ISyE 323 Lecture #2

21

ISyE 323 Lecture #2

ISyE 323 Lecture #2

22

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

Additivity

Additivity

LP assumes additivity

Example: Non-additive objective function

Additivity Assumption
I The contribution of each decision variable to the objective
function is independent of the value of the other decision
variables.

Suppose the objective function for the Giapettos Woodcarving


problem were
z = 3x1 + 2x2 + x1 x2

The contribution of each decision variable to the left-hand


side of each constraint is independent of the value of the
other decision variables.

When might this occur?


I

In other words:
The variables in the objective functions and constraints are added
together, never multiplied.

If there is a synergistic effect of producing both soldiers (x1 )


and trains (x2 ) together

When might z = 3x1 + 5x2 x1 x2 occur?

For example, no terms like 3x1 x2 .


ISyE 323 Lecture #2

23

ISyE 323 Lecture #2

24

ISyE 323 Lecture #2

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

General LP Models and Assumptions (Section 3.1)

Divisibility

Certainty

LP assumes divisibility

LP assumes certainty of the parameters


Certainty Assumption
The value assigned to each parameter is a known constant.

Divisibility Assumption
The decision variables are allowed to take on fractional values

In other words:
All of the parameters cj , bi , and aij are known with certainty.

E.g.: Values of 21.5 soldiers or 32.21321 trains are allowed.


I

Does the divisibility assumption hold in the Giapettos


Woodcarving example?

ISyE 323 Lecture #2

25

ISyE 323 Lecture #2

Why might the parameters not be known with certainty?

Is the certainty assumption reasonable?

Sensitivity analysis: how much would the answer change if the


parameters changed?

ISyE 323 Lecture #2

26

ISyE 323 Lecture #2

General LP Models and Assumptions (Section 3.1)

LP Solution Concepts

With so many assumptions, is LP useful?

Outline

George Box (UW-Madison)


All models are wrong, some models are useful

Giapettos Woodcarving Example (Section 3.1)

Albert Einstein
A model should be as simple as possible and yet no simpler

General LP Models and Assumptions (Section 3.1)

Major advantages of LP models

LP Solution Concepts
Solution Terminology (3.1)
Graphical Solution Method for Two Variable LPs (3.2)

Modern methods and software can solve some extraordinarily


large LP instances (e.g., millions of decision variables)

LP models are often basis for finding solutions of models that


dont satisfy these assumptions

ISyE 323 Lecture #2

27

ISyE 323 Lecture #2

28

ISyE 323 Lecture #2

ISyE 323 Lecture #2

LP Solution Concepts

LP Solution Concepts

Solution Terminology (3.1)

Solution Terminology (3.1)

Solution Terminology
I

maximize z = 3x1 + 2x2


subject to
2x1 + x2
x1 + x2
x1
x1
x2

A point (a.k.a. solution) is any specification of the decision


variables (x1 , x2 , . . . , xn ).
I
I
I

Feasible region of Giapettos Woodcarving Problem

A feasible point is a point for which all constraints are


satisfied.
An infeasible point is a point for which at least one
constraint is violated.
An optimal solution is a feasible point that maximizes
(minimizes) the objective function.

Which of these points is feasible?


I x1 = 40, x2 = 42.5
I x1 = 10, x2 = 90
I x1 = 25.53, x2 = 28.1
I x1 = 8.5, x2 = 80

Note: Feasible and infeasible points are also called feasible and
infeasible solutions.

29

ISyE 323 Lecture #2

ISyE 323 Lecture #2

30

ISyE 323 Lecture #2

LP Solution Concepts

LP Solution Concepts

Solution Terminology (3.1)

Graphical Solution Method for Two Variable LPs (3.2)

Another benefit of learning OR

How well can Giapetto do?


Is there a feasible point with objective function equal to z = 300?
I No, since the line 3x1 + 2x2 = 300 does not intersect the
feasible region.
How about equal to 120?
I Yes, there are lots since the line 3x1 + 2x2 = 120 goes
through the feasible region.
I But they arent optimal.
Equal to 210?
I No
Equal to 150?
I Yes
Equal to 180?
I Yes, if x1 = 20 and x2 = 60, then 3x1 + 2x2 = 180, and
(20,60) is feasible. This is an optimal solution.

You will get geeky math humor:


http://orbythebeach.wordpress.com/2011/09/07/
an-o-r-vocabulary-test-for-non-experts/
Answers from non-geeks to the question What is a feasible
region?
(a) The region where it is possible for you to live given your
income, wants, and available houses.
(b) Sounds like agriculture. Sorry, I got nothing.
(c) An area or scope which could be a viable alternative for
several purposes.

ISyE 323 Lecture #2

100
80
40
0
0

Lets plot it

The feasible region is the set of all feasible points.

ISyE 323 Lecture #2

31

ISyE 323 Lecture #2

32

ISyE 323 Lecture #2

ISyE 323 Lecture #2

LP Solution Concepts

LP Solution Concepts

Graphical Solution Method for Two Variable LPs (3.2)

Graphical Solution Method for Two Variable LPs (3.2)

The objective function graphically

All of the objective function lines are parallel

They all have the same slope

To see this, convert to slope-intercept form:

Next time

1
3
x2 = x1 + z
2
2
I

Possible outcomes of a LP problem (section 3.3)

The diet problem: a simple type of LP problem (section 3.4)

Reminder: First assignment will be posted on web site this weekend

z is the guess objective function value

ISyE 323 Lecture #2

33

ISyE 323 Lecture #2

34

Potrebbero piacerti anche