Download introduction to mathematical modeling and ibm ilog cplex

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Numerical weather prediction wikipedia , lookup

Mathematical physics wikipedia , lookup

Theoretical ecology wikipedia , lookup

History of numerical weather prediction wikipedia , lookup

Regression analysis wikipedia , lookup

Computer simulation wikipedia , lookup

Predictive analytics wikipedia , lookup

Dirac bracket wikipedia , lookup

Inverse problem wikipedia , lookup

General circulation model wikipedia , lookup

Least squares wikipedia , lookup

Generalized linear model wikipedia , lookup

Multi-objective optimization wikipedia , lookup

Mathematical economics wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Mathematical optimization wikipedia , lookup

Transcript
ISE 336 ART OF MATHEMATICAL
MODELLING
INTRODUCTION TO MATHEMATICAL
MODELLING AND IBM ILOG CPLEX
OPTIMIZATION STUDIO
2014-2015 SPRING TERM
Dr. M. Arslan Örnek
LECTURE#1
OBJECTIVES
• Developing mathematical models and heuristic
methods for well known industrial problems
• Reading and understanding existing models,
algorithms
• Mathematical Modeling and programming using
IBM ILOG CPLEX OPTIMIZATION STUDIO
2
WHY DO WE NEED MODELS ?
Complicated practical problems can be investigated
by using models, which reflect the relevant
features of the problem, in such a way that
properties of the model can be related to the
real (actual) situation.
3
MODELING CONCEPT
4
WHY IS MODEL BUILDING AN ART ?
Designing and implementing of
mathematical models demands not only the
appropriate technical and mathematical
knowledge of the modeller, but also requires
high social skills as well.
5
WHY IS MODEL BUILDING AN ART ?
• Knowledge of a modeling language (OPL, GAMS, LINGO etc. ) does not make
someone a modeler any more than knowing MATLAB makes one a
mathematician.
• Mathematical modeling is both an art and a science.
• Coding the model in a modeling language according to the mathematical
structure (linear, integer, nonlinear) of the problem is the science part.
• But the analysis and defining/constructing modeling components of a system are
the art.
• For example, questions such as how much detail to include in the model or how
to represent a certain phenomena (i.e., interaction between system components)
are all a part of the art.
6
BASIC TERMS
• Mathematical Model is the collection of variables and relationships to
describe a problem.
• Operations Research is the study of how to form mathematical
models of complex engineering and management problems and how
to analyze them to gain insight about possible solutions.
• Mathematical Program (Optimization Models) can be defined as a
mathematical representation aimed at programming or planning the
best possible allocation of scarce resources. Representation includes :
• choices as decision variables and
• determine values that maximize or minimize objective function of the
decision variables
• subject to constraints on variable values expressing the limits on possible
decision choices.
7
MATHEMATICAL
PROGRAMMING STEPS
8
TOOLS FOR MODEL
TRANSLATION
GENERAL PURPOSE LANGUAGES (C/C++, VISUAL
BASIC, JAVA)
–Tedious, low-level, error-prone
–But, almost complete flexibility
MATHEMATICAL PROGRAMMING LANGUAGES
–LINGO,GAMS,IBM ILOG CPLEX Optimization Studio
–Easy to use, you don’t have to deal with low-level
coding
9
IBM ILOG CPLEX
OPTIMIZATION STUDIO
10
11
APPLICATION AREAS
• Linear Programming :
–Product mix
–Make-buy
–Media selection
–Marketing research
–Portfolio selection
–Shipping & transportation
–...
12
APPLICATION AREAS
• Integer Programming :
–Capital Budgeting
–Warehouse Location
–Scheduling
–Either-or decisions
–...
13
APPLICATION AREAS
• Nonlinear Programming :
–Capital Budgeting
–Data networks and analysis
–Resource allocation
–Computer-aided design
–Least squares formulations
–Modeling human or organization behavior
–Process and power industries
–Quantitative finance
14
SUCCESSFUL INTEGER
PROGRAMMING APPLICATIONS
See the following links for more details and examples
http://interfaces.journal.informs.org/content/by/year
http://www.sciencedirect.com/
http://springerlink.com/
http://www.informaworld.com/
http://search.ebscohost.com
http://scholar.google.com.tr/
15
BUILDING A MATHAMATICAL MODEL :
DECISION VARIABLES, CONSTRAINTS,
OBJECTIVE FUNCTIONS
The standard statement of an optimization model
has the form :
Min or max (objective function)
Subject to (constraints)
16
GENERAL MATHEMATICAL
PROGRAMMING FORMAT
17
A linear programming problem (LP) is a class of the mathematical
programming problem, a constrained optimization problem, in which
we seek to find a set of values for continuous variables
(x1, x2, . . . ,xn) that maximizes or minimizes a linear objective function
z, while satisfying a set of linear constraints (a system of simultaneous
linear equations and/or inequalities). Mathematically, an LP is
expressed as follows:
18
An integer (linear) programming problem (IP) is a linear
programming problem in which at least one of the
variables is restricted to integer values.
19
20
• The term "programming" in this context means planning
activities that consume resources and/or meet requirements,
as expressed in the m constraints, not the other meaning—
coding computer programs.
• The resources may include raw materials, machines,
equipments, facilities, workforce, money, management,
information technology, and so on. In the real world, these
resources are usually limited and must be shared with several
competing activities. Requirements may be implicitly or
explicitly imposed.
• The objective of the LP/IP is to allocate the shared resources,
and responsibility to meet requirements, to all competing
activities in an optimal (best possible) manner.
21
A mixed integer program will be said to be in standard form if
(1) the objective function is maximized,
(2) all the constraints are of ≤ form,
(3) each integer variable is defined over consecutive integer numbers whose
lower bound is 0 and upper bound infinity, and
(4) each continuous variable is nonnegative with no finite upper bound.
Any MIP that does not conform to the conditions (l)-(4) is considered to be
in nonstandard form, but may be converted to a standard one through
simple mathematical manipulations.
The following are various nonstandard forms that need to be converted:
• Minimization problem
• Inequality of ≥ form
• Equation (equality constraint)
• Unrestricted variable (continuous or integer)
• Variable with a positive or a negative lower bound
• Variable with a finite upper bound
22
23
• A combinatorial optimization problem (COP) is a discrete optimization
problem in which we seek to find a solution in a finite set of solutions
that maximizes or minimizes an objective function. This type of problem
usually arises in the selection of a finite set of mutually exclusive
alternatives. These qualitative alternatives may be quantified by the use
of discrete variables. Usually, the set of all possible solutions can be
enumerated and their associated objective values can be evaluated to
determine an optimum solution. But unfortunately, the number of
solutions by complete enumeration is usually too huge even for a
moderate-sized problem.
• Well-known examples of COP include the classical assignment problem
and traveling salesman problem (TSP). The assignment problem may be
applied, for example, to assign n jobs to n workers in a most efficient
manner so that each job is assigned to one and only one worker, and
vice versa. The TSP originates from a salesman who starts from a home
city to visit n — 1 cities so that each city is visited once and only once
and then returns to the home city with a minimum travel distance.
24
BUILDING A BASIC MODEL
25
SYSTEM BOUNDARIES
26
INPUT PARAMETERS
Input Parameters : Quantities that we will take as
fixed during the decision process
• Cost
• Availabilities
• Yields
• Requirements
27
DECISION VARIABLES
Decision variables :
• Variables in optimization models represent the
decisions to be taken.
X1: barrels of Saudi crude refined per day
(in thousands)
X2: barrels of Venezuelan crude refined per day
(in thousands)
28
OBJECTIVE FUNCTIONS
• Objective function in an optimization model
quantify the decision consequences to be
maximized or minimized.
29
CONSTRAINTS
• Variable type constraints specify the domain of
definition for decision variables: the set of values
which the variables have meaning
30
CONSTRAINTS
• Main constraints of optimization models specify
the restrictions and interactions, other than
variable type, that limit decision variable values.
31
CRUDE OIL CONCEPTUAL
MODEL
Minimize Total purchasing cost
(1)
Subject to
Meet customer demand for each type of product
(2)
Ensure supply capacity for each supply point
(3)
Nonnegativity constraints for each decision variables (4)
32
CRUDE OIL MATHEMATICAL
MODEL
33
LARGE SCALE OPTIMIZATION
AND INDEXING
• In contrast to Two Crude Petroleum example, in
real applications, optimization models quickly
grow to thousands, even millions, of variables
and constraints.
• Therefore, now we’ll see the indexed notational
representation that keep large models
manageable.
34
INDEXING : THE FIRST STEP
• The first step in formulating a large optimization
model is to choose appropriate indexes for the
different dimensions of the problem.
• Indexes or subscripts permit representing
collections of similar quantities with a single
symbol. For example,
represents 100 similar values with the same
name z, distinguishing them with the index i.
35
INDEXED DECISION
VARIABLES
• Indexing makes it possible to define a large
number of variables with a few symbols.
Suppose that an optimization model employs
decision variables wijkl where i and k range over
1,...,100, while j and l index through 1,...,50.
Therefore the total number of variables which
we represent with wijkl is 25,000,000 (100 x 50 x
100 x 50 )
36
INDEXED SYMBOLIC
PARAMETERS
• To describe large-scale optimization models
compactly, it is usually necessary to assign
indexed symbolic names to most input
parameters, even though they are being treated
as constant.
• Furthermore, summation notation may be
employed for representation.
37
INDEXED SYMBOLIC
PARAMETERS-EXAMPLES
(a) Write the following sum more compactly with
summation notation :
(b) Write out terms of the sum separately :
38
INDEXED SYMBOLIC
PARAMETERS-EXAMPLES
39
INDEXED FAMILIES OF
CONSTRAINTS
• We could write each constraint explicitly, but
when the large size models are considered, the
model would become very bulky and hard to
comprehend.
• Mathematical programming notation deals with
this difficulty by listing indexed families of
constraints.
40
INDEXED FAMILIES OF
CONSTRAINTS
• Families of similar constraints distinguished by
indexes may be expressed in a single line format.
(Constraint for fixed indexes) (range of indexes)
which implies one constraint for each
combination of indexes in the ranges specified.
41
INDEXED FAMILIES OF
CONSTRAINTS-EXAMPLE
An optimization model must decide how to
allocate available supplies si at sources i = 1,...,m
to meet requirements rj at customers j = 1,...,n
using variables
wij: amount allocated from source i to customer j
Formulate each of the following requirements in a
single line:
42
INDEXED FAMILIES OF
CONSTRAINTS-EXAMPLE
(a)The amount allocated from source 32 cannot
exceed the supply available at 32.
(b)The amount allocated from each source i
cannot exceed the supply available at i.
(c)The amount allocated to customer n should
equal the requirement at n.
(d)The amount allocated to each customer j
should equal the requirement at j.
43
INDEXED FAMILIES OF
CONSTRAINTS-EXAMPLE
44
INDEXED FAMILIES OF
CONSTRAINTS-EXAMPLE
45
VOLSAY GAS PRODUCTION
PLAN
Consider a Belgian company Volsay, which
specializes in producing ammoniac gas (N H3) and
ammonium chloride (N H4 Cl). Volsay has at its
disposal 50 units of nitrogen (N), 180 units of
hydrogen (H), and 40 units of chlorine (Cl). The
company makes a profit of 40 Belgian francs for
each sale of an ammoniac gas unit and 50 Belgian
francs for each sale of an ammonium chloride
unit. Volsay would like a production plan to
maximize its profits given its available stocks.
46
VOLSAY GAS PRODUCTION
PLAN
47
VOLSAY MATHEMATICAL
MODEL
Objective : Find a production plan that maximizes
profit
Constraints : Available inventory quantity for
components
48
VOLSAY MATHEMATICAL
MODEL DEFINITIONS
49
VOLSAY MATHEMATICAL
MODEL OPEN FORM
50
VOLSAY MATHEMATICAL
MODEL COMPACT FORM
51