123
123
1
Definition of Optimization
Optimization is a branch of mathematics that focuses on finding the
best possible solutions to a given problem while considering specific
constraints or conditions. The primary objective of optimization is to
maximize or minimize a particular function (such as profit or cost) by
selecting the most suitable values for the variables.
Goals of Optimization
Optimization aims to achieve several key objectives, including:
• Increasing Profits: Enhancing financial returns.
• Reducing Costs: Lowering operational expenses.
• Achieving Efficiency: Utilizing resources effectively.
2
Basic Steps in Optimization
Optimization follows a systematic process to identify the best
solution:
1. Formulate the Problem:
• Define the Objective Function, which represents what needs to be
optimized (e.g., profit or cost).
• Identify Constraints, which are limitations on the variables (e.g.,
available resources, time, or budget).
2. Analyze the Feasible Region:
• Determine the set of possible solutions that satisfy all constraints.
3. Find Critical Points:
• Use mathematical techniques (such as derivatives) to identify
points where the function could reach a maximum or minimum
value.
4. Evaluate the Objective Function:
• Calculate the values of the objective function at critical points and
boundary points of the feasible region.
5. Identify the Optimal Solution:
• Compare the obtained values to determine the best solution.
3
• Constraints: Conditions that must be satisfied by the solutions.
• Feasible Region: The set of all possible solutions that meet the
constraints.
• Critical Points: Points where the function may reach a maximum or
minimum.
• Analysis: The process of studying and comparing values to
determine the optimal solution.
Components:
- Objective Function 𝑓 (𝑥 ): The function to be optimized.
- Decision Variables (𝑥1 , 𝑥2 , … , 𝑥𝑛): Values affecting the function.
- Optimality Conditions:
- Gradient (first derivative) must be zero: 𝛻𝑓(𝑥 ) = 0
- Use second derivative (Hessian matrix) to determine
minimum or maximum.
4
Example:
𝑚in 𝑓 (𝑥 ) = 𝑥 3 – 6𝑥 2 + 9𝑥 + 1
Solution Steps:
1. Compute first derivative: 𝑓 ′ (𝑥 ) = 3𝑥 2 – 12𝑥 + 9
2. Solve 𝑓 ′ (𝑥 ) = 0 ∶ (𝑥 − 1)(𝑥 − 3) = 0 → 𝑥 = 1, 𝑥 = 3
3. Use second derivative:
− 𝑓 ′′ (1) = −6 → 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑎𝑡 𝑥 = 1
− 𝑓 ′′ (3) = 6 → 𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑎𝑡 𝑥 = 3
Solution Methods:
- Gradient Descent
- Newton’s Method
2. Constrained Optimization
Concept : In many real-world problems, there are limitations that
must be considered. These could be laws, technical requirements, or
resource restrictions. Constrained optimization finds the best
possible solution while ensuring these constraints are met.
General Form:
𝑚𝑎𝑥
𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛)
𝑚𝑖𝑛
Subject to:
𝑔𝑖 (𝑥1 , 𝑥2 , … , 𝑥𝑛) = 0 (𝐸𝑞𝑢𝑎𝑙𝑖𝑡𝑦 𝐶𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡𝑠)
ℎ𝑗(𝑥1 , 𝑥2 , … , 𝑥𝑛) ≤ 0 (𝐼𝑛𝑒𝑞𝑢𝑎𝑙𝑖𝑡𝑦 𝐶𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡𝑠 )
Components:
- Objective Function 𝑓 (𝑥 ): The function to be optimized.
5
- Decision Variables (𝑥1 , 𝑥2 , … , 𝑥𝑛): Values affecting the function.
- Equality Constraints: Conditions that must be exactly satisfied.
- Inequality Constraints: Conditions setting upper or lower
bounds.
- Feasible Region: The set of values satisfying all constraints.
Example:
max 𝑓(𝑥, 𝑦) = 𝑥 + 𝑦
Subject to:
𝑥 2 + 𝑦2 = 1
Solution Method:
Using Lagrange Multipliers
1. Define Lagrange function:
𝐿(𝑥, 𝑦, 𝜆) = 𝑥 + 𝑦 + 𝜆 (𝑥 2 + 𝑦 2 – 1)
2. Compute partial derivatives:
𝜕𝐿 𝜕𝐿 𝜕𝐿
= 1 + 2𝜆𝑥 = 0 = 1 + 2𝜆𝑦 = 0
𝜕𝑥 𝜕𝑦 𝜕𝜆
= 𝑥 2 + 𝑦2 − 1 = 0
6
- Quadratic Programming (for quadratic constraints
3. Linear Optimization (Linear Programming - LP)
Concept : This type of optimization is used when the relationships
between variables are linear, meaning that changes in one variable
lead to proportional changes in the results. It is widely used in
economics and engineering.
General Form:
𝑚𝑎𝑥
𝑧 = 𝑐1 × 𝑥1 + 𝑐2 × 𝑥2 + ⋯ + 𝑐𝑛 × 𝑥𝑛
𝑚𝑖𝑛
Subject to:
𝑎11 × 𝑥1 + 𝑎12 × 𝑥2 + … + 𝑎1 𝑛 × 𝑥𝑛 ≤ , =, ≥ 𝑏1
𝑎21 × 𝑥 1 + 𝑎22 × 𝑥2 + … + 𝑎2 𝑛 × 𝑥𝑛 ≤ , =, ≥ 𝑏2
𝑎𝑚1 × 𝑥1 + 𝑎𝑚2 × 𝑥2 + … + 𝑎𝑚𝑛 × 𝑥𝑛 ≤ , = , ≥ 𝑏𝑚
Components:
- Objective Function Z: A linear function to maximize or minimize.
- Decision Variables (𝑥1 , 𝑥2 , … , 𝑥𝑛): Values affecting the
outcome.
- Constraints: Linear equations or inequalities restricting feasible
solutions.
- Feasible Region: The set of values satisfying all constraints.
Example:
max 𝑍 = 3𝑥 + 2𝑦
Subject to:
𝑥 + 2𝑦 ≤ 8
7
2𝑥 + 𝑦 ≤ 6
𝑥, 𝑦 ≥ 0
Solution Methods:
- Graphical Method (for two variables)
- Simplex Method
- Interior-Point Methods
4. Nonlinear Optimization
Concept : When the relationships between variables are not linear,
the problem becomes more complex because changes in one
variable can have unpredictable effects.
General Form:
𝑚𝑎𝑥
𝑓(𝑥1 , 𝑥2 , … , 𝑥𝑛)
𝑚𝑖𝑛
Subject to:
𝑔𝑖 (𝑥1 , 𝑥2 , … , 𝑥𝑛) = 0 (𝐸𝑞𝑢𝑎𝑙𝑖𝑡𝑦 𝐶𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡𝑠 )
ℎ𝑗(𝑥1 , 𝑥2 , … , 𝑥𝑛) ≤ 0 (𝐼𝑛𝑒𝑞𝑢𝑎𝑙𝑖𝑡𝑦 𝐶𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡𝑠 )
Components:
- Objective Function 𝑓(𝑥 ): A function that is nonlinear (powers,
logarithms, trigonometric functions, etc.).
- Decision Variables (𝑥1 , 𝑥2 , … , 𝑥𝑛): Values affecting the
objective function.
- Constraints: Can be linear or nonlinear.
- Feasible Region: A nonlinear feasible region (not necessarily
convex).
8
Example:
min 𝑓 (𝑥, 𝑦) = 𝑥 2 + 𝑦 2 + 𝑥𝑦
Subject to:
𝑥 2 + 𝑦2 ≤ 4
Solution Methods:
- Lagrange Multipliers (for constrained problems)
Applications of Optimization
1. Applications of Linear Optimization (Linear Programming - LP)
Linear optimization deals with problems where the objective
function and constraints are linear.
A. Business & Economics
• Supply Chain Management: Optimizing transportation costs
and distribution networks.
• Production Planning: Maximizing output while minimizing
costs in manufacturing.
• Portfolio Optimization: Allocating assets in an investment
portfolio to maximize returns while managing risk.
• Workforce Scheduling: Assigning employees to shifts while
minimizing overtime.
9
B. Engineering
• Network Flow Optimization: Managing traffic flow in
telecommunications and transportation networks.
• Energy Distribution: Optimizing electricity supply in smart
grids.
C. Operations Research
• Inventory Management: Minimizing holding and shortage
costs in warehouses.
• Airline Scheduling: Assigning flights and crews efficiently.
10
C. Energy & Environment
• Renewable Energy Optimization: Maximizing efficiency in
wind and solar power plants.
• Climate Modeling: Predicting climate patterns using
nonlinear equations.
11
• Signal Processing: Optimizing filter coefficients to minimize
noise.
C. Scientific Computing & Physics
• Minimization of Energy Functions: Finding stable states in
physical simulations.
• Molecular Dynamics: Optimizing atomic configurations to
minimize potential energy.
12
B. Finance & Investment
• Constrained Portfolio Optimization: Maximizing returns while
limiting risk exposure (e.g., using Value-at-Risk constraints).
• Loan Allocation Models: Optimizing loan portfolios with
regulatory constraints.
C. Artificial Intelligence & Machine Learning
• Constrained Deep Learning: Ensuring fairness and robustness
in model training while optimizing loss functions.
• Reinforcement Learning with Constraints: Optimizing policies
while ensuring safety constraints (e.g., autonomous driving).
D. Healthcare & Medicine
• Radiation Therapy Optimization: Delivering maximum radiation
to cancer cells while minimizing exposure to healthy tissues.
• Drug Dosage Optimization: Balancing effectiveness while
ensuring safe dosage limits.
E. Energy & Environment
• Power Grid Optimization: Maximizing energy efficiency while
maintaining grid stability.
• Environmental Conservation: Optimizing resource extraction
while complying with environmental regulations.
13
Challenges in Solving Optimization Problems:
14
5. Interpreting Results:
Ensuring that the results satisfy the given constraints (not out of
range).
Occasionally, the results might be unrealistic (e.g., negative
lengths).
6. Verifying Maximum or Minimum Values:
The second derivative is used to determine the nature of the
critical point (maximum or minimum).
If the second derivative is unavailable, alternative methods, such
as analyzing behavior around critical points, are needed.
7. Open-Ended Problems:
Some problems may lack clear constraints or closed boundaries,
making it challenging to guarantee the existence of maximum or
minimum values.
8. Dealing with Multiple Variables:
In some problems, the function depends on more than one
variable, requiring partial derivatives and solving multiple
equations.
9. Non-Linear Constraints:
If the constraints are non-linear, the complexity of the solution
increases as the analysis becomes less straightforward.
10. Non-Differentiable Functions:
If the function has points where derivatives do not exist (e.g.,
functions with sharp corners), the mathematical analysis becomes
more complicated.
15
Optimization Problems and Solutions
*Unconstrained Optimization
Problem: A sports car manufacturer aims to minimize fuel consumption for a new model.
The fuel consumption function is given by:
where:
Find the optimal values of (x,y,z) that minimize fuel consumption using differentiation.
Solution:
𝜕𝑓
= 2𝑥 − 2𝑦 − 5𝑧 + 7
𝜕𝜒
𝜕𝑓
= 6𝑦 − 2𝑥 + 4𝑧 − 8
𝜕𝜒
𝜕𝑓
= 4𝑧 − 5𝑥 + 4𝑦 + 10
𝜕𝜒
16
2. Set these derivatives to zero and solve the system of equations:
2𝑥 − 2𝑦 − 5𝑧 + 7= 0
6𝑦 − 2𝑥 + 4𝑧 − 8= 0
4𝑧 − 5𝑥 + 4𝑦 + 10 = 0
3. Solve this system to find the values of x,y,z that minimize fuel consumption
4. Verify using the Hessian matrix to confirm it’s a minimum.
*Constrained Optimization
Available resources:
Determine the number of units ( x for Type A, y for Type B) that maximize the company’s
profit using the Lagrange Multipliers method.
Solution:
17
𝜕𝐿
= 40 − 𝜆1 − 2𝜆2 = 0
𝜕𝑦
𝜕𝐿
= 100 − 2𝑥 − 3𝑦 = 0
𝜕𝜆1
𝜕𝐿
= 120 − 3𝑥 − 2𝑦 = 0
𝜕𝜆2
5. Solve this system to find the optimal values of x and y that maximize the profit.
*Linear Optimization
Problem: A global shipping company wants to maximize its profit by allocating its fleet
among three shipping routes:
Constraints:
• Total ships allocated to Pacific and Indian Oceans cannot exceed 30.
Determine the optimal distribution of ships that maximizes profit using the Simplex Method.
Solution:
18
• Identify the final values of x,y,z that maximize profit.
*Nonlinear Optimization
f(x,y) = 2𝑥 2 + 3𝑦 2 + 𝑥𝑦 − 6𝑥 − 9𝑦 + 12
where:
Constraint:
𝑥 2 + 𝑦 2 ≤ 25
Determine the optimal values of x and y using Newton’s Method or Gradient Descent.
Solution:
𝜕𝐿
= 4𝑥 + 𝑦 − 6
𝜕𝑥
𝜕𝐿
= 6𝑦 + 𝑥 − 9
𝜕𝑥
19
Conclusion
20
REFERENCES
21