Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
107 views

Chapter 2 - Linear Programming (Part 2 - Excel Solver)

The document discusses using Excel to solve linear programming problems. It provides instructions on setting up the objective function and constraints in a spreadsheet, using cell references and formulas. It also explains how to use the Solver tool to find the optimal solution by adjusting decision variables, subject to the constraints. An example problem on production planning for a garment company is presented to demonstrate setting up and solving a linear program in Excel. Exercises are provided at the end for readers to practice using Solver.

Uploaded by

haarsini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Chapter 2 - Linear Programming (Part 2 - Excel Solver)

The document discusses using Excel to solve linear programming problems. It provides instructions on setting up the objective function and constraints in a spreadsheet, using cell references and formulas. It also explains how to use the Solver tool to find the optimal solution by adjusting decision variables, subject to the constraints. An example problem on production planning for a garment company is presented to demonstrate setting up and solving a linear program in Excel. Exercises are provided at the end for readers to practice using Solver.

Uploaded by

haarsini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

M C S D 11 3 3 O p e r a t i o n s R e s e a r c h & O p t i m i z a t i o n

CHAPTER 2 (Part 2):


LINEAR PROGRAMMING WITH
EXCEL

nzah@utm.my-20232024(S1)

UTM JOHOR BAHRU


Introduction
• Spreadsheet software, such as Excel and its Solver, is
a popular tool for analyzing and solving small linear
programming problems.
• The spreadsheet offers very convenient data entry
and editing features which allows the user to gain a
greater understanding of how to construct linear
programs.
• A spreadsheet requires that column and row
headings for the specific model be set up and that
constraint and objective function formulas be input
in their entirety.
• Much of the power of the spreadsheet lies in its
ability to immediately reveal the results of any
changes made in the solution.

3
Setting up the Problem in Excel

1 Defining the 2 Specifying Constraints 3 Applying Solver


Objective Function
In Excel, we use cell references We represent constraints in Excel Excel's Solver tool can be utilized to find
and formulas to represent the using inequalities. By setting up the optimal solution to the linear
objective function. This allows us the constraints properly, we can programming problem by adjusting the
to easily optimize for maximum ensure that the solution lies within values of decision variables.
or minimum values. the feasible region.

4
Solver and Its Features

Solver Add-In Objective Cell Decision Variables

Excel's Solver Add-In is a The objective cell in Decision variables represent


powerful tool that enables Solver specifies the cell the values to be adjusted to
us to find optimal solutions that contains the optimize the objective
by adjusting decision objective function. We function. Solver allows us to
variables, subject to can maximize or specify the range and
constraints. minimize this cell to find constraints for these variables.
the optimal solution.

5
The Simplex Method

A popular algorithm used to solve linear


What is the Simplex Method? programming problems. It iteratively improves the
solution until an optimal solution is found.

The simplex method starts with an initial feasible


How does it Work? solution and moves along the edges of the
feasible region, improving the objective function
value at each iteration.

It is efficient for solving large-scale linear


Advantages of the Simplex Method programming problems and provides insights into the
sensitivity of the solution to changes in the problem's
parameters.

6
Solver Add-Ins
1
The Solver Add-In must be added to the Tools menu by carry
out the following steps (once-only):
o Select the menu: File > More > Options > Add-ins > Excel
Add-ins (this will take a few moments to load the
necessary file).
o From the dialogue box presented, check the box for
Solver Add-In.
o After clicking OK, you will then be able to access the
Solver option from the Data tab.

7
Example: Reddy Mikk Company Case Study

Variables:
X1 = tons produced daily of exterior paint
X2 = tons produced daily of interior paint
Z = total daily profit (in thousands of dollars)
Objective: Maximize, Z = 5X1 + 4X2

Constraints:
1. 6𝑋! + 4𝑋" ≤ 24 (raw material M1)
2. 𝑋! +2𝑋" ≤ 6 (raw material M2)
3. 𝑋" − 𝑋! ≤ 1
4. 𝑋" ≤ 2
5. 𝑋! ≥ 0; 𝑋" ≥ 0
8
8
Example: Reddy Mikk Company Case Study
Formulating the Model on a Spreadsheet

Three types of information required to begin the process of using the spreadsheet to formulate
a linear programming model for the problem.
(1) Input data cells (B5:C9 and F6:F9)
(2) Cells representing the variables and the objective function (B13:D13)
(3) Algebraic definitions of the objective function and the left-hand side of the constraints
(cells D5:D9)

9
Example: Reddy Mikk Company Case Study
Algebraic Definition

§ Place the resulting formulas appropriately in cells D5:D9, as the following table shows:

§ Actually, you only need to enter the formula for cell D5 and then copy it into cells D6:D9
§ To do so correctly, it is necessary to use fixed referencing of the cells representing X1 and X2
($B$13 and $C$13).
§ The explicit formulas just described are impractical for large LPs. Instead, the formula in
cell D5 can be written compactly as = SUMPRODUCT(B5:C5,$B$13:$C$13)

10
Example: Reddy Mikk Company Case Study
Apply Excel Solver

§ Click Solver from the spreadsheet menu bar to access Solver parameters dialogue box.

Max: maximum objective


Min: minimum objective choose the cell of
Value of: define a value that you want objective

Choose cells of
decision variables

Define Constraints

Choose solving method

Finally click Solve. Then,


it will give you optimized
result.

11
Example: Reddy Mikk Company Case Study
Apply Excel Solver (cont’d)

§ Update the dialogue box as follows:

1
2

12
Example: Reddy Mikk Company Case Study
Apply Excel Solver (cont’d)

§ A new dialogue box ”Solver Results” will prompt. Then, it show the status of the solution.

§ The optimum value of Z will appear in cell D5 and the values of X1 and X2 will go to cells B13 and
C13, respectively.
§ For convenience, cell D13 exhibits the optimum value of Z by entering the formula = D5 in cell
D13, thus displaying the entire optimum solution in contiguous cells.

13
Solution from Solver

If a problem has no feasible solution,


Solver will issue the explicit message The Solver results dialogue box
“Solver could not find a feasible provides the opportunity to request
solution”. If the optimal objective further details about the solution,
value is unbounded (not finite), including the sensitivity analysis
Solver will issue the somewhat report. We will discuss these topic in
ambiguous message “The Set Cell Chapter 2 Part 4
values do not converge”.

14
Solution from Solver (cont’d)

§ Descriptive Excel range names can be used to enhance readability.

§ A range is created by highlighting the desired cells (Example: D5), typing the range name in the
top left box of the sheet, and then pressing Return.

15
EXERCISES
Use Excel Solver to solve the following problem.

#1: The Alex Garment Company manufactures men’s shirts and women’s blouses. The production process includes cutting,
sewing, and packaging. The company employs 25 workers in the cutting department, 35 in the sewing department, and 5 in
the packaging department. The factory works one 8-hr shift, 5 days a week. The following table gives the time requirements
and profits per unit to produce the two garments. Determine the optimal weekly production schedule for Alex Garment
Company.

#2: In Hamid grocery store, shelf space is limited and must be used effectively to increase profit. Two cereal items, Grano
and Wheatie, compete for a total shelf space of 60 ft2 . A box of Grano occupies 0.2 ft2 and a box of Wheatie needs 0.4 ft2 . The
maximum daily demands of Grano and Wheatie are 200 and 120 boxes, respectively. A box of Grano nets $1.00 in profit and a
box of Wheatie $1.35. Hamid thinks that because the unit profit of Wheatie is 35% higher than that of Grano, Wheatie should be
allocated 35% more space than Grano, which amounts to allocating about 57% to Wheatie and 43% to Grano. Determine the
optimal value for the items to be allocated on the shelf to maximise the profit.

16
EXERCISES
Use Excel Solver to solve the following problem.

#3: A firm has two bottling plant. One plant located at Coimbatore and other plant located at
Chennai. Each plant produces three types of drinks; Coca-Cola , Fanta and Thumps-up. The
following table show the data.
Number of bottles produced per day by plant at
Product Coimbatore Chennai
Coca-Cola 15000 15000
Fanta 30000 10000
Thumps-Up 20000 50000

Cost per day 600 400


(per unit)

Market survey indicates that during the month of April there will be a demand of 200,000 bottles of
Coca-cola , 400,000 bottles of Fanta and 440,000 bottles of Thumps-up. For how many days each
plant be run in April to minimize the production cost, while still meeting the market demand?

17

You might also like