Topic 7
Linear optimization
Financial Modeling – Autumn 2024
SUMMARY
Optimization
Linearity vs. Nonlinearity
Solving for optimization
Allocation model
Covering model
Blending model
Faculty of Management and Tourism - HANU 2
OPTIMIZATION
Optimization is a mathematical and computational approach used to find the
best possible solution among a set of feasible options. It involves maximizing or
minimizing a particular objective function while adhering to a set of constraints.
A version of Solver (referred to as the Standard Solver) is built into every copy of
Excel.
Faculty of Management and Tourism - HANU 3
NONLINEAR PROGRAMMING
Nonlinear optimization refers to the optimization of a problem where the
objective function or constraints are nonlinear, meaning they do not follow a
linear mathematical relationship.
In nonlinear optimization, the objective function and/or constraints may
involve complex mathematical expressions, making the optimization problem
more challenging to solve than linear optimization.
Faculty of Management and Tourism - HANU 4
LINEAR PROGRAMMING
Linear optimization, on the other hand, deals with optimization problems that involve linear
relationships in the objective function and constraints. These linear relationships imply that the
objective function and constraints can be represented as linear equations or inequalities.
Linear optimization, often referred to as linear programming, is a well-studied field of
optimization with well-defined algorithms and solutions for finding optimal solutions in linear
systems.
Faculty of Management and Tourism - HANU 5
NONLINEAR PROGRAMMING
Faculty of Management and Tourism - HANU
LINEAR PROGRAMMING
Faculty of Management and Tourism - HANU 7
EXAMPLE
Mrs. Harris has decided to buy tickets to Vũ's concert for
all 200 her employees.
There are three types of tickets for the concert: Vip 1:
$500, Vip 2: $300, and Vip 3: $150.
Mrs. Harris spent exactly $40,600 to buy tickets, and the
number of Vip 3 tickets will be double the number of Vip 2
tickets.
Calculate the number of each type of ticket Mr. Harris can
buy for the company.
Faculty of Management and Tourism - HANU
1. IDENTIFYING THE VARIABLES
Dependent Variable (Objective):
The total budget that Mr. Harris should spend to purchase all the tickets.
Independent Variables (Decision Variables):
The quantities he can purchase for each type of ticket, denoted as X, Y, and Z
(representing V1, V2, and V3, respectively).
Faculty of Management and Tourism - HANU 9
2. WRITING EQUATION
The total cost should be equal Mr. Harris’sbudget:
500X+300Y+150Z = 40,600.
The total number of tickets should be equal to the number of students:
X+Y+Z=200.
The number of Vip 3 tickets should be double the number of Vip 2 tickets:
Z=2Y.
Faculty of Management and Tourism - HANU 10
3. ADDING CONSTRAINTS
So, you might have noticed that based on the previous case, the exact number of each type of
tickets is 2, 66, and 132.
However, let's modify the requirements a bit. Instead of having a fixed budget, Mr. Harris has
won the lottery and has now decided to increase his spending for the class. Given that his
minimum budget level is now $65,000, $75,000 and $90,000, what is the minimum amount of
money he has to spend to meet all the specified requirements (constraints)?
Faculty of Management and Tourism - HANU 11
3. ADDING CONSTRAINTS
The total cost should be greater than or equal budget:
500X+300Y+150Z >= 65,000.
500X+300Y+150Z >= 75,000.
500X+300Y+150Z >= 90,000.
Faculty of Management and Tourism - HANU 12
4. SOLVING FOR OPTIMIZATION
4.1. Accessing the Solver: To use the Solver in Excel, you need to enable it first if it's not already
activated. You can do this by going to the "File" tab, selecting "Options," clicking on "Add-Ins," and then
selecting "Solver Add-In." Once it's enabled, you'll find "Solver" under the "Data" tab.
4.2. Problem Types: Solver is primarily used for solving linear and nonlinear optimization problems,
including linear programming, integer programming, and nonlinear programming. It's commonly used
for tasks like maximizing profits, minimizing costs, optimizing schedules, resource allocation, and more.
Faculty of Management and Tourism - HANU 13
4. SOLVING FOR OPTIMIZATION
4.3. Components: When using Solver, you typically specify the following components:
Objective Function: This is the mathematical expression you want to
maximize or minimize. It's a cell reference in your Excel worksheet.
Decision Variables: These are the cells that represent the adjustable
parameters or variables in your model.
Constraints: These are conditions or limitations that restrict the possible
solutions. Constraints are defined using equations or inequalities.
Faculty of Management and Tourism - HANU 14
4. SOLVING FOR OPTIMIZATION
4.4. Setting Up the Solver:
After defining your model, you set up the Solver through the "Solver Parameters" dialog box.
1 2 3 4
Specify the Identify the Define the You can choose the
objective cell, the decision variable constraints, solving method
type (maximize or cells that Solver can specifying the (Simplex LP, GRG
minimize), and the adjust. relationship, right- Nonlinear,
target value (if any). hand side, and the Evolutionary, etc.)
constraint cell depending on the
references. nature of problem.
Faculty of Management and Tourism - HANU 15
ALLOCATION MODELS
An allocation model is used to determine how to distribute limited resources
among competing alternatives in order to maximize some objective, typically
profit, revenue, or utility.
In this model, decision variables represent how much of each alternative to select
or allocate. Constraints can include resource limitations, capacity limits, or budget
constraints.
Common applications of allocation models include resource allocation in project
management, investment portfolio optimization, and distribution of products in a
supply chain.
Faculty of Management and Tourism - HANU 16
COVERING MODELS
A covering model is used to determine how to select a subset of items from a
larger set to cover a set of requirements while minimizing some cost or objective
function.
Decision variables represent whether an item is selected or not. Constraints
involve covering all requirements or elements in the requirement set.
Typical applications include facility location problems (e.g., where to place
warehouses to cover demand areas with minimum transportation costs), set cover
problems, and network design for telecommunications or transportation.
Faculty of Management and Tourism - HANU 17
BLENDING MODELS
A blending model is used in scenarios where you need to mix multiple ingredients
or components to create a final product that meets certain specifications or
requirements while minimizing costs.
Decision variables often represent the quantities or proportions of each ingredient
to use in the blend, and constraints relate to the quality and quantity
requirements of the final product.
Blending models are widely used in industries like food production (recipe
formulation), petrochemicals (gasoline blending), and manufacturing (mixing
materials for a product
Faculty of Management and Tourism - HANU 18
EXAMPLE
Mr. Nhan has $65,000 that he plans to deposit into banks A, B, and C. The interest
rates for banks A, B, and C are 8% per year, 7.5% per year, and 7% per year,
respectively. Mr. Nhan wants the total interest he receives after one year to be
$5,000, and the amount he deposits in bank B to be $10,000 more than the
amount he deposits in bank C. Please help Mr. Nhan calculate how much he should
deposit in each bank to meet these requirements.
Faculty of Management and Tourism - HANU 19