BA6 - Linear Optimization
BA6 - Linear Optimization
INDIVIDUAL
COPYRIGHT VIEWS
CREDITS JARGONS
www.viswamitra.org| 2
AGENDA
BUILDING LINEAR OPTIMIZATION MODELS ON SPREADSHEETS,
BLENDING MODELS,
www.viswamitra.org| 3
BUSINESS ANALYTICS Business Analytics
Evolution of Analytics
www.viswamitra.org| 5
EXAMPLE
Let’s assume a company produces two types of products: Product A and Product B.
The company wants to determine how many units of each product to produce to maximize its profit.
Maximize Z =5x1+3x2
Where Z is the total profit.
www.viswamitra.org| 6
EXAMPLE
Step 3: Constraints
Assume the following constraints:
1. Material Availability:
o Each unit of Product A requires 2 units of raw material.
o Each unit of Product B requires 1 unit of raw material.
o The company has a total of 100 units of raw material available.
This constraint can be written as:
2x1+x2 ≤ 100
2. Labor Availability: 3. Non-negativity Constraint: The
number of units of Product A and
o Each unit of Product A requires 3 hours of labor.
Product B cannot be negative:
o Each unit of Product B requires 2 hours of labor.
o There are 120 labor hours available.
x1≥0, x2≥0
This constraint can be written as:
3x1+2x2≤120 www.viswamitra.org| 7
EXAMPLE
Maximize Z =5x1+3x2
Subject to:
2x1+x2 ≤ 100
3x1+2x2≤120
x1≥0, x2≥0
www.viswamitra.org| 8
BUILDING LINEAR OPTIMIZATION MODELS ON SPREADSHEETS
1. Define Decision Variables: Input cells represent the decision variables (e.g., quantities of products to produce).
2. Formulate the Objective Function: Create a formula to express the goal (e.g., maximize profit or minimize cost)
based on the decision variables.
3. Set Constraints: Define the limitations on resources (e.g., raw materials or labor), which are expressed as
inequalities in other cells.
4. Open Solver: Go to the Data tab, click Solver, and configure the parameters. Set the objective to the cell
containing the objective function, select maximize or minimize, and specify the decision variable cells.
5. Add Constraints: Use the Add button to specify resource constraints and non-negativity constraints (ensuring
decision variables are non-negative).
6. Select **** as the solving method for linear problems and click Solve.
www.viswamitra.org| 9
SOLVING LINEAR OPTIMIZATION MODELS
In linear optimization, the goal is to find values for the decision variables that either maximize or minimize an
objective function while satisfying all constraints. Any solution that adheres to the constraints is considered a
feasible solution. However, finding the best (or optimal solution) among many feasible solutions can be complex,
especially when there are numerous variables and constraints.
Solver: Excel provides a tool called Solver, which is designed to handle these optimization problems. Solver allows
users to set the objective function, define decision variables, and include constraints. It then uses advanced
algorithms to find the optimal solution.
Premium Solver: It is an enhanced version of the standard Excel Solver. It offers better performance, greater
accuracy, and improved reporting. While the standard Solver is sufficient for many optimization problems, the
Premium Solver offers additional features and is recommended for more complex models.
www.viswamitra.org| 10
RECAP
1. What is the objective of linear programming? 6. In a linear programming problem, what are the non-negativity
a) Minimize costs constraints?
b) Maximize profits a) Decision variables must be zero
c) Achieve the best outcome (maximization or minimization) b) Decision variables cannot be negative
d) Solve all possible constraints c) Decision variables must be positive integers
d) Decision variables can be negative
2. What does the objective function represent in linear programming?
a) Decision variables 7. What is the optimal solution in linear programming?
b) Constraints a) The point where all constraints are equal
c) The function to be maximized or minimized b) The feasible solution that maximizes or minimizes the objective
d) The feasible region function
c) Any point within the feasible region
3. Which of the following is NOT a component of a linear programming d) A solution that violates one constraint
model?
a) Objective function b) Constraints 8. In a maximization problem, the objective function value:
c) Decision variables d) Non-linear equations a) Decreases as we move to the edge of the feasible region
b) Increases as we move to the boundary of the feasible region
4. In linear programming, the decision variables represent: c) Always stays the same
a) The outcomes of the optimization problem d) Has no relevance to the feasible region
b) The unknowns that affect the objective function
c) The maximum value of the objective function 9. In the problem: Maximize Z =5x1+3x2 what is Z
d) The available resources a) A decision variable b) A constraint
c) The objective function d) A constant
5. A feasible solution is one that:
a) Minimizes the objective function 10. Which method is typically used to solve linear optimization models in
b) Maximizes the objective function Excel?
c) Satisfies all constraints a) Solver b) Data Analysis
d) Violates the constraints c) Pivot Tables d) Conditional Formatting
www.viswamitra.org| 11
RECAP
11. A problem is considered infeasible if: 14. The first step in using Solver for linear optimization is:
a) There is no feasible region a) Set the constraints
b) The constraints conflict, allowing no valid solution b) Define the objective function
c) The objective function is not defined c) Define decision variables
d) The objective function is negative d) Set the Solver method
12. In a linear optimization problem, which solution is selected? 15. When adding constraints in Solver, you need to specify:
a) Any solution a) The method for solving
b) A feasible solution b) Which cells are non-negative
c) The solution that satisfies the most constraints c) Limits on the decision variables
d) The optimal solution d) The final value of the objective function
13. In Excel's Solver, decision variables are represented by: 16. In linear optimization using Excel's Solver, constraints are
a) Constraints represented as:
b) Input cells a) Formulas in cells
c) The objective cell b) Text in the worksheet
d) The Solver button c) Input data
d) Formatting rules
www.viswamitra.org| 12
GRAPHICAL INTERPRETATION OF LINEAR OPTIMIZATION
www.viswamitra.org| 13
USING OPTIMIZATION MODELS OF PREDICTION AND INSIGHT
Once the model is solved (e.g., using Solver), we get the optimal values of x1 and x2 that maximize profit under the
given constraints. However, the true value of this optimization model comes from analyzing the impact of changes:
Scenario Analysis: (Refer Example discussed in Linear Optimization ) Sensitivity Analysis
What-If Questions on Resources: Tools like Solver's Sensitivity Report help
Increase in Material Supply: If the company can acquire more raw material, how much would profit increase? By identify:
adjusting the material constraint (e.g., from 100 to 110 units) and re-solving, managers can see if the additional
investment is worthwhile.
• Binding Constraints: Constraints that
limit the optimal solution. If the
Increase in Labor Hours: If more labour hours become available, what would the impact be on production and profit?
material constraint is binding,
By updating the labour constraint (e.g., from 120 to 140 hours), managers can determine if hiring temporary workers
would be beneficial.
increasing material availability could
significantly improve profit.
Price Sensitivity Analysis:
• Shadow Prices: The value of obtaining
If the profit per unit of Product A decreases from $5 to $4, how much does the total profit drop? This type of analysis
helps in strategic planning, especially when market conditions force a price change.
one more unit of a resource. For
example, if the shadow price of raw
material is $2, acquiring an extra unit
Sensitivity Analysis could increase profit by $2.
Tools like Solver's Sensitivity Report help identify: This analysis allows managers to make data-
• Binding Constraints: Constraints that limit the optimal solution. If the material constraint is binding, increasing driven decisions, prioritize resource
material availability could significantly improve profit. allocation, and explore strategic
• Shadow Prices: The value of obtaining one more unit of a resource. For example, if the shadow price of raw opportunities effectively.
material is $2, acquiring an extra unit could increase profit by $2.
This analysis allows managers to make data-driven decisions, prioritize resource allocation, and explore strategic
opportunities effectively. www.viswamitra.org| 14
TYPES OF CONSTRAINTS IN OPTIMIZATION MODELS
1. Simple Bounds ▪ "The marketing plan should ensure at least 400 customers are
• These constraints restrict the value of a single variable. contacted each month.“
• Examples:
• "No more than $10,000 may be invested in stock ABC," mathematically: 4. Proportional Relationships
ABC ≤ 10,000 o These constraints involve ratios or specific relationships between
• "At least 350 units of product Y must be produced to meet customer variables, commonly seen in mixing or blending problems.
commitments," mathematically: Y ≥ 350 o Examples:
▪ "The amount invested in aggressive growth stocks cannot be more
2. Limitations than twice the amount invested in equity-income funds."
o These constraints deal with the allocation of scarce resources, ensuring ▪ "The octane rating of gasoline from mixing different crude blends
that resource usage does not exceed availability. must be at least 89."
o Examples:
▪ "The amount of material used in production cannot exceed 5. Balance Constraints
inventory available." o These constraints ensure that input equals output, often used in flow or
▪ "Minutes used in assembly cannot exceed the available labor inventory models to account for material or money movement.
hours." o Examples:
▪ "The amount shipped from the Austin plant in July cannot exceed ▪ "Production in June plus any available inventory must equal June’s
the plant’s capacity." demand plus inventory held to July."
▪ "The total amount shipped to a distribution center from all plants
3. Requirements must equal the amount shipped from the center to all customers."
o These constraints specify minimum levels of performance or obligations ▪ "The total amount of money invested or saved in March must
that must be met. equal the amount available at the end of February."
o Examples:
▪ "Enough cash must be available in February to meet financial
obligations."
▪ "Production must be sufficient to meet customer orders."
www.viswamitra.org| 15
PROCESS SELECTION MODELS
Process selection models are used to make decisions about which process to choose for producing a good. These
models help organizations decide between different production options based on factors like cost, efficiency, and
resource availability. One common application of process selection models is in make-or-buy decisions, where a
company must determine whether to produce a product internally or outsource it to an external supplier.
Key Concepts
• Make-or-Buy Decision: A strategic choice between manufacturing a product in-house or contracting the
production to another company.
• Objective: The goal is usually to minimize cost or maximize profit while meeting production requirements and
adhering to resource limitations.
• Considerations: Factors such as production cost, capacity constraints, quality requirements, and flexibility
influence these decisions.
www.viswamitra.org| 16
BLENDING MODELS
www.viswamitra.org| 17
PORTFOLIO INVESTMENT MODELS
Financial investment problems, especially those related to portfolio management, are commonly modelled and solved using linear optimization techniques.
These portfolio investment models share many characteristics with blending problems, as they involve selecting and allocating various assets to achieve a
specific financial goal while meeting a set of constraints.
www.viswamitra.org| 18
RECAP
USING OPTIMIZATION MODELS FOR PREDICTION AND INSIGHT
3. What tool can be used in Excel to perform what-if analysis on optimization models?
a) Solver Sensitivity Report.
b) VLOOKUP
c) Data Analysis ToolPak
www.viswamitra.org| 22
RECAP
PORTFOLIO INVESTMENT MODELS 26. In portfolio models, proportional constraints can ensure:
21. Portfolio investment models are primarily used for: a) All variables are positive
a) Scheduling resources b) Proper risk management.
b) Asset allocation to maximize returns. c) Equal labor distribution
c) Mixing materials for production
27. A common application of linear optimization in finance is:
22. Which constraint is common in portfolio models? a) Blending raw materials
a) Budget constraint. b) Portfolio risk assessment.
b) Material availability constraint c) Process selection
c) Labor scheduling constraint
28. Scenario analysis in portfolio models helps investors:
23. Portfolio models involve blending different: a) Identify new investment options
a) Production processes b) Evaluate impact of market changes.
b) Financial assets. c) Schedule investments
c) Raw materials
29. Diversification in portfolio management:
24. An investment constraint may require: a) Reduces risk.
a) Diversifying to reduce risk. b) Increases raw material use
b) Mixing chemicals in correct proportions c) Balances labor hours
c) Ensuring equal labor hours
30. What-if analysis in financial optimization helps:
25. What is a key objective in portfolio optimization? a) Predict labor hours
a) Minimizing labor hours b) Understand investment outcomes.
b) Maximizing investment returns. c) Allocate raw materials
c) Reducing material waste
www.viswamitra.org| 23
RECAP
TYPES OF CONSTRAINTS IN OPTIMIZATION MODELS