How to Calculate Shadow Price Linear Programming in Excel

Here’s an overview of shadow price calculations.

Calculating Shadow Price Linear Programming in Excel


Calculate Shadow Price Linear Programming in Excel: Step-by-Step Procedures

The sample dataset contains information on a wood shop where Wooden Sofas and Wooden Beds are made. The shop gets 200 and 300 in benefits per Sofa and Bed, respectively. But, there are some constraints. From this dataset, we will find out the maximum profit. We will calculate the shadow price with linear programming.

Dataset for Calculating Shadow Price Linear Programming in Excel


STEP 1 – Prepare the Dataset

  • Use the following formula in the E6 cell:
=(C6*C5)+(D6*D5)
  • Press Enter to get the result.

Inserting Total Profit Formula for Calculating Shadow Price Linear Programming in Excel

  • Use the following formula in the E7 cell:
=C7*C5+D7*D5
  • Press Enter to proceed.
  • We will get the LHS (Left Hand Side) of a constraint.

Inserting Formula of LHS of Constraints for Calculating Shadow Price Linear Programming in Excel

  • Use the following formula in the E7 cell:

=C8*C5+D8*D5

  • Press Enter to proceed.
  • We will get the LHS (Left Hand Side) of another constraint.

Inserting Formula of LHS of Constraints for Calculating Shadow Price Linear Programming in Excel

  • Use the following formula in the E7 cell:
=C9*C5+D9*D5
  • Press Enter.
  • We will get the LHS (Left Hand Side) of another constraint.

Inserting Formula of LHS of Constraint

Total Profit, which is our objective function, comes from the summation of profits of wooden sofas and beds. The total profit of wooden sofas comes from the multiplication of profit per sofa and the number of sofas. Similarly, we can get the profit of the wooden bed by multiplication. After summation of these 2, we can get the total profit. By using the same formula, we have calculated the LHS for these constraints depending on the number of sofas and beds of the constraints.

Read More: How to Do Linear Programming in Excel


STEP 2 – Use the Solver Feature

  • Click on Data and choose Solver to add the solver.

Inserting Solver Feature

  • You’ll get a window named Solved Parameters.
  • Put $E$6 in the Set Objective field. The E6 cell indicates the profit of the shop.
  • In the By Changing Variable Cells field, insert $C$5:$D$5. These 2 cells are variables.
  • Click on the Add button.

Setting Parameters Using Solver Feature

  • The Add constraint window will appear.
  • In the Cell Reference field, put $E$7:$E$9.
  • In the Constraint field, put $G$7:$G$9.
  • Press OK to proceed.

Setting Parameters in Add Constraint Box

  • Select the solving method. From the drop-down menu of the Select a solving method, select Simplex LP.
  • Press Solve to solve the problem.

Selecting Simplex LP as Solving Method to Calculate Shadow Price in Excel

  • You get a Solver Results window.
  • In the Reports field, select Answer and Sensitivity and press OK.

Generating Reports of Answer and Sensitivity in Excel Worksheet

Read More: How to Solve Integer Linear Programming in Excel


STEP 3 – Get the Answer and Sensitivity Report

  • You get the number of Wooden sofas and Wooden Beds for maximum profit.

Answer after Maximization Objective Function

  • Go to Answer Report 1. In this report, you can observe the Final Value.
  • The Final Value means the maximum profit of the shop after maximization.
  • The Cell Value represents the LHS value of the problem constraint.

Output of Maximizing Objective Function

Machine 2 LHS and Labor LHS are binding or limited by the optimization model as Slack is 0. If you change these values, the optimization parameters will be changed, and maximum optimization will change. This will be the shadow price. But, Machine 1 LHS is not binding, so it will not have any shadow price.
  • Go to Sensitivity Report 1.
  • Look for the Shadow Price column.
  • The Shadow Price is the change in the value of the objective function per unit increase in the constraint’s bound.
  • As Machine 1 LHS is not binding, it has not any shadow price.

Output of Shadow Price Linear Programming in Excel

Read More: How to Do Linear Programming with Sensitivity Analysis in Excel


Practice Section

There is a practice Excel Sheet available. You can practice from this sheet.

Exercise for Shadow Price Linear Programming in Excel


Download the Practice Workbook


Related Articles 


<< Go Back to Excel Linear Programming | Solver in Excel Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sudipta Chandra Sarker
Sudipta Chandra Sarker

Sudipta Chandra Sarker, BSc, Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked on the ExcelDemy project for over a year. For ExcelDemy, he has authored 42 articles and reviewed over ten articles. He is employed as a junior software developer at the moment. He aims to create various useful Microsoft Office Add-ins, extending the functionality of Office programs. His interests span Microsoft Office Suites, Data Science, VBA, VB.NET, ASP.NET, C#, Excel, and Desktop... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo