You are on page 1of 32

CHAPTER 2.

OPTIMIZATION
MODELS
Part 2

Optimization models
In this section we are going to study:
Algebraic modeling
Classification of mathematical models

Algebraic modeling

We used it in:

Model 4. Job-Machine assignment problem


Model 5. Production-Delivery problem

Why did we use it?

Variables have similar meaning


Constraints have similar meaning
IVRs have similar meaning

Algebraic modeling

Algebraic symbols
SUMMATION SYMBOL
Allows you to express summation with many
components using a single expression

ENUMERATION SYMBOL
Allows you to avoid writing multiple copies of
model components that are similar in nature
(date, variables, constraints..)

Summation

Given
two integers and , we use

Given a finite set

Examples

Examples
Write

the following constraints using


summation symbols:
++

+++

Enumeration symbol

Given
two integers and , we use:

to represent

Given a finite set we use:

to represent

Examples

Number of vehicles sent from plant to


demand location

1 if facility is open at location , 0


otherwise

Examples

={2,4,6}

+ + =5

+ + =5

+ + =5

+
+
+

++

Some common mistakes


and
Let

Simple principles
Every index in an algebraic model must be
either summed or enumerated over
An index in an algebraic model cannot be
both summed and enumerated over in the
same expression

Model 4. Job Machine Assignment


problem
Mathematical
formulation:

s.t.
,6

,6

Model 5. Production-Delivery Problem



Mathematical
formulation

s.t.

Procedure to build an algebraic model


1.

2.

3.
4.

5.

Define the data in terms of sets or


parameters defined on sets
Create variables that are indexed by the
sets defined in 1
Write IVRs using enumeration symbols
Write constraints using enumeration and
summations symbols (using sets defined in
1)
Write objective function using summation
symbols. Summations should be expressed
over the sets defined in 1

Algebraic modeling in GAMS


Keyword
Set
name

end
Character /
/

List of
elements
Equivale
nt

Equivale
nt

Enumeration in GAMS

To declare constraint

Constraint

Calling specific
element

Summation in GAMS

Use mainly in the definition of


constraints and objective function
Performed over the set previously
defined

Classes of optimization models and


tractability

General form

s.t.

In

are decision variables


is the objective function
are the inequality constraints functions
are the equality constraints functions
and are the right hand side (RHS) of
constraints functions
are the IVRs

About the solutions of

Always
have a solution?

Can be solved quickly?

Not all problems are TRACTABLE

Identify the model type for to solve it


efficiently

Use the existing solution methodologies for


solving a particular model type
Use the tractability results already known for
the model type
Use the available solvers and software to solve

Model classes

Allows you to know if exist:

An optimal solution for


Efficient exact solution methodologies for
Approximate solution methodologies for
Commercial software to solve

How to describe a problem


List its characteristics:
Variables

Objective function and constraints

Integer, continuous, mixed-integer?


Linear, nonlinear?

Structure

Network problem

Integer, continuous and mixed-integer


problems
Integer:

If in , all the values that decision variables can take are
restricted to be integer, then is said to be integer
Continuous variable:
If in , all the values that decision variables can take are
restricted to take on any value in a specified interval, then is
said to be continuous
Mixed-integer:
If in , the values that some of the decision variables can take
are restricted to be integer while the other are continuous,
then is said to be mixed-integer

Linear and non linear


problems
Linear
functions

A function is said to be linear if it is a constantweighted sum of decision variables. Otherwise, it is


nonlinear
Linear problems

If all the functions in (P) are linear, then is said to


be linear
Nonlinear problems

In is not linear, then is said to be nonlinear

Network problems
is the model of a problem defined on a
If
graph, then is said to be a graph or
network problem.

NO
Dalla
s
Chica
go
Denv
er
NY

Examples

Assume
that and are constants and and
are variables

s.t.
4

Examples

Assume
that and are constants and and
are variables

s.t.
4

Examples

Assume
that and are constants and and
are variables

s.t.
4

Examples

Assume
that and are constants and and
are variables

s.t.
4

Examples

Assume
that and are constants and and
are variables

)
s.t.
4

Review of models

Farmer Joe's planting problem (Linear optimization


problem - GAMS keyword: lp)

Agricultural mill blending problem (Linear optimization


problem - GAMS keyword: lp)

Box design problem (Nonlinear optimization problem


GAMS keyword: nlp)

Machine assignment problem (Integer Linear optimization


problem - GAMS keyword: mip)

Car production and delivery problem (Integer linear


network optimization problem - GAMS keyword: mip or lp)

Tractability

Linear problems are much more tractable


than nonlinear problems

Convex problems, a class of nonlinear


problems, are very tractable

Continuous problems are much more


tractable than integer or mixed-integer

Network problems are more tractable than


unstructured problems

You might also like