You are on page 1of 41

DIIIO06 -Lecture 2

Basics definitions (Optimization, LP, LP forms)


Outline:
1. Introduction to (linear) optimization
2. Basics of LP
3. Different LP forms, the simplex
standard form
4. A diet problem (from Chvatal’s LP book)
1.
Introduction
to (linear)
optimization
Mathematical model

A mathematical representation of an
actual situation that may be used to

(a) make better decisions, or

(b) to better understand the


situation.
Optimization

is the selection of a best


element (with regard to some
criteria) from some set of
available alternatives.
Optimization problem
min or max objective as a function of the
decision variables
s.t. constraints on the decision variables

The functions defining the objective and


constraints also involve parameters or data,
which need to be quantified before the model
can be solved.

Main constraints specify limits on and


interactions between the decision variables.
The generic optimization model

Note that it is sufficient to study the problem in maximization/minimization


form since
Classification
The tractability of the optimization model largely
depends on the
structure of the functions that define the objective
and the
constraints, and also on whether the variables are
continuous or integer.

We can classify the optimization problems in


linear/nonlinear continuous/integer optimization

Lets look at some examples.


Linear programming
Linear objective function and constraints; continuous variables.
Example
Nonlinear programming
Nonlinear objective and/or constraints; continuous variables.

Example
Mixed-integer linear programming
Linear objective function and constraints; continuous and/or
integer variables.
Example
Nonlinear integer programming
Nonlinear objective function and constraints; continuous and/or
integer variables.
Example
Classification summary
Optimization
models

Linear Nonlinear
models models

LP MILP NLP MINLP


In this class
Optimization
models

Linear Nonlinear
models models

LP MILP NLP MINLP


2. Basics of LP
Linear expressions of constants and variables
Simple linear term
Constants
} Variables
General linear term
What are LPs?

An optimization problem with:

Linear objective + linear constraints +


continuous variables

(Defined by linear expressions only!!!)


General LP model
Comments about model
Constants:
Only linear
expressions!
+
Variables: Only
continuous
variables!
3.Different
LP forms,
the simplex
standard
form
Motivation
In order to implement the simplex
algorithm in the general
LP case we need to find a simple way of
representing extreme points (vertices).

We will study extreme points in the case


that the LP is given in the simplex
standard form.
The simplex standard form

Maximization problem

Equality constraints

Nonnegative variables
The simplex standard form (examples)

in simplex standard form not in simplex standard form


Other LP forms
Property 1 of the simplex standard form

Any LP can be put


into the simplex
standard form!
Transforming into the simplex standard form
From min to max:
Transforming into the simplex standard form
From free variable to nonnegative variables:
Transforming into the simplex standard form
From inequality to equality (1):
Transforming into the simplex standard form
From inequality to equality (2):
Property 2 of the simplex standard form

A feasible LP in
simplex standard
form always has
vertices!!!
Importance of the simplex standard form

Property 1: Any LP can be put into the


simplex standard form!

Property 2: A feasible LP in simplex


standard form always has vertices!!!
Foundations of the simplex method
For a LP in simplex standard form we
want to:
● Understand vertices for an LP in simplex
standard form.

● How to move from a vertex to a better one.

● Characterize when a vertex is an optimal


solution.
Foundations of the simplex method
For a LP in simplex standard form we
want to:
Basic Feasible Solutions
● Understand vertices for an LP in simplex (BFS)
standard form.
Entering/leaving
● How to move from a vertex to a better one. variables

Sign of the reduced


● Characterize when a vertex is an optimal costs
solution.
4. A diet problem (from Chvatal’s LP book)
A diet problem (from Chvatal’s LP book)
Polly wonders how much money she must spend on food in order to get all the energy (2,000 kcal), protein (55 g), and
calcium (800 mg) that she needs every day. (For iron and vitamins, she will depend on pills. Nutritionists would disapprove,
but the introductory example ought to be simple.) She chooses six foods that seem to be cheap sources of the nutrients;
her data are collected in Table 1.1.

Food Serving Size Energy Protein Calcium Price per


(kcal) (g) (mg) serving
(cents)
Oatmeal 28 g 110 4 2 3
Chicken 100 g 205 32 12 24
Eggs 2 large 160 13 54 13
Whole milk 237 cc 160 8 285 9
Cherry pie 170 g 420 4 22 20
Pork with 260 g 260 14 80 19
beans
Then she begins to think about her menu.

For example, 10 servings of pork with beans would take care of all her needs
for only (?) $1.90 per day. On the other hand, 10 servings of pork with beans is
a lot of pork with beans—she would not be able to stomach more than 2
servings a day.

She decides to impose servings-per-day limits on all six foods:

Oatmeal at most 4 servings per day


Chicken at most 3 servings per day
Eggs at most 2 servings per day
Milk at most 8 servings per day
Cherry pie at most 2 servings per day
Pork with beans at most 2 servings per day.
Now, another look at the data shows Polly that 8 servings of milk and 2 servings of
cherry pie every day will satisfy the requirements nicely and at a cost of only $1.12.

In fact, she could cut down a little on the pie or the milk or perhaps try a different
combination. But so many combinations seem promising that one could go on and
on, looking for the best one. Trial and error is not particularly helpful here.

To be systematic, we may speculate about some as yet unspecified menu consisting


of x1, servings of oatmeal, x2 servings of chicken, x3 servings of eggs, and so on.

In order to stay below the upper limits, that menu must satisfy (1.1):
And, of course, there are the requirements for energy, protein, and calcium;
they lead to the inequalities (1.2):
If some numbers x1, x2, …, x6 satisfy inequalities (1.1) and (1.2), then
they describe a satisfactory menu; such a menu will cost, in cents
per day, (1.3):

In designing the most economical menu, Polly wants to


find numbers x1, x2, …, x6 that satisfy (1.1) and (1.2), and
make (1.3) as small as possible.
The diet problem LP model

You might also like