To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
This practical guide to optimization combines mathematical theory with hands-on coding examples to explore how Python can be used to model problems and obtain the best possible solutions. Presenting a balance of theory and practical applications, it is the ideal resource for upper-undergraduate and graduate students in applied mathematics, data science, business, industrial engineering and operations research, as well as practitioners in related fields. Beginning with an introduction to the concept of optimization, this text presents the key ingredients of an optimization problem and the choices one needs to make when modeling a real-life problem mathematically. Topics covered range from linear and network optimization to convex optimization and optimizations under uncertainty. The book's Python code snippets, alongside more than 50 Jupyter notebooks on the author's GitHub, allow students to put the theory into practice and solve problems inspired by real-life challenges, while numerous exercises sharpen students' understanding of the methods discussed.
Mathematical optimization models are mathematical means to find the best possible solutions to real-life optimization problems. They consist of three parts: decision variables that describe possible solutions, constraints that define conditions that these solutions need to satisfy, and an objective function that assigns a value to each solution, expressing how “good” it is.
In all the optimization problems discussed so far, we treated the quantities in the problem description as exact, but, in reality, they cannot always be trusted or assumed to be what we think. Uncertainty might negatively affect solutions to an optimization problem in the following forms:
Estimation/forecast errors (increasingly important in an ML-driven world):
– in a production planning problem, future customer demand is a forecast;
– in a vehicle routing problem, travel times along various roads are real-time updated forecasts;
– in a wind farm layout problem, power production levels are based on wind forecasts.
Measurement errors:
– a warehouse manager might have errors in the data records regarding current stock levels;
– the concentration level of a given chemical substance is different from expected.
Implementation errors:
– a given quantity of an ingredient is sent to production in a chemical company, but due to device errors, a slightly smaller amount is actually received;
– electrical power sent to an antenna is subject to the generator’s errors.
In this chapter, compared to Chapter 8 we assume that data or expert knowledge can tell us not only something about the possible values of the problem’s parameters but also about their relative likelihood, that is, the probability distribution.
We now consider problems in which the situation is not as simple as “first we make the decisions, then we observe the uncertainty and compute the costs”
In the previous chapters, we dealt with general problems by first formulating all necessary constraints and then passing the problem to an LO or MILO solver, but in a way, we have been oblivious to the problem’s structure. However, it is often advantageous to analyze this structure, as it can enable us to find better solution methods. In this chapter, we consider a very general class of problems with special structure – the network problems. In the following example, we illustrate the key ideas.
In Chapter 5, we claimed that the watershed between easy and difficult problems is their convexity status. Convex optimization problems are, however, a very broad class and one of their downsides is that the dual problem is not always readily available; see the discussion in Section 5.3. In view of the computational benefits of concurrently solving the primal and dual problems, a natural question arises: Is there a subclass of convex optimization problems that are expressive enough to model relevant real-life problems and, at the same time, allow us for a systematic derivation of the dual akin to linear optimization?
The particular feature of linear optimization problems is that as long as the decision variables satisfy all the constraints, they can take any value. However, there are many situations in which it makes sense to restrict the solution space in a way that cannot be expressed using linear (in)equality constraints. For example, some numbers might need to be integers, such as the number of people to be assigned to a task. Another situation is when certain constraints need to hold only if another constraint holds. For example, the amount of power generated by a power plant must not be less than a certain minimum threshold only if that generator is turned on. Neither of these two examples can be expressed using only linear constraints, as we have seen up to this point. In these cases, it is often still possible to formulate the problem as an LO problem, although some additional restrictions may be needed on certain variables, requiring them to take integer values only. We will refer to this type of LO problem in which some variables are constrained to be integers as mixed-integer linear optimization (MILO) problems.
The simplest and most scalable type of optimization problem is one in which the objective function and constraints are formulated using the simplest type of functions – linear functions. We refer to this class of problems as linear optimization (LO) problems.
This chapter introduces robust optimization (RO), where we aim to solve a MILO in which some of the parameters/data can take multiple (possibly infinitely many) values and we want the optimal solution to perform “the best possible,” assuming that the unknown problem parameters can always turn out to be “the worst possible.”