Optimization Reading 1
Optimization Reading 1
This file contains only one chapter of the book. For a free download of the
complete book in pdf format, please visit www.aimms.com.
Aimms 4
Copyright c 1993–2018 by AIMMS B.V. All rights reserved.
Email: [email protected]
WWW: www.aimms.com
Aimms is a registered trademark of AIMMS B.V. IBM ILOG CPLEX and CPLEX is a registered trademark of
IBM Corporation. GUROBI is a registered trademark of Gurobi Optimization, Inc. Knitro is a registered
trademark of Artelys. Windows and Excel are registered trademarks of Microsoft Corporation. TEX, LATEX,
and AMS-LATEX are trademarks of the American Mathematical Society. Lucida is a registered trademark of
Bigelow & Holmes Inc. Acrobat is a registered trademark of Adobe Systems Inc. Other brands and their
products are trademarks of their respective holders.
Information in this document is subject to change without notice and does not represent a commitment on
the part of AIMMS B.V. The software described in this document is furnished under a license agreement and
may only be used and copied in accordance with the terms of the agreement. The documentation may not,
in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium
or machine-readable form without prior consent, in writing, from AIMMS B.V.
AIMMS B.V. makes no representation or warranty with respect to the adequacy of this documentation or
the programs which it describes for any particular purpose or with respect to its adequacy to produce
any particular result. In no event shall AIMMS B.V., its employees, its contractors or the authors of this
documentation be liable for special, direct, indirect or consequential damages, losses, costs, charges,
claims, demands, or claims for lost profits, fees or expenses of any nature or kind.
In addition to the foregoing, users should recognize that all complex software systems and their docu-
mentation contain errors and omissions. The authors, AIMMS B.V. and its employees, and its contractors
shall not be responsible under any circumstances for providing information or corrections to errors
and omissions discovered at any time in this book or the software it describes, whether or not they
are aware of the errors or omissions. The authors, AIMMS B.V. and its employees, and its contractors
do not recommend the use of the software described in this book for applications in which errors or
omissions could threaten life, injury or significant loss.
This documentation was typeset by AIMMS B.V. using LATEX and the Lucida font family.
Part I
Introduction to Optimization
Modeling
Chapter 1
Background
This chapter gives a basic introduction to various aspects of modeling. Dif- This chapter
ferent types of models are distinguished, some reasons for using models are
listed, some typical application areas of modeling are mentioned, and the roles
of mathematics and Aimms are described. Finally, an overview is given of the
“model formulation process.”
Since this guide describes different models and modeling techniques, it will A model
start by defining what a model is. In general: a model is a prototype of some-
thing that is real. Such a prototype can be concrete or abstract.
An example of a concrete model is a teddy bear. A teddy bear is concrete— Concrete model
you can touch it and play with it—and it is also a scaled-down (and somewhat
friendlier) version of a real bear.
To illustrate an abstract model, the Teddy Bear Company is introduced. This Abstract model
company produces black and brown teddy bears in three sizes, and its owners
consider the teddy bear in terms of an abstract model. That is, they describe
everything they need to know about producing it:
materials: fur cloth in black and brown, thread, buttons, different quali-
ties of foam to stuff the bears,
information on prices and suppliers of materials,
three different sized patterns for cutting the fur, and
assembly instructions for the three sizes of bears.
In this abstract model of the teddy bear, there is just the basic information
about the bear. A mathematical model can be used to derive further informa-
tion.
Chapter 1. Background 3
Suppose you want to know the cost of a small black teddy bear. Then you Mathematical
sum the material costs (material prices by the amounts used) and the produc- models
tion costs (assembly time by labor cost). The relationship between all these
components can be expressed in general terms. Once formulated, you have
developed a mathematical model. A mathematical model is an abstract model.
It is a description of some part of the real world expressed in the language of
mathematics. There may be some variables in the description—values that are
unknown. If the model is formulated so that you can calculate these values
(such as the cost of a small black teddy bear) then you can solve the model.
In Section 1.1 two types of models were introduced and some typical modeling This section
applications given. Advantages of using models are now listed.
A model serves as a learning tool. In the process of constructing a model you Learning while
are forced to concentrate on all the elements required to realize the model. In constructing
this way, you learn about the relationships between the elements that make up
the model. For instance, during the design of a teddy bear you must consider
the outside—what is the shape of the ears?—as well as the inside—the foam
to choose. During the process, you may discover an unexpected relationship
between the softness of the bear and its assembly.
Depending on the purpose of the model you then need to set priorities since Filtering
mathematical models can grow in complexity with the quantity of detail. If information
the objective of the model is to determine the cheapest mix of foams, you
may wish to ignore the softness of the ears. Such filtering and structuring of
information is an important contribution to the modeling process.
Chapter 1. Background 4
Models can also be a valuable tool of expression during discussions between Medium of
concerned parties. If the formulation and data of a model are agreed, it can be discussion
used to make predictions of the consequences of different actions, which can
then be compared.
For the Teddy Bear Company it might be possible to cut the foam cost further Cutting costs to
by buying it from several suppliers and monitoring price variations. The op- stay competitive
timization model could easily be extended to incorporate this information. It
will enable the Teddy Bear Company to react quickly to changes in foam prices.
The combination of models and computers enhances the speed of decision With computers
making. The computer enables you to handle far more information than could
be done manually.
Another benefit possible from modeling is called streamlining. That is, in the Streamlining
process of constructing a model and structuring its information you may dis-
covery inefficiencies which can then be addressed. For example, consider a
consulting company, while making a model of the Teddy Bear Company as
a whole, discovers that there are two business units performing virtually the
same task. Suppose that for some historical reason, there are separate units
producing black and brown teddy bears. Since the only difference is in the
color of the cloth, integrating these business units would make the company
more efficient.
Even though this guide concerns the specification of mathematical programs Mathematical
(optimization models), you do not have to be a mathematician to become a requirements
good modeler. The degree of mathematics required depends upon the sort
of model you are building. In this book there is a distinction between basic,
intermediate and advanced models such that each type requires an increase in
knowledge of mathematical theory and concepts. When considering the role
of mathematics, one can distinguish three aspects, namely, language, theory
and algorithms. These aspects are discussed in the following paragraphs.
Chapter 1. Background 5
Mathematics provides a theoretical framework for the formulation and solu- Mathematical
tion of those models for which the translation from problem to model is not theory
immediate. Mathematical concepts are then needed to capture aspects of tan-
gible and non-tangible real-life situations. A non-tangible example is the risk
minimization in a financial portfolio selection model. There is no hard defini-
tion of risk but there are plenty of interpretations. When building a model one
or more of these interpretations must be made concrete in the form of a math-
ematical formula for risk. This can only be achieved by using mathematical
concepts and their associated theory.
The Aimms modeling system is especially designed to minimize the mathemat- Aimms
ical complexity. minimizes need
for mathematics
The Aimms modeling language incorporates indexing facilities to guide
you in expressing and verifying complex mathematical models.
Since there is a separation between the formulation and the solving of
a model, you do not need to know the details of the solution method.
If you do not specify a solution method, Aimms will determine the best
method for you.
Chapter 1. Background 6
The process of developing a model usually involves several different activities. Iteration of
Although these activities are listed sequentially below, several will be repeated activities
as new information becomes available during the execution of other steps,
thus an iterative approach will often be necessary.
In a complex problem, the structure and goal of the model may not be obvious. Investigating
Therefore, the first step should be to analyze the general problem conceptually contribution of
and to determine which aspects of the real-world situation must be included. a model
At this stage the emphasis is on problem definition, rather than on mathemat-
ics. It is likely there are different views on the problem and its causes, and
these must be resolved so that all concerned parties agree on the goal of the
model. In one sense, you can say that the goal of a model is to support a de-
cision. In a wider sense, a model can be used to predict the consequences of
particular decisions, and so to compare alternatives.
Once the goal of the model is agreed, the next step is to investigate if a similar Investigating
model has already been developed. There are benefits to review the work of sources
others. It may help you to find the data you need and it may give you some
hints on how to formulate your model. However, in general you can expect to
do some customization.
In most cases, by far the harder task is collecting the data. This task is both Data collection
time consuming and prone to errors. Most models, built to analyze real-world
problems, require lots of data. In some instances data is available through
databases. In other instances data may not be readily available, and once it
is found, it is seldom in a form directly suitable for your purposes. In this
case data must be copied, checked for errors, and manipulated. During this
data adjustment phase, errors of different types may be introduced. Examples
are approximation errors, typographical errors, and consistency errors. Many
typographical errors and inconsistencies in data can be identified by Aimms,
and will result in error messages when compiled.
Chapter 1. Background 7
It is not usually self-evident which particular type of model formulation is the Choosing a
most appropriate. There are no clear rules for making a choice. As mentioned formulation
in the previous paragraph, the choices of other modelers in similar situations
can give suggestions, and your own experience and knowledge will always in-
fluence your eventual choice. In any case, when you want to stay within the
framework of the available modeling tools, you may have to compromise.
It is recommended that you start with a small model containing only the basic Initial testing
relationships. You should verify that these are formulated correctly before
adding increased complexity, and continue in this gradual fashion.
Validation is the process of checking whether initial model results agree with Validation
known situations. It is an important final step before the model results are
used in support of a real-world decision. Two situations may occur:
A methodology already exists with the same purpose as the new model.
In order to be credible, you will have to prove that the results of the new model
are at least as good as the results produced with an existing method. Since the
“old method” is probably known to be accurate (or its weaknesses are known),
you can compare the old and new methods side by side. Your model should at
a minimum reproduce the old results, and you should aim for better results.
In this case, you should use historical data, and try to reproduce the past. In
essence, you try to predict what you already know.
This section gives an indication of the applicability of optimization models This section
in practice. Obviously, these few pages do not pretend to give a complete
overview. Rather the goal is to combine a limited overview with a description
of a typical example taken from each application area mentioned. These de-
scriptions are qualitative in that specific data and formulas are not given. The
focus is on the general structure of models.
1.5.1 Production
In the petroleum industry refinery models are used for planning, scheduling The petroleum
and process control, see for instance [Ma56]. Following is a brief account of a industry
refinery planning model.
Chapter 1. Background 8
Planning models support long-term decisions, concerning raw material pur- Refinery
chases, and utilization of production processes, in order to meet future de- planning model
mands for final products with specific qualities. These quality specifications
require blending models to be embedded in refinery models, see for instance
[Ke81]. A refinery planning model describes the process from crude oils to
final products such as different blends of gasoline, fuel oil, and distillate. The
production process makes use of various production units including crude
distillers, catalytic crackers, and vacuum distillers.
This qualitative model description is based on a model as described in [Ke81]. Refinery model
description
Maximize: profit = revenue − material cost − operating cost,
Subject to:
for all crude oils: a constraint stating that the amount of crudes
used in processes must not exceed the amount of crudes
purchased,
for all intermediates: a constraint stating that the net production
and purchases of an intermediate commodity must exceed its
use in blending,
for each production unit: a capacity constraint,
for all crude oils: limits on purchases,
for all final products: a constraint stating that final sales must
equal the output of the blending process, and
for all final products, and all quality attributes: upper and lower
bounds on the quality of final products.
The application area that studies the efficient production and distribution of Other
energy is known as energy economics. This area is of strategic importance applications
to modern economies because of the world’s dependence on energy, and in
particular oil. The conversion of scarce energy resources to electricity and heat
can be modeled, see for instance [Ma76]. From such a model, the least-cost
mix including extraction of energy resources, and investment in production
technologies, can be determined. Moreover, constraints on emission levels
for certain pollutants and the use of abatement technologies can be included.
Another application is scheduling power plants to meet the varying load at
different times of the day, and in different seasons. An example is given in
Chapter 16.
The scheduling of production and inventory can be formulated as a linear op- Typical model
timization model. Typically, multiple time periods and material balances are components
incorporated in such a model. Suppose factory production must satisfy a fluc-
tuating demand. There are many strategies for reacting to these fluctuations:
Chapter 1. Background 9
extra workers can be hired and fired, workers can work overtime, a stock in-
ventory can be kept to cover future shortages, etc. Obviously, the hiring and
firing of workers or overtime working adds extra costs. Storage however is
also costly.
A verbal formulation of the production and inventory problem, which can be An example
found in [Ch83], follows.
Linear optimization models are quite successful for resource allocation prob- Other
lems. The potato chips problem in Chapter 2 is a simplified example. Different applications
products compete for a finite set of resources, and decisions may possibly be
made about the selection of a production process for a particular product.
Another widespread application of mathematical optimization models is in
developing production schedules. An overview of techniques is given in [Bu89].
1.5.3 Finance
The resulting model has a quadratic objective and linear constraints, and is
known as a quadratic optimization model. In Chapter 18, a more elaborate
treatment of portfolio models is given. In real situations, the size of the co-
variance matrix can be overwhelming. For example, 100 possible securities
give rise to a covariance matrix of 100 × 100 = 10, 000 entries. Alternative
methods have been developed to compress this information.
Optimization models can be used to plan the cash receipts and disbursements Other
of an individual firm. These cash management models can sometimes be for- applications
mulated as networks in which the nodes represent different time periods. The
arcs then represent flows of money over time. Optimization models can also
be used for the management of large funds. Such a fund requires careful plan-
ning since commitments made today have long term financial consequences.
A multi-period model considers, for each period, loans, repayments, and in-
vestments, subject to financial and political constraints. In accountancy, linear
optimization models are often used because of the useful economic informa-
tion that can be derived from shadow prices and reduced costs. A thorough
account of the use of optimization models in finance is given by in [Ko87].
Linear and integer optimization models can be used to schedule work shifts Scheduling
when the demand for workers varies over the hours of the day, or the days of work shifts
the week. The decision to be made is how many people should work during
each shift, see for instance [Sc91] and [Ch68]. Examples are the scheduling of
bus drivers, nurses, and airline crews. A general framework for the solution
process is as follows:
An optimization model is used for the final step. Obviously, the second step
can also be computerized. In large problems this will be essential. Advanced
methods exist in which promising shift patterns are generated using shadow
prices produced by the simplex method. An iterative process between the
Steps 2 and 3 evolves. Such a technique is known as delayed column genera-
tion, see for instance [An91] and [Ch83].
Chapter 1. Background 11
A slightly different approach is taken in the following problem. Suppose a A model for
bus company employs drivers who are entitled to two consecutive days off per scheduling bus
week. For each day of the week the number of drivers required is known. The drivers
problem is: “How many drivers should start their five-day working week on
each day of the week?” The qualitative model formulation can now be given:
The formulation of the constraint is a special task, because for each day the
number of drivers that are part way through their shift must also be calculated.
Complicating factors might be higher costs for working during weekends, or
the availability of part-time workers.
Longer time-scale models exist which consider personnel as human capital, Other
whose value increases as experience grows, training followed, etc., see for in- applications
stance [Th92]. Such a model can be formulated as a network-with-gains model.
The nodes represent moments in time, and the flow between these nodes rep-
resents the flow of employees whose value varies in time due to training, res-
ignations, and new hiring.
Models of both a country’s agricultural sector and of individual farms have Individual farm
been used extensively by governments of developing countries for such pur- models
poses as assessing new technologies for farmers, deciding on irrigation invest-
ments, and determining efficient planting schedules to produce export-goods.
A short account of an agricultural subsector model, see for instance [Ku88], is
given here, Chapter 11 has a more extensive account.
The subsector model combines the activities, constraints, and objective func- A subsector
tions of a group of farms. The main activity of a farm is growing different model
crops and perhaps keeping livestock. Typical constraints restrict the avail-
ability of land and labor. Agricultural models become multi-period models as
different growing seasons are incorporated.
The simplest type of agricultural subsector model is one comprised of a num- Similar farms
ber of similar farms which compete for a common resource or share a common
market. By “similar” is meant that they share the same technology in terms of
crop possibilities, labor requirements, yields, prices, etc. Such subsector mod-
els can be used to verify if common resources are really a limiting factor at
a regional level. Hired labor, for instance, might well be a constraint at the
regional level.
Chapter 1. Background 12
A different situation arises when there are fundamental differences between Farm types
some of the farms in the subsector to be modeled. One common difference
is in size, which means that resource availabilities are no longer similar. In
the following example, it is assumed that the types of farms are distinguished
mostly by size.
Maximize: An example
regional income = income aggregated over different farm types,
Subject to:
for each type of farm, for each time period: a restriction on the
availability of resources (land, labor, water) needed for cropping
activities, and
for each time period: a regional labor restriction on the
availability of hired workers (temporary plus permanent).
Other farming applications include blending models for blending cattle feed Other
or fertilizers at minimum cost. Distribution problems may arise from the dis- applications
tribution of crops or milk. Large models can be used for the management of
water for irrigation, or to examine the role of livestock in an economy. Further-
more, these principles can be applied with equal success to other economic
subsectors.
1.6 Summary
This chapter discussed the basic concepts of modeling. Some of the main
questions addressed in this chapter are: What is a mathematic model, why
use mathematical models, and what is the role of mathematics during the con-
struction of models. The modeling process has been introduced as an iterative
process with the steps to be executed described in detail. The latter portion of
this chapter introduced several application areas in which optimization mod-
els can be used.
Bibliography