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

ENTC 412 - Lab 1: An Introduction To LP and MS Excel Solver: Objectives

This document provides instructions for a lab exercise on linear programming (LP) using Microsoft Excel Solver. The objectives are to learn LP basics, how to mathematically formulate an LP problem, and how to use Excel Solver to solve a simple LP problem. The procedure has two parts: an introductory lecture on LP, and using Excel Solver to solve a sample problem. Steps are provided to set up the sample problem in Excel by defining decision variables, the objective function, constraints, and their coefficients. Instructions are given to set Solver parameters to maximize the objective function subject to the constraints.

Uploaded by

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

ENTC 412 - Lab 1: An Introduction To LP and MS Excel Solver: Objectives

This document provides instructions for a lab exercise on linear programming (LP) using Microsoft Excel Solver. The objectives are to learn LP basics, how to mathematically formulate an LP problem, and how to use Excel Solver to solve a simple LP problem. The procedure has two parts: an introductory lecture on LP, and using Excel Solver to solve a sample problem. Steps are provided to set up the sample problem in Excel by defining decision variables, the objective function, constraints, and their coefficients. Instructions are given to set Solver parameters to maximize the objective function subject to the constraints.

Uploaded by

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

ENTC 412 – Lab 1: An Introduction to LP and MS Excel

Solver
Objectives
Learning Linear Programming (LP) basics, mathematical formulation of an LP problem and geometric
interpretation of two-variable LP problems. Learning how to use MS Excel Solver to solve a simple LP
problem and interpret the solution.

Materials
1. Handouts distributed by the instructor
2. MS Excel Solver
3. USB memory-stick to save your work.

Procedure
This laboratory exercise consists two parts. In the first part, you will be given an introductory lecture to LP,
which is a tool for solving optimization problems. During this lecture you will be given information on some
important terms and characteristics used to describe linear programming problems. You will also learn how
to formulate a real life problem, how to solve it and how to interpret and improve the solution. In the second
part you will use MS Excel to solve a simple problem in order to gain experience and prepare yourself for
solving more difficult problems.

Part 1

Prototype Example: (Hillier and Liberman, Introduction to Operations Research, McGraw Hill, 2001, 7th
Edition)

1
2
3
4
5
Some words on Sensitivity Analysis

Objective function:
1. The opportunity/reduced cost of a given decision variable can be interpreted as the
rate at which the value of the objective function (i.e., profit) will deteriorate for each unit
change in the optimized value of the decision variable with all other data held fixed.

2. The allowable increase/decrease associated with the original coefficient of a decision


variable tells us the range in which the coefficient of a given decision variable in the
objective function may be increased/decreased without changing the optimal solution,
where all other data are fixed.

Constraint:
1. The shadow price of a given constraint can be interpreted as the rate of improvement
in the optimal objective function value, (e.g., Z in maximizing profit or C in minimizing
cost) as RHS of that constraint increases with all other data held fixed. "Rate of
improvement" means "rate of increase" for a maximization model; and "rate of decrease"
for a minimization model. If the RHS is decreased, the shadow price is the rate at which
Z (or C) is impaired.

2. The above interpretation of shadow price is valid only within a range of the given
RHS. The shadow price may change to a different value outside this allowable range. The

6
shadow price information does not tell us how the optimal solution mix (i.e., the values
for decision variables X1, X2, etc.) changes.

Part 2

Solving the problem using MS Excel Solver

Having formulated the problem, you can then proceed to entering it into Excel.
1) Set cells to hold the values of the decision variables. For this example we have two
decision variables so let’s assign cells D3 for x1 and E3 for x2:

Observe that in the figure above the values for the variables are set to “1” – eventually these cells
will hold the best values for these variables.

2) Set the objective function


a. Set the cells to hold the coefficients of the variables in the objective function. In
the figure below, we designate D5 for the coefficient of x1 and E5 for the
coefficient of x2. For convenience and clarity, we set the coefficient in the same
column as its corresponding variable.

b. Set the cell that will hold the value of the objective function. In the figure above,
cell G5 contains the product of G5 = D3*D5 + E3*E5. It is more convenient to
use the function “SUMPRODUCT” as follows:

7
3) Set the constraints:
a. Set the cells to hold the coefficients of the decision variables in each constraint.
In the figure below we has designated D7:E7, D8:E8, and D9:E9 for the
coefficients in the constraints for Plant 1, 2 and 3 capacities, respectively.

b. Set a cell for the value of each constraint calculated using the variable values.
For instance for Plant 1 capacity constraint, the value is in cell F7, and it is
calculated using SUMPRODUCT:

The values for the values of the constraints for Plants 2 and 3 were calaculated
similarly.

c. Set cells to hold the values of the right-had-side (RHS) of each constraint. In our
example these given values are conveniently set in cells G7:G9.

8
Notice that, the values for the objective function value (G5), and the constraint
values (F7:F9), are calculated correctly for the given values of the variables
(D3:E3).

4) Set up the Solver:


a. Set solver parameters. The Target Cell is the cell with the value of the objective
function; in this case we would like to ‘Maximize” this value. The “Changing
Cells” are the cells with the values of the variables. The constraints are added by
relating the value of a constraint and its corresponding RHS.

b. Go to Options and select “Linear Model” and “Non-Negative”.

9
5) Run Solver by clicking on “Solve” :

You will notice that the cells with the variable values now contain the optimal solution to
the LP-formulation. Select “Answer” and click OK:

10
Report:
Ask the instructor for the problem set you need to solve using linear programming – your
report for this laboratory exercise consist of the solution of these problems.

11

You might also like