#1 Excel tutorial on the net

  • Assignment Problem

Formulate the Model | Trial and Error | Solve the Model

Use the solver in Excel to find the assignment of persons to tasks that minimizes the total cost.

Formulate the Model

The model we are going to solve looks as follows in Excel.

Assignment Problem in Excel

1. To formulate this assignment problem , answer the following three questions.

a. What are the decisions to be made? For this problem, we need Excel to find out which person to assign to which task (Yes=1, No=0). For example, if we assign Person 1 to Task 1, cell C10 equals 1. If not, cell C10 equals 0.

b. What are the constraints on these decisions? Each person can only do one task (Supply=1). Each task only needs one person (Demand=1).

c. What is the overall measure of performance for these decisions? The overall measure of performance is the total cost of the assignment, so the objective is to minimize this quantity.

2. To make the model easier to understand, create the following named ranges .

Range Name Cells
Cost C4:E6
Assignment C10:E12
PersonsAssigned C14:E14
Demand C16:E16
TasksAssigned G10:G12
Supply I10:I12
TotalCost I16

3. Insert the following functions.

Insert Functions

Explanation: The SUM functions calculate the number of tasks assigned to a person and the number of persons assigned to a task. Total Cost equals the sumproduct of Cost and Assignment.

Trial and Error

With this formulation, it becomes easy to analyze any trial solution.

For example, if we assign Person 1 to Task 1, Person 2 to task 2 and Person 3 to Task 3, Tasks Assigned equals Supply and Persons Assigned equals Demand. This solution has a total cost of 147.

Trial Solution

It is not necessary to use trial and error. We shall describe next how the Excel Solver can be used to quickly find the optimal solution.

Solve the Model

To find the optimal solution, execute the following steps.

1. On the Data tab, in the Analyze group, click Solver.

Click Solver

Note: can't find the Solver button? Click here to load the Solver add-in .

Enter the solver parameters (read on). The result should be consistent with the picture below.

Solver Parameters

You have the choice of typing the range names or clicking on the cells in the spreadsheet.

2. Enter TotalCost for the Objective.

3. Click Min.

4. Enter Assignment for the Changing Variable Cells.

5. Click Add to enter the following constraint.

Binary Constraint

Note: binary variables are either 0 or 1.

6. Click Add to enter the following constraint.

Demand Constraint

7. Click Add to enter the following constraint.

Supply Constraint

8. Check 'Make Unconstrained Variables Non-Negative' and select 'Simplex LP'.

9. Finally, click Solve.

Solver Results

The optimal solution:

Assignment Problem Result

Conclusion: it is optimal to assign Person 1 to task 2, Person 2 to Task 3 and Person 3 to Task 1. This solution gives the minimum cost of 129. All constraints are satisfied.

Learn more, it's easy

  • Transportation Problem
  • Shortest Path Problem
  • Maximum Flow Problem
  • Capital Investment
  • Sensitivity Analysis
  • System of Linear Equations

Download Excel File

  • assignment-problem.xlsx

Next Chapter

  • Analysis ToolPak

Follow Excel Easy

Excel Easy on Facebook

Become an Excel Pro

  • 300 Examples

Assignment Problem • © 2010-2024 Excel is Awesome, we'll show you: Introduction • Basics • Functions • Data Analysis • VBA

  • Ablebits blog
  • Financial functions

How to use Solver in Excel with examples

Svetlana Cheusheva

The tutorial explains how to add and where to find Solver in different Excel versions, from 2016 to 2003. Step-by-step examples show how to use Excel Solver to find optimal solutions for linear programming and other kinds of problems.

Everyone knows that Microsoft Excel contains a lot of useful functions and powerful tools that can save you hours of calculations. But did you know that it also has a tool that can help you find optimal solutions for decision problems?

In this tutorial, we are going to cover all essential aspects of the Excel Solver add-in and provide a step-by-step guide on how to use it most effectively.

What is Excel Solver?

Excel Solver belongs to a special set of commands often referred to as What-if Analysis Tools. It is primarily purposed for simulation and optimization of various business and engineering models.

The Excel Solver add-in is especially useful for solving linear programming problems, aka linear optimization problems, and therefore is sometimes called a linear programming solver . Apart from that, it can handle smooth nonlinear and non-smooth problems. Please see Excel Solver algorithms for more details.

How to add Solver to Excel

The Solver add-in is included with all versions of Microsoft Excel beginning with 2003, but it is not enabled by default.

To add Solver to your Excel, perform the following steps:

  • In Excel 2010 - Excel 365, click File > Options . In Excel 2007, click the Microsoft Office button, and then click Excel Options .

Open the Excel Options dialog to get to the Excel Add-ins list.

To get Solver on Excel 2003 , go to the Tools menu, and click Add-Ins . In the Add-Ins available list, check the Solver Add-in box, and click OK .

Where is Solver in Excel?

The Solver button in Excel

Where is Solver in Excel 2003?

Solver in Excel 2003

Now that you know where to find Solver in Excel, open a new worksheet and let's get started!

How to use Solver in Excel

Before running the Excel Solver add-in, formulate the model you want to solve in a worksheet. In this example, let's find a solution for the following simple optimization problem.

Problem . Supposing, you are the owner of a beauty salon and you are planning on providing a new service to your clients. For this, you need to buy a new equipment that costs $40,000, which should be paid by instalments within 12 months.

Goal : Calculate the minimal cost per service that will let you pay for the new equipment within the specified timeframe.

A simple optimization model to solve

And now, let's see how Excel Solver can find a solution for this problem.

1. Run Excel Solver

2. define the problem.

The Solver Parameters window will open where you have to set up the 3 primary components:

  • Objective cell

Variable cells

Constraints.

Exactly what does Excel Solver do with the above parameters? It finds the optimal value (maximum, minimum or specified) for the formula in the Objective cell by changing the values in the Variable cells, and subject to limitations in the Constraints cells.

The Objective cell ( Target cell in earlier Excel versions) is the cell containing a formula that represents the objective, or goal, of the problem. The objective can be to maximize, minimize, or achieve some target value.

Setting the objective

Variable cells ( Changing cells or Adjustable cells in earlier versions) are cells that contain variable data that can be changed to achieve the objective. Excel Solver allows specifying up to 200 variable cells.

In this example, we have a couple of cells whose values can be changed:

  • Projected clients per month (B4) that should be less than or equal to 50; and
  • Cost per service (B5) that we want Excel Solver to calculate.

Specifying Variable cells

The Excel Solver Constrains are restrictions or limits of the possible solutions to the problem. To put it differently, constraints are the conditions that must be met.

To add a constraint(s), do the following:

  • Click the Add button right to the " Subject to the Constraints " box.

Adding a constraint

  • In the Constraint window, enter a constraint.
  • Click the Add button to add the constraint to the list.

Click the Add button to add the constraint to the list.

  • Continue entering other constraints.
  • After you have entered the final constraint, click OK to return to the main Solver Parameters window.

Excel Solver allows specifying the following relationships between the referenced cell and the constraint.

  • Less than or equal to , equal to , and greater than or equal to . You set these relationships by selecting a cell in the Cell Reference box, choosing one of the following signs: <= , =, or >= , and then typing a number, cell reference / cell name, or formula in the Constraint box (please see the above screenshot).
  • Integer . If the referenced cell must be an integer, select int , and the word integer will appear in the Constraint box.
  • Different values . If each cell in the referenced range must contain a different value, select dif , and the word AllDifferent will appear in the Constraint box.
  • Binary . If you want to limit a referenced cell either to 0 or 1, select bin , and the word binary will appear in the Constraint box.

To edit or delete an existing constraint do the following:

  • In the Solver Parameters dialog box, click the constraint.
  • To modify the selected constraint, click Change and make the changes you want.
  • To delete the constraint, click the Delete button.

In this example, the constraints are:

  • B3=40000 - cost of the new equipment is $40,000.
  • B4<=50 - the number of projected patients per month in under 50.

Excel Solver Constraints

3. Solve the problem

After you've configured all the parameters, click the Solve button at the bottom of the Solver Parameters window (see the screenshot above) and let the Excel Solver add-in find the optimal solution for your problem.

Depending on the model complexity, computer memory and processor speed, it may take a few seconds, a few minutes, or even a few hours.

The Solver Results dialog window

The Solver Result window will close and the solution will appear on the worksheet right away.

The solution for the problem is found.

  • If the Excel Solver has been processing a certain problem for too long, you can interrupt the process by pressing the Esc key. Excel will recalculate the worksheet with the last values found for the Variable cells.
  • To get more details about the solved problem, click a report type in the Reports box, and then click OK . The report will be created on a new worksheet:

Excel Solver Reports

Excel Solver examples

Below you will find two more examples of using the Excel Solver addin. First, we will find a solution for a well-known puzzle, and then solve a real-life linear programming problem.

Excel Solver example 1 (magic square)

I believe everyone is familiar with "magic square" puzzles where you have to put a set of numbers in a square so that all rows, columns and diagonals add up to a certain number.

For instance, do you know a solution for the 3x3 square containing numbers from 1 to 9 where each row, column and diagonal adds up to 15?

It's probably no big deal to solve this puzzle by trial and error, but I bet the Solver will find the solution faster. Our part of the job is to properly define the problem.

The magic square puzzle to solve

With all the formulas in place, run Solver and set up the following parameters:

  • Set Objective . In this example, we don't need to set any objective, so leave this box empty.
  • Variable Cells . We want to populate numbers in cells B2 to D4, so select the range B2:D4.
  • $B$2:$D$4 = AllDifferent - all of the Variable cells should contain different values.
  • $B$2:$D$4 = integer - all of the Variable cells should be integers.
  • $B$5:$D$5 = 15 - the sum of values in each column should equal 15.
  • $E$2:$E$4 = 15 - the sum of values in each row should equal 15.
  • $B$7:$B$8 = 15 - the sum of both diagonals should equal 15.

Set up the Excel Solver parameters.

Excel Solver example 2 (linear programming problem)

This is an example of a simple transportation optimization problem with a linear objective. More complex optimization models of this kind are used by many companies to save thousands of dollars each year.

Problem : You want to minimize the cost of shipping goods from 2 different warehouses to 4 different customers. Each warehouse has a limited supply and each customer has a certain demand.

Goal : Minimize the total shipping cost, not exceeding the quantity available at each warehouse, and meeting the demand of each customer.

Source data

Transportation optimization model

Formulating the model

To define our linear programming problem for the Excel Solver, let's answer the 3 main questions:

  • What decisions are to be made? We want to calculate the optimal quantity of goods to deliver to each customer from each warehouse. These are Variable cells (B7:E8).
  • What are the constraints? The supplies available at each warehouse (I7:I8) cannot be exceeded, and the quantity ordered by each customer (B10:E10) should be delivered. These are Constrained cells .
  • What is the goal? The minimal total cost of shipping. And this is our Objective cell (C12).

Formulating the model using Excel formulas

To make our transportation optimization model easier to understand, create the following named ranges:

Range name Cells Solver parameter
Products_shipped B7:E8 Variable cells
Available I7:I8 Constraint
Total_shipped G7:G8 Constraint
Ordered B10:E10 Constraint
Total_received B9:E9 Constraint
Shipping_cost C12 Objective

The last thing left for you to do is configure the Excel Solver parameters:

  • Objective: Shipping_cost set to Min
  • Variable cells: Products_shipped
  • Constraints: Total_received = Ordered and Total_shipped <= Available

Configure the Excel Solver parameters.

How to save and load Excel Solver scenarios

When solving a certain model, you may want to save your Variable cell values as a scenario that you can view or re-use later.

For example, when calculating the minimal service cost in the very first example discussed in this tutorial, you may want to try different numbers of projected clients per month and see how that affects the service cost. At that, you may want to save the most probable scenario you've already calculated and restore it at any moment.

Saving an Excel Solver scenario boils down to selecting a range of cells to save the data in. Loading a Solver model is just a matter of providing Excel with the range of cells where your model is saved. The detailed steps follow below.

Saving the model

To save the Excel Solver scenario, perform the following steps:

  • Open the worksheet with the calculated model and run the Excel Solver.

Saving the Excel Solver scenario

  • Excel will save your current model, which may look something similar to this:

The current Excel Solver scenario is saved.

Loading the saved model

When you decide to restore the saved scenario, do the following:

  • In the Solver Parameters window, click the Load/Save button.

Select the range of cells containing the saved model and click Load.

  • This will open the main Excel Solver window with the parameters of the previously saved model. All you need to do is to click the Solve button to re-calculate it.

Excel Solver algorithms

When defining a problem for the Excel Solver, you can choose one of the following methods in the Select a Solving Method dropdown box:

  • GRG Nonlinear. Generalized Reduced Gradient Nonlinear algorithm is used for problems that are smooth nonlinear, i.e. in which at least one of the constraints is a smooth nonlinear function of the decision variables. More details can be found here .
  • LP Simplex . The Simplex LP Solving method is based the Simplex algorithm created by an American mathematical scientist George Dantzig. It is used for solving so called Linear Programming problems - mathematical models whose requirements are characterized by linear relationships, i.e. consist of a single objective represented by a linear equation that must be maximized or minimized. For more information, please check out this page .
  • Evolutionary . It is used for non-smooth problems, which are the most difficult type of optimization problems to solve because some of the functions are non-smooth or even discontinuous, and therefore it's difficult to determine the direction in which a function is increasing or decreasing. For more information, please see this page .

This is how you can use Solver in Excel to find the best solutions for your decision problems. At the end of this post, you can download the sample workbook with all the examples discussed in this tutorial and reverse-engineer them for better understanding. I thank you for reading and hope to see you on our blog next week.

Practice workbook for download

You may also be interested in.

  • Using Excel Goal Seek for What-If analysis
  • Excel Copilot with examples
  • Linear regression analysis in Excel
  • Microsoft Excel formulas with examples
  • How to use VLOOKUP & SUM or SUMIF functions in Excel

Table of contents

Ablebits.com website logo

How to Use Excel Solver for Linear Programming (with Easy Steps)

Aung Shine

Introduction to Linear Programming

Linear Programming is an important aspect of Statistics and Applied Mathematics. You can perform predictive analysis with prevalent data variables. It helps us in the optimization of the resources. We must have some constraints and an objective function for that purpose. The Excel Solver can quickly figure out the solutions to Linear Programming problems by solving equations in Excel.

We’ll use the following business problem as an example.

A manufacturer has two kinds of products, ‘A’ and ‘B’. A single unit of product A requires three raw materials, P 25 kg, Q 35 kg, and R 10 kg. Similarly, B requires P 15 kg, Q 20 kg, and R 15 kg. The manufacturer needs a minimum of P 500 kg, Q 850 kg, and R 300 kg. If A costs $35 per unit and B costs $30 per unit, how many units of each product should the manufacturer blend to meet the minimum raw material requirements at a low cost as possible, and what is the price?

STEP 1 – Enabling the Solver Tool in Excel

  • Go to File and select Options .
  • Select the Add-ins tab.
  • Choose Excel Add-ins from the Manage drop-down.

Enable Solver in Excel

  • The Add-ins dialog box will pop out.
  • Check the box for Solver Add-in .

Enable Solver in Excel

  • You’ll see the Solver command in the Analyze section under the Data tab.

Enable Solver in Excel

STEP 2 – Inserting Constraints

We’ll input the Constraints and the Objective Function in the Excel worksheet. According to the problem, we’ll blend x units of product A and y units of B . The total cost will be $35x + $30y . This is our objective function, and we want to minimize this cost. At the same time, we have to meet the requirements. 25x + 15y >= 500 , 35x + 20y >= 850 , 10x+15y >= 300 , x >= 0 and y >= 0 are our constraints.

  • Type in the per-unit costs of A and B .
  • Input the materials under the respective products.
  • Insert the minimum required amounts.

assignment problem linear programming excel

STEP 3 – Creating the Excel Formula

  • We’ll insert the value of x in cell C5 and y in cell D5 .
  • Select cell E6 a nd insert the formula:
  • Press Enter .
  • It’ll return 0 or blank as the C5 and D5 cell values are empty for the moment.

assignment problem linear programming excel

  • Select the cell E8 to insert the formula:
  • Press Enter to return the values.
  • Use the AutoFill tool to complete the rest.
  • The results are 0 as C5 and D5 are empty.

assignment problem linear programming excel

Read More: How to Do Portfolio Optimization Using Excel Solver

STEP 4 – Using the Excel Solver to Solve with Linear Programming

  • Select the Solver program under the Data tab.
  • The Solver Parameters dialog box will emerge.
  • Choose cell E6 in the Set Objective box.
  • Check the circle for Min .
  • Select the range C5:D5 as variable cells.
  • Press Add to add the constraints.

Solve Linear Programming with Excel Solver

  • The Add Constraint dialog box will appear.
  • Choose the range C5:D5 and click the >= ( greater than or equal to ) symbol from the drop-down.
  • Press Add .

Solve Linear Programming with Excel Solver

  • Choose the range E8:E10 for minimum requirement constraints.
  • Click the >= symbol from the drop-down.
  • Select the range G8:G10 in the Constraint field.

Solve Linear Programming with Excel Solver

  • Hence, you’ll see the desired constraints.
  • Press Solve .

Solve Linear Programming with Excel Solver

  • You’ll get a dialog box about the solved results.
  • Check Keep Solver Solution .

Solve Linear Programming with Excel Solver

  • This’ll return the precise results in the appointed cells.

Solve Linear Programming with Excel Solver

Read More: Example with Excel Solver to Minimize Cost

Final Output

  • The value of x is 77 units and y is 6.15 units.
  • The minimum cost is $912 .
  • The optimized amounts of P , Q , and R is 54 kg, 850 kg, and 300 kg respectively.
  • The manufacturer should blend 77 units of A and 6.15 units of B .

assignment problem linear programming excel

Download the Practice Workbook

Related Articles

  • How to Use Excel Solver to Rate Sports Team
  • How to Use Excel Solver to Determine Which Projects Should Be Undertaken?
  • Solving Sequencing Problems Using Excel Solver Solution
  • Solving Transportation or Distribution Problems Using Excel Solver
  • How to Assign Work Using Evolutionary Solver in Excel
  • Resource Allocation in Excel
  • Solving Equations in Excel

<< Go Back to Excel Solver Examples | Solver in Excel  |  Learn Excel

What is ExcelDemy?

Tags: Excel Solver Examples

Aung Shine

Aung Shine completed his bachelor’s in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. It has been almost 2 years since he joined SOFTEKO and actively working on the ExcelDemy project. Currently he works as a Team Leader where he guides his team members to create technical content. He has published 150+ articles and reviewed 50+ articles. He has also solved various user problems before. He has interests in Data Analysis, Power Query, Advanced Excel,... Read Full Bio

Leave a reply Cancel reply

ExcelDemy is a place where you can learn Excel, and get solutions to your Excel & Excel VBA-related problems, Data Analysis with Excel, etc. We provide tips, how to guide, provide online training, and also provide Excel solutions to your business problems.

Contact  |  Privacy Policy  |  TOS

  • User Reviews
  • List of Services
  • Service Pricing

trustpilot review

  • Create Basic Excel Pivot Tables
  • Excel Formulas and Functions
  • Excel Charts and SmartArt Graphics
  • Advanced Excel Training
  • Data Analysis Excel for Beginners

DMCA.com Protection Status

Advanced Excel Exercises with Solutions PDF

ExcelDemy

Learn Programming and technology with ease @ developerpublish.com

assignment problem linear programming excel

  • What is My IP Address?
  • Password Generator

Balanced Assignment Problem Using Excel Solver

In this post, you’ll learn about Assignment problem and know how to solve a assignment problem using Excel Solver Add-In .

Assignment problem

An Assignment problem is a type of linear programming problem, which is about assigning the correct number of resources to various destinations or problems. This gives you the optimal solution which is either maximizing the profit or minimizing the cost of production .

How to Solve Balanced Assignment Problem Using Excel Solver Add-In?

Let’s look at the range of values in the screenshot attached below. We need to minimize the cost of production in this problem.

The Assigned values are the sum of the respective Customer value row, similarly the sum of Task columns for the Assigned. So use the =SUM() formula.

For finding the Optimal solution use the function =SUMPRODUCT() .

How to Solve Balanced Assignment Problem Using Excel Solver Add-In?

  • After you’re done entering the values, go to the Data tab and under Analyze group select the Solver tool .
  • Set the objective in the correct cell. Select Min in the To field.
  • Changing variables are the tasks to the respective customer whose values aren’t determined still.
  • The Constraints are Assigned = Supply , Assigned = Demand, and the range of the changing variables are binary .
  • Finally select the solving method as Simplex LP and click on Solve .

Balanced Assignment Problem Using Excel Solver

Click on OK to get the solution.

Balanced Assignment Problem Using Excel Solver

A optimal solution is obtained.

Balanced Assignment Problem Using Excel Solver

Leave A Reply Cancel reply

Your email address will not be published. Required fields are marked *

You May Also Like

assignment problem linear programming excel

SKEW.P Function in Excel

  • March 16, 2022

assignment problem linear programming excel

SKEW Function in Excel

assignment problem linear programming excel

RANK.EQ Function in Excel

  • November 23, 2021

Login with your site account

Remember Me

Wallstreet Logo

Trending Courses

Course Categories

Certification Programs

  • Free Courses

Excel Resources

  • Free Practice Tests
  • On Demand Webinars

Linear Programming in Excel

Published on :

21 Aug, 2024

Blog Author :

Edited by :

Ashish Kumar Srivastav

Reviewed by :

Dheeraj Vaidya

Linear Programming in Excel using Solver

Linear programming is one of the important concepts in statistics. Based on available data of variables, we can do predictive analysis. In our earlier article, “Linear Regression in Excel,” we have discussed it in detail. However, in Excel, we have an option called “Solver in Excel,” which can be used to solve a linear programming problem. With this solver, we can use linear programming to enable resource optimization.

This article will show you how to solve the linear programming problem in Excel in detail. Follow the entire article to learn about this.

Table of contents

Enable solver add-in, solve linear programming through excel solver, things to remember, recommended articles.

Linear-Programming-in-Excel

How to Solve Linear Programming through Excel Solver?

To apply a solver to solve linear programming, we should have an ethical problem in detail. For this example, we have created the below scenario.

Problem: A manufacturer wants to alter the production model of the current product. He has two kinds of products, “Product 1” & “Product 2”. For Product 1 requires three raw materials, Raw Material 1 20 Kg, Raw Material 2 30 Kg, and Raw Material 3 5 Kg. Similarly, for Product 2, it requires three raw materials, Raw Material 1 10 Kg, Raw Material 2 25 Kg, and Raw Material 3 10 Kg.

Manufactures require a minimum of Raw Material 1 - 550 kg, Raw Material 2 800 kg, and Raw Material 3 250 kg. If Product 1 costs Rs. 30 per unit and Product 2 costs 35 per unit, how many units of each product should the manufacturer blend to meet the minimum raw material requirements at a low cost as possible, and what is the price?

Now, we enter all this information into the Excel spreadsheet below.

Linear Programming Example 1

We need to apply the excel formula in cells D3 and D5 to D7, Cost * Cost Per Unit. Cost price we need to arrive from the solver in cells B2 and C2. To use the formula below:

Linear Programming Example 1-1

After setting up this, we need to go to Excel's "Solver" tool. The "Solver" tool is available under Excel's "Data" tab.

Linear Programming Example 1-2

If the spreadsheet does not show this option, we need to enable it. To allow this solver option, we must follow the below steps.

  • Step 1: We must first go to the "File" tab. Then, under the "File tab," click on "Options."

Linear Programming Example 1-3

  • Step 2: Next, go to "Add-ins" under Excel "Options."

Linear Programming Example 1-4

  • Step 3: Under this, select “Excel Add-ins” and click on "Go."

Linear Programming Example 1-5

  • Step 4: Under the pop-up below, choose "Solver Add-in" and click on "OK" to enable it.

Linear Programming Example 1-6

Now, we can see "Solver Add-in" under the "Data" tab.

  • Go to the "DATA" tab to apply solver to apply the solver and click on the "Solver." We can see below the window.

Example 1-7

In the above window, our first option is “Set Objective.”

  • Our objective is to identify the "Total Cost," so our total cost cell is D3, so we must select the cell D3 for this "Set Objective" and set it to "Min."

Linear Programming Example 1-8

  • The next option is "By Changing Variable Cells." In this example, our variables are "Product 1" and "Product 2". To select a range of cell B2:C2 and click on "Add."

Example 1-9

  • Once we click on "Add," we can see below the add "Constraint" window. Select the B2:C2 range of cells in this window and put the constraint as ">=0".

Example 1-10

  • Click on "Add" to stay back in the same window. Now in the second constraint, select the range of values as D5:D7 and select ">=" and under "Constraint," select G5:G7 cells.

Linear Programming Example 1-11

  • Click on "OK" to come out of the "Add Constraint" window.

Linear Programming Example 1-12

  • Now, all our parameters are ready. Click on the "Solve" option to get the result.

Example 1-13

  • So, the cost to produce "Product 1" per unit is 20, and "Product 2" per unit is 15.

Example 1-14

Like this, by using "Solver," we can solve linear programming in Excel.

  • By default, the "Solver" tool is not available to use.
  • A solver is not only limited to a linear programming language, but we can also solve many other problems. You may refer to our article "Solver Option in Excel."
  • Setting the objective cell is important.
  • The adding constraints should be ready in advance.

This article is a guide to Linear Programming in Excel. We discuss how to solve the linear programming problem in Excel using the solver option with an example and a downloadable Excel template. You may learn more about Excel from the following articles: -

  • Top 6 Hacks in Excel
  • Linear Regression Examples
  • Linear Regression in Excel
  • Linear Interpolation in Excel

Youtube

This site uses cookies to store information on your computer. Some are essential to make our site work; others help us improve the user experience. By using the site, you consent to the placement of these cookies. Read our  privacy policy  to learn more.

Solve problems with linear programming and Excel

  • Technology and analytics

Solve problems with linear programming and Excel

A management accountant's knowledge of relevant revenues and costs is important for many decisions, among them capital budgeting, outsourcing, special orders, product mix, and the adding or dropping of specific product lines. Many of these decisions require management accountants to determine or recommend specific courses of action that would lead to an optimal outcome (such as maximising profits or minimising costs) given a limited set of resources (such as production inputs). It is therefore important that they apply appropriate analytical techniques in approaching such decisions. Linear programming is one technique that accountants can often readily apply to determine the best outcome in these situations.

This article provides a description of linear programming, demonstrates how it can be performed using Microsoft Excel's free Solver add-in, and illustrates its use through an example from management accounting.

Linear programming

Linear programming is a form of mathematical optimisation that seeks to determine the best way of using limited resources to achieve a given objective. The key elements of a linear programming problem include:

  • Decision variables: Decision variables are often unknown when initially approaching the problem. These variables usually represent identifiable "things" or inputs that a manager can control (ie, how many of each specific model of washing machines to produce). The goal, then, is to determine those values that maximise or minimise the objective function.
  • Objective function: This is a math -ematical function that incorporates decision variables to express a manager's goals. A manager's goal is to either maximise or minimise the objective function.
  • Constraints: These are mathematical functions that incorporate decision variables to express boundaries on possible solutions.
  • Variable bounds: Decision variables are rarely allowed to take on any value (from minus infinity to plus infinity). Instead, they usually have bounds (eg, ≥ 0).

It should also be noted that while all the mathematical expressions for the objective function and constraints in linear programming are necessarily linear in nature (hence the name; see the sidebar "Limitations of Linear Programming" at the bottom of the page), the technique remains one of the most widely used methods of optimisation, and the largest and most complex linear programming problems have millions of decision variables and hundreds of thousands of constraints.

Before we continue, it's important to note that this article is not intended to be an exhaustive course in linear programming. It's instead an introduction to the topic and how the Excel Solver add-in can be used to help with this type of complex problem.

The example below demonstrates how a management accountant could use the Solver tool to perform linear programming to determine an optimal product mix that maximises profits given a limited set of resources. This example provides one setting where linear programming can be applied. The technique can be used in many other accounting and business settings to help decision-makers determine optimal outcomes given limited resources.

Mathematical representation of Beacon's business problem

business-problem

An example from management accounting

Beacon Co. is a manufacturer of washing machines. It currently sells two models of washing machines: the Arkel and the Kallex. At the start of every production cycle, Beacon must decide how many units of each washing machine to produce, given its available resources. In the coming production cycle, Beacon faces key resource constraints. In particular, it has only 3,132 hours of labour, 1,440 feet of rubber hosing, and 200 drums available.

Selling each Arkel unit earns the company a profit of $350 while selling each Kallex unit earns the company a profit of $300. At the same time, manufacturing each Arkel unit requires 18 hours of labour, 6 feet of rubber hosing, and 1 drum, while manufacturing each Kallex unit requires 12 hours of labour, 8 feet of rubber hosing, and 1 drum. Details of the relevant facts are summarised in the table "Summary of Production of Washing Machines".

Based on these facts and the assumption that 100% of production will be sold, Beacon must decide how many units of each washing machine to produce in the coming production run to maximise profits.

Summary of production of washing machines

production-summary

Doing linear programming in Excel

The first step in linear programming is to develop a mathematical representation of the business problem and to model it on a spreadsheet. Mathematically, the problem in the example can be represented as shown in the chart "Mathematical Representation of Beacon's Business Problem", where X 1 and X 2 represent the decision variables, that is, the number of Arkel and Kallex units produced, respectively.

Next, we implement the mathematical model in an Excel spreadsheet. See the table "Spreadsheet Model" for the spreadsheet model used, and the table "Excel Formulas" for details of the formulas used in the model.

Spreadsheet model

spreadsheet-model

Excel formulas

excel-formulas

You can also download an Excel file with the Spreadsheet Model here . X 1 and X 2 are represented in cells C3 and D3. The values of these decision variables are unknown at the start of the problem. The unit profits expected from the sale of each unit of Arkel and Kallex are entered in cells C4 and D4. Cell E4 represents the objective function (which is to maximise profits) and calculates the total profit that Beacon can expect in this production cycle based on the corresponding production quantity and unit profit information in cells C3:D4.

Cells C7:C9 contain the amount of each production input required in the production of each unit of Arkel, while cells D7:D9 contain the amount of each production input required in the production of each unit of Kallex. Cells E7:E9 calculate the total amounts of each production input that will be used in the production cycle based on the corresponding number of units of Arkel and Kallex that are produced. Cells F7:F9 contain the total amount of each production input available to Beacon in this production cycle. Together, cells E7:E9 and F7:F9 represent the drum, labour, and rubber hosing constraint functions stated in our original mathematical model. Specifically, cells E7:E9 represent the left-hand side of the constraint functions while cells F7:F9 represent the right-hand side of the constraint functions.

Having implemented the mathematical model in the spreadsheet, we can then use Solver to find the optimal solution to the problem. Solver, as mentioned earlier in the article, is a free Excel add-in that must be installed before it can be launched (see support.office.com for instructions). Once the add-in is installed in Excel, go to Data → Analysis → Solver .

Solver parameters

solver-parameters

The Solver parameter inputs used in our example are shown in the screenshot "Solver Parameters". In Solver, we need to define three key components of our spreadsheet model. First, we need to define an objective cell (and whether its value should be maximised or minimised). This cell should correspond to the cell in the spreadsheet that represents the objective function in the mathematical model. Second, we need to define variable cells. These cells should correspond to cells in the spreadsheet that represent decision variables in the mathematical model. Third, we need to define constraints. These cells should correspond to cells in the spreadsheet that represent the various constraint functions in the mathematical model. Further, indicating that unconstrained variables should be non-negative sets the decision variable bound where both X 1 and X 2 are greater than or equal to 0. Given that we are executing linear programming, we select Simplex LP as the solving method in Solver.

Once these input parameters have been defined, click "Solve" to instruct Solver to solve for an optimal allocation of production between Arkel and Kallex that maximises profits.

The table "Spreadsheet Model — With Solver Solution" presents the Solver solution to our example. Solver automatically solves for the number of units of Arkel and Kallex washing machines that Beacon should produce to meet the stated objective of maximising profits. Our spreadsheet indicates that Beacon should produce 122 units of Arkel and 78 units of Kallex washing machines (cells C3 and D3), leading to an optimised profit of $66,100 (cell E4).

Spreadsheet model — with solver solution

spreadsheet-model-solver

Proving its value

Linear programming, as demonstrated by applying Excel's Solver feature, is a viable and cost-effective tool for analysing multi-variable financial and operational problems.

In the example, it was unclear at the outset what the optimal production quantity of each washing machine was given the stated objective of profit maximisation. An intuitive response might have been to focus all production on the washing machine that provides the greater profits per unit (ie, Arkel). However, because of the resource constraints in our example, following such an intuition would not have led to a situation where profits are maximised. Instead, relying on linear programming to analyse the business problem leads to a production mix that definitively maximises profits. While this example is simple, it is reflective of many more complex real-life scenarios in which accountants face situations that require them to fulfil a variety of business objectives while contending with practical constraints. Where required, the modelling can be scaled up to deal with more complicated business problems.

Limitations of linear programming

Linear programming is one of several optimisation techniques that can be employed to determine the most efficient way to use resources. While it is a powerful technique that can be applied to many business situations, it should only be used to solve optimisation problems that involve a single linear objective function and linear constraints that cannot be violated.

There may be situations where linear programming may not be the most appropriate optimisation technique to employ. For example, where optimisation problems involve multiple objectives, nonlinear objective functions and/or constraints, or soft constraints (that can be violated) rather than hard constraints (that cannot be violated), other more appropriate optimisation techniques such as multiple objective linear programming, goal programming, or nonlinear programming should be identified and employed instead.

Clarence Goh, CA (Singapore), Ph.D. , is an assistant professor of accounting (practice) and director of professional development for the School of Accountancy at Singapore Management University. To comment on this article or to suggest an idea for another article, contact Jeff Drew, an FM magazine senior editor, at [email protected] .

Related Articles

Related resources.

  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Stephen L. Nelson

Author. Accountant. Aspiring Apiarist.

Optimization Modeling with Solver in Excel

May 18, 2015 By Stephen L. Nelson Leave a Comment

Excel’s Solver tool lets you solve optimization-modeling problems, also commonly known as linear programming programs. With an optimization-modeling problem, you want to optimize an objective function but at the same time recognize that there are constraints, or limits. While this abstract definition sounds complicated, at least at the conceptual level, optimization modeling makes common sense once you provide a concrete example.

EasyRefresher: How Optimization Modeling Works

Suppose, for example, that you’re a residential real estate developer and contractor. You create and sell two products: building lots and houses. Suppose that you make $20,000 on each home you build and $15,000 on each building lot you develop and then sell. Your princi- pal financial objective is to maximize your profits, and this objective can be expressed as an objective function, or equation, that you want to maximize:

$15,000*Lots+$20,000*Houses=Profits

Of course, any objective function is limited by certain constraints. To continue with the fictional case of residential development, suppose that you have two principal limiting fac- tors: working capital and bulldozer capacity. Your working capital of $1,200,000 limits the number of lots and houses you can annually sell because every lot requires a $50,000 cash investment and every house requires a $25,000 cash investment. The fact that you have a single bulldozer available for only 3,000 hours each year also limits the number of lots and houses you can annually sell because every lot requires 80 hours of bulldozing and every house requires 200 hours of bulldozing. These two constraints can also be expressed as equations. For example, the working capital constraint can be expressed as follows:

$50,000*Lots+$25,000*Houses<=$1,200,000

This formula says the result of the formula $50,000 times the number of lots plus $25,000 times the number of houses must be less than or equal to the working capital limit of $1,200,000. The less than or equal to symbol is represented by the <= operator.

The bulldozer capacity constraint can be expressed as follows:

80*Lots+200*Houses<=3000

This formula says the result of the formula 80 times the number of lots plus 200 times the number of houses must be less than or equal to the bulldozer-hours limit of 3,000. Again, the less than or equal to symbol is represented by the <= operator.

Typically, you also have policy constraints when you work with an optimization-modeling problem. Suppose that as a matter of policy you want to maintain a certain level of activity both in developing lots and building houses. You might say, for example, that because you must maintain your team’s expertise in both raw land development and residential contracting that you want to develop at least 10 lots every year and build at least 5 houses. These two constraints also need to be expressed as equations. The minimum-number-of-lots policy constraint can be expressed as follows:

Lots>=10

This formula says that you want to develop at least 10 building lots. Or, restated, this for- mula says that the lots variable must be greater than or equal to 10. The greater than or equal to symbol is represented by the >= operator.

The minimum-number-of-houses policy constraint can be expressed as follows:

Houses>=5

This formula says that you want to build at least 5 houses. Or, restated, this formula says that the houses variable must be greater than or equal to 10. Again, the greater than or equal to symbol is represented by the >= operator.

With the information provided in the preceding paragraphs of this EasyRefresherTM, I’ve described your fictional optimization-modeling problem. You want to maximize your profits, which can be described using the following objective function:

but you can’t develop unlimited numbers of building lots or build unlimited numbers of houses. You are subject to the following constraints:

You can solve this equation in a variety of ways, including graphically, iteratively, or using a technique like simplex algebra. Or, you can provide the objective function and the con- straint equations to Excel and have it solve the problem, which is the solution technique described in the paragraphs that follow.

Solving an Optimization Problem

To use Excel’s Solver, first build a workbook that describes your optimization-modeling problem, including its objective function and any constraints, and then tell Solver to look for an optimal solution. As long as you understand the concepts of optimization modeling, as described in the preceding EasyRefresher, this process is simple.

Setting Up Your Workbook for Solver

You take three steps to set up a workbook for solver: provide guesses of the variables that optimize your objective function, supply the objective function, and then supply the con- straint functions. Figure 6-17 shows a workbook set up to solve the example problem dis- cussed in the EasyRefresher.

Figure 6-17. A workbook set up for optimization modeling.

To build this or any optimization model workbook, follow these steps:

  • Provide starting guesses for the variables. You need to provide starting guesses for the variables you’re trying to optimize. You can do this simply by entering values in cells, but I recommend you create a small schedule of variable names and variable guesses, as shown in Figure 6-17 in the worksheet range A1:B3.If you set up a worksheet range like that shown in Figure 6-17—and you really should— you’ll also want to name the cells that hold your guesses. In this case, you can do this by selecting the worksheet range that holds the variable names (Lots, Houses) and guesses— A2:B3 in Figure 6-17—and then by choosing the Insert menu’s Name command and then choosing the Name submenu’s Create command. When Excel displays the Create Names dialog box, select the Left Column check box and click OK.
  • Describe the objective function. In Figure 6-17, the worksheet describes the equation with the following formula located in cell B5: =15000*Lots+20000*Houses Because the cells holding the variable guesses have been named Lots and Houses, the objective function uses these names in place of cell references. Note that the label in cell A5 identifies the equation, but you only need to enter the actual equation shown in cell B5.

To describe the second constraint—the one that quantifies the limit on bulldozer capac- ity—you enter the following formula in cell B9:

=Lots*80+Houses*200

and you enter the constant value which limits this formula in cell C9:

To describe the third constraint—which comes from your minimum-number-of-lots policy constraint—you enter the following formula in cell B10:

and you enter the constant value which limits this formula in cell C10:

Finally, to describe the fourth constraint—which comes from your minimum-number- of-houses policy constraint—you enter the following formula in cell B11:

and you enter the constant value which limits this formula in cell C11:

Using Solver

If you set up your workbooks similar to the one shown in Figure 6-17, you will find Solver easy to use. You simply follow these steps:

Figure 6-18. The Solver Parameters dialog box.

  • Identify the objective function. Enter the address of the cell that holds your objective in the Set Target Cell box. For example, in Figure 6-17, cell B5 holds the objective function, so you would enter B5 in the Set Target Cell box.
  • Describe how Solver should optimize the objective function. Use the Equal To option buttons to specify how Solver optimizes the objective function. In the case of a profit function, for example, you want to maximize the function so you click the Max button. This is the case for the workbook shown in Figure 6-17. If your objective function described costs, you would instead want to minimize the function and so would click the Min button. You may also have situations in which you want to have the objective function return a specific value, and so in this special case you would click the Value Of button and then provide the specified value.
  • Tell Solver which cells hold your variable guesses. Use the By Changing Cells box to tell Excel where you’ve stored the variables used in the objective function and constraint equations. In Figure 6-17, for example, the work- book stores these variables in cells B2 and B3, so you could enter these two cell addresses in the By Changing Cells box. If you’ve named the variable cells, you can also type the cell names, as shown in Figure 6-18. Cell B2 is named Lots, and cell B3 is named Houses.

Figure 6-19. The Add Constraint dialog box.

  • Add any binary constraints. In a handful of optimization modeling problems, you may also have binary constraints. A binary constraint is one in which the variable must equal either 0 or 1. To specify a binary constraint, use the Cell Reference box to identify the variable cell that must be binary and then select the bin operator from the unnamed drop-down list box.

Figure 6-21. The Solver Results dialog box.

This dialog box identifies the variable values that optimize your objective function and asks what you want to do with these values.

  • To tell Excel to save its solution, click the Keep Solver Solution button and click OK.
  • To tell Excel to discard its solution, click the Restore Original Values button and click OK.
  • To tell Excel to save its solution as a scenario, click the Save Scenario button and then provide a scenario name when prompted.

Reviewing Solver Reports

The Solver Results dialog box gives you the option of generating several reports on the optimization modeling that Solver performs. To generate these reports, click the report or reports you want when Excel displays the Solver Results dialog box (see Figure 6-21).

Understanding the Answer Report

The answer report, which Excel places on a separate worksheet, provides information about how close the optimal solution is to your original guesses and about which constraints bind, or limit, optimization. Figure 6-22 shows an example answer report. At the top of the re- port, Excel compares the original objection function formula result with the objection func- tion result provided by original variable values. In Figure 6-22, for example, Excel shows the original objective function value as 425000 and the final objective function value as 440000. The Solver in this case improves the objective function by 15000.

Figure 6-22. The answer report.

Beneath the comparison of the original and final values of the objective function’s formula results, Excel compares the original values and final values of the variables (see Figure 6-22). This information lets you see exactly by how much Excel adjusts the variables in order to optimize your objective function.

At the bottom of the answer report, Excel analyzes the constraints by calculating the for- mula results for the constraints and then comparing these formula results to the constraint constants. This sounds like busy-work at first blush, but this information is often very use- ful in two important ways: First, you can use the Status information to see which constraints are binding, or limiting. In Figure 6-22, the binding constraint is the bulldozer hours. Second, you can use the Slack information to see how close a given constraint comes to becoming binding. In Figure 6-22, the working capital constraint shows only 25000 of slack; in other words, you have only a 2% margin of error with your working capital ($25,000 / $1,200,000).

Understanding the Sensitivity Report

The sensitivity report, which Excel also places on a separate worksheet, shows reduced gradients for the variables and the Lagrange multipliers for the constraints (see Figure 6-23). A reduced gradient value shows how the objective function would change if the vari- able value increased by 1. The Lagrange multiplier shows how the objective function would change if the constraint constant increased by 1.

Figure 6-23. The sensitivity report.

A closer inspection of the sensitivity report shown in Figure 6-23, for example, shows that the reduced gradient values for both the Lots and Houses variables equal 0. This indicates that neither value can be increased. The sensitivity report does show Lagrange multipliers for the working capital constraint and for the bulldozer-hours constraint. The Lagrange multiplier for the bulldozer-hours limit, 78.125, indicates that a 1 hour increase in the number of bull- dozing hours available increases the objective function (your profits) by 78.125.

If you’ve created a linear optimization model—and I’ll discuss linear models briefly in the next section, “Customizing Solver’s Operation”—your sensitivity reports include several ad- ditional pieces of information, including reduced costs, shadow prices, objective coefficients, and constraint right-hand side ranges.

Understanding the Limits Report

The limits report, which Excel places on still another worksheet, shows you how much your variable values can change but still stay within your constraints (see Figure 6-24). For each variable, the limits report shows the calculated optimal value, the lowest possible value that is allowable, and the highest possible value that is allowable. In Figure 6-24—and this would often be the case—the lower limit and upper limit values equal the optimal values. This shows that these variable values can be changed without affecting the optimal solution or violat- ing constraints. Note, however, that some optimization problems do allow you to change variable values while continuing to optimize the function and continuing to stay within the stated constraints. This happens when there are multiple sets of variable values that opti- mize the equation.

Figure 6-24. The limits report.

Customizing Solver’s Operation

The Solver Parameters dialog box provides an Options button that you can click to display the Solver Options dialog box (see Figure 6-25). The Solver Options dialog box lets you customize the way in which Solver works out your problem. The paragraphs that follow briefly describe each of the Solver options along with how and why you might change their settings.

Figure 6-25. The Solver Options dialog box.

Max Time and Iterations

A handful of these options are essentially self-descriptive. The Max Time box, for example, lets you specify how long Solver should work on a problem, and can it be set as high as 32,767 seconds (which is over nine hours). The Iterations box lets you specify how many iterations Solver should work on a problem, and it can be set as high as 32,767.

The Precision box lets you specify how precise Solver should be in checking a possible optimal solution against your constraints. A precision setting of 0.000001, the default set- ting, tells Excel that if a constraint formula value is within 0.000001 of the constraint con- stant, it meets the constraint. You can set the Precision box to any value from 0 to 1. To loosen your precision, use a larger Precision value. To tighten your precision, use a smaller Preci- sion value. As you boost your precision, predictably, Excel takes longer to reach a solution.

The Tolerance box lets you specify how precise Solver should be in making sure that any integer constraints are met. The default Tolerance setting of 5, or 5%, means that if an objective function variable is within 5% of an integer value—from 95% to 105%, in other words—Excel can consider it to be an integer. The Tolerance setting, by the way, applies only to optimization problems that use integer constraints. As you increase your precision, predictably, Excel takes longer to reach a solution.

Convergence

The Convergence box lets you indicate when Excel should stop looking for a better solu- tion. You can set the Convergence value to any fractional value between 0 and 1. When the change in the objective function is less than the value shown in the Convergence box, Ex- cel stops looking for a better solution. The Convergence setting, by the way, applies only to nonlinear optimization-modeling problems. As you reduce the convergence setting (i.e., increase the precision), predictably, Excel takes longer to reach a solution.

Assume Linear Model

If the relationships in your optimization are linear, you can select the Assume Linear Model check box. By doing this, you simplify the calculations that Excel has to make and, thereby, speed things up.

Assume Non-Negative

If you want to tell Excel that your variables must be equal to or greater than 0 when you haven’t set a lower limit constraint, you can select the Assume Non-Negative check box. In effect, when you check this box, you tell Excel to create another, implicit set of constraints.

Use Automatic Scaling

You should select the Automatic Scaling check box when you’re working with variables and formula results that differ in magnitude. An example of this situation is when you’re solv- ing for a rate of return (a percentage) using a set of large dollar variables.

Show Iteration Results

You can select the Show Iteration Results check box to direct Excel to pause after each calculation iteration. After each calculation iteration, Excel displays a Show Trial Solution dialog box. You can save the trial solution by clicking the Save Scenario button. Or you can continue to work toward the solution by clicking the Continue button. To terminate the iterations, click the Stop button.

You use the Estimates option buttons—Tangent and Quadratic—to choose the approach that you want Excel to use to come up with the first trial solution. Select Tangent if you want Excel to extrapolate linearly from a tangent vector. Select Quadratic if you want Excel to extrapolate quadraticly—a technique which may yield better results for nonlinear optimization-modeling problems.

Derivatives

You use the Derivatives option buttons—Forward and Central—to specify the differencing used to estimate partial derivatives of the objective function and constraint function for- mulas. Typically, you can click the Forward button. However, if an optimization problem can’t be solved with Forward derivatives, you can click the Central button. Using differen- tials near the center of a target often takes more calculations to solve, but can be better with highly constrained problems such as airline ticket prices.

The Search option buttons—Newton and Conjugate—let you choose the algorithm Excel uses to find an optimal solution. If your personal computer has lots of free memory, click the Newton button to reduce the number of calculation iterations (albeit at the expense of using more memory). If your personal computer doesn’t have extra memory, click the Con- jugate button to allow more time so that your computer does’t use as much memory.

Save Model and Load Model

The Save Model and Load Model buttons let you save an optimization model description. To save a model—such as the equations that you set up for the scenario with houses, lots, working capital and bulldozers, click the Save Model button and then specify the empty worksheet range that Excel should use to save the model. To load a model, click the Load Model button and then specify the worksheet range holding the model.

Understanding Solver Error Messages

For most simple optimization problems, Excel rather quickly finds a solution to your problem and displays the Solver Results dialog box. In more complicated problems—unfortunately, those you’re likely to encounter in real life—Excel may encounter difficulties. In these cases, it may display one of the error messages described in the following paragraphs.

Solver has converged to the current solution

This message means that while Excel has found what it appears to be a solution, there may be a better solution. To direct Excel to look for a better solution, reduce the Convergence setting using the Solver Options dialog box, as described in the preceding section, “Cus- tomizing Solver’s Operations.”

Solver cannot improve the current solution

This message indicates that Excel has calculated a rough, appropriate solution, but there may be a better solution. To direct Excel to look for a better solution, adjust the Precision setting to a larger value using the Solver Options dialog box. Again, the preceding section explains how to do this.

Stop chosen when the maximum time limit was reached

This message indicates that Excel ran out of time. You can attempt to retry solving the solutionusingalargerMaxTimesetting.TospecifyalargerMaxTimevalue,usetheSolver Options dialog box.

Stop chosen when the maximum iteration limit was reached

ThismessageindicatesthatExcelranoutofiterations.Youcanattempttoretrysolvingthe solution using a larger Iterations setting. To specify a larger Iterations value, use the Solver Options dialog box.

The Set Target Cell values do not converge

This message indicates that the objective function continues to increase or decrease even though all the constraints are already satisfied. In other words, with each iteration, Excel gets a better objective function value, but doesn’t appear any closer to a final objective function value. If you encounter this error, review your objective function and constraints to make sure that you’ve correctly described the optimization-modeling problem.

Solver could not find a feasible solution

This message probably indicates that your optimization-modeling problem has no answer. Alternatively, this error message may suggest that you’ve incorrectly described the objec- tive function or, perhaps more likely, one or more of the constraints. In the previous model, if your working capital was limited to $600,000, you would not have enough cash to work the minimum required number of lots and houses. There would be no feasible solution.

Conditions for Assume Linear Model are not satisfied

This message indicates you selected the Assume linear model check box, which appears on the Solver Options dialog box, but Excel, after reviewing the calculation results, concludes your model isn’t linear. If you see this message, first display the Solver Options dialog box and select the Use Automatic Scaling check box. Then attempt to solve your optimization model again. If you get the message error a second time, display the Solver Options box again, but this time clear the Assume Linear Model check box. Then attempt to solve your problem again.

Solver encountered an error value in a target or constraint cell

This message indicates that one of your formulas results in an error value or that you’ve incorrectly specified an integer or binary constraint. To address this Solver problem, you need to fix the incorrect formula.

There is not enough memory available to solve the problem

This message, as you would suspect, indicates that Excel doesn’t have enough memory to successfully run Solver. To free up memory, try closing open documents and any other open programs. You may also want to add memory to your personal computer.

assignment problem linear programming excel

About Stephen L. Nelson

Stephen L. Nelson is the author of more than two dozen best-selling books, including Quicken for Dummies and QuickBooks for Dummies .

Nelson is a certified public accountant and a member of both the Washington Society of CPAs and the American Institute of CPAs. He holds a Bachelor of Science in Accounting, Magna Cum Laude, from Central Washington University and a Masters in Business Administration in Finance from the University of Washington (where, curiously, he was the youngest ever person to graduate from the program).

Reader Interactions

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Academia.edu no longer supports Internet Explorer.

To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to  upgrade your browser .

Enter the email address you signed up with and we'll email you a reset link.

  • We're Hiring!
  • Help Center

paper cover thumbnail

Solving Linear Programming Problems By Using Excel’s Solver

Profile image of Thekra Al-douri

2009, Tikrit Journal of Pure Sciences

This paper describes advanced methods for finding a verified global optimum and finding all solutions of a system of linear programming, as implemented in the Premium Solver Platform, an extension of the Solver bundled with Microsoft Excel. It also describes the underlying tools that allow Excel spreadsheets to be used over linear data, with fast computation of optimization. Also it provides: a brief overview of Excel’s Add-in Solver; basic theory of optimization as implemented within the Solver; advantages of the Excel Solver in linear programming, and three numerical examples outlining the steps involved in carrying out adjustment of Solver to solve the linear programming problems. The reasons to use of Excel for optimization can be considered a viable option are: (a) Excel is readily available in any Windows

Related Papers

Dr. S. Senthilnathan

assignment problem linear programming excel

Margarita Terziyska

An optimization problem is one where is need to select a best element (with regard to some criterion) from some set of available alternatives. Optimization often is referred to as mathematical programming, which is a field of management science that finds the optimal, or most efficient, way of using limited resources to achieve the objectives of an individual or a business. In the simplest case, an optimization problem consists of maximizing or minimizing a real function by systematically choosing input values from within an allowed set and computing the value of the function. The optimization help to solve different types of problems: determining product mix, financial planning, routing and logistics and so on. The aim of this paper is to show how such optimization problem can be solved with Excel&#39;s Solver add-in.

Annals of Operations Research

Ramesh Sharda

Leon Lasdon

Marco Aurelio Mól

michael plurst

iaeme iaeme

Since the late 1940s, linear programming models have been used for many different purposes. Airline companies apply these models to optimise their use of planes and staff. NASA has been using them for many years to optimize their use of limited resources. Oil companies use them to optimise their refinery operations. Small and medium-sized businesses use linear programming to solve a huge variety of problems, often involving resource allocation. In this paper, a typical product-mix problem in a manufacturing system producing two products (each product consists of two sub-assemblies) is solved for its optimal solution through the use of the latest versions of MATLAB having the command simlp, which is very much like linprog. As analysts, we try to find a good enough solution for the decision maker to make a final decision. Our attempt is to give the mathematical description of the productmix optimization problem and bring the problem into a form ready to call MATLAB’s simlp command. The objective of this paper is to find the best product mix that maximizes profit. The graph obtained using MATLAB commands, give the shaded area enclosed by the constraints called the feasible region, which is the set of points satisfying all the constraints. To find the optimal solution we look at the lines of equal profit to find the corner of the feasible region which yield the highest profit. This corner can be found out at the farthest line of equal profit which still touches the feasible region.

European Journal of Operational Research

Tapio Westerlund

Oscar Yecid Buitrago Suescún

Linear programming (LP) is one of the most widely-applied techniques in operations research. Many methods have been developed and several others are being proposed for solving LP problems, including the famous simplex method and interior point algorithms. This study was aimed at introducing a new method for solving LP problems. The proposed algorithm starts from an interior point and then carries out orthogonal projections using parametric straight lines to move between the interior and polyhedron frontier defining the feasible region until reaching the extreme optimal point.

Kristin lazo

Loading Preview

Sorry, preview is currently unavailable. You can download the paper by clicking the button above.

RELATED PAPERS

International Journal of Decision Support System Technology

Jason Papathanasiou

Shohal Hossain

Khalid Rago

Rafis Hasani

IBRAHIM CICEK

Levon Mesropyan

JOAN DAVID MORENO GONZALEZ

Diego Manuel Cortez Granados

Computer Applications in Engineering Education

Omar Iglesias

Journal of Applied …

ricardo garcia

Romualdo Salcedo

Briti Sundar Sil

https://www.ijrrjournal.com/IJRR_Vol.9_Issue.11_Nov2022/IJRR-Abstract10.html

International Journal of Research & Review (IJRR)

Introduction to Optimum Design

Jasbir Arora

jerwin mancenido

Diego Marin

Ammal Abbas

Luigi De Giovanni

International Journal of Strategic Decision Sciences

Hossein Arsham

Nazmi Misini

Miguel Casquilho

Intelligent Support of …

Krasimira Genova

Oscar Andrade

  •   We're Hiring!
  •   Help Center
  • Find new research papers in:
  • Health Sciences
  • Earth Sciences
  • Cognitive Science
  • Mathematics
  • Computer Science
  • Academia ©2024

Analytics Tuts

Analytics Tuts

Analytics and Data Visualization Tutorials

Solve linear programming problem using Excel

Today we’ll be learning how to solve Linear Programming problem using MS Excel? Linear programming (LP) is useful for resource optimization. There are so many real life examples and use of linear programming. We’ll see one of the real life examples in the following tutorial.

Modelling Linear Programming

As the first step we have to do the modelling i.e. make the required equation. We can find the constraints in the right side (column N). Cell F4 is our equation P which has to be minimized and F6,F7,F8 are the constraints.

1-min

Solving the linear model using Excel Solver

Now go to Data and open solver. If you don’t find the Solver option please check How to enable Solver in MS Excel .

2-min

Solver window will appear. Now we have to follow the steps mentioned below-

3-min

Add constraint window will appear once Add option clicked. Be careful while adding constraints and the sign (greater or less than). Once the constraints are added click OK.

4-min

Once everything is done Solver parameters will look like below and click Solve. That’s done.

4a-min

We’ll see that now we have values for x and y and P. This was optimize solution for the problem.

5-final-min

Problem Source

So this was about how to solve linear programming in MS Excel using Solver add-in. Keep visiting Analytics Tuts for more tutorials. Comment your suggestions and doubts.

' src=

A problem i have been struggling with for about a month was just solved in less than an hour as i come across this site. i bless my Lord my Jesus for this an recommend it for anyone carrying out research or studies on solving mathematical problems using excel

' src=

I use the SUP function in excel 2013 it was working well but at the end of the table is no longer give me the results, the cell still empty.

' src=

thanks for your contribution on the knowledge of MS EXCEL with LPP , its wonderful i never know before now that excel can do that, genius!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

  • Mechanical Engineering

Solving Linear Programming Problems By Using Excel's Solver

Salim Saleh at Tikrit University

  • Tikrit University
  • This person is not on ResearchGate, or hasn't claimed this research yet.

Abstract and Figures

Keep all Reports

Discover the world's research

  • 25+ million members
  • 160+ million publication pages
  • 2.3+ billion citations
  • Oskars Rasnacs
  • Maris Vitins

Muhammad Aqil Afham Rahmat

  • Mohd Eqwan Bin Mohd Roslan

Semaria M. Lencha

  • Jens Tränckner

Nor Asmaa Alyaa Nor Azlan

  • Pratik Singh
  • Stefan Viziteu
  • Stejarel Brezuleanu

Alexandru Dragos Robu

  • Eduard Boghita

Alistair Richard Clark

  • Leon S. Lasdon
  • John Watson

Robert Fourer

  • David M. Gay
  • Brian W. Kernighan

Samuel E. Bodily

  • J OPER RES SOC

Hamdy Taha

  • MANAGE DECIS
  • B.J. Parker
  • Anthony Brooke
  • D. Kendrick

Alexander Meeraus

  • Richard E. Rosenthal
  • Recruit researchers
  • Join for free
  • Login Email Tip: Most researchers use their institutional email address as their ResearchGate login Password Forgot password? Keep me logged in Log in or Continue with Google Welcome back! Please log in. Email · Hint Tip: Most researchers use their institutional email address as their ResearchGate login Password Forgot password? Keep me logged in Log in or Continue with Google No account? Sign up

This is the logo for the website Know Industrial Engineering

Linear Programming Problem (LPP) using Solver in Microsoft Excel

Linear programming problem is a method of finding the optimum value (maximum or minimum) of any variable. It uses mathematical modelling to represent and solve the problem at hand. The problems will be linear function. There will be different set of constraints applied to such linear problems. We can solve different kind of problems. Please see the examples given below.

  • Product Mix Problem
  • Flight Scheduling Problem
  • Investment Problem
  • Capital Budgeting Problem
  • Production Mix Problem

This article we will discuss one Linear Programming Problem, we will formulate it in mathematical model, and step by step solve it using Solver add-in in Microsoft Excel. I have provided the Spreadsheet used in example at end of article.

A company has two bottling plants, one located at Bhopal and other at Indore. Each plant produces three drinks, energy drinks, flavored drinks and fruit juices named A, B, C respectively. Per day bottle production capacity is as follows:

Plants
BhopalIndore
A15001500
B30001000
C20005000

Demand of the drinks A, B and C will be 20000 bottles, 40000 bottles and 44000 bottles, during the month of April, according to market research. Per day operating cost for plants at Bhopal and Indore are 600 and 400 monetary units.

Now, the question is, for how many days each plant should be run in April so as to minimize production cost and to meet customer demand?

Formulation of Linear Programming Model

The first step will be developing the mathematical model for the problem given,

Let x 1 and x 2 are decision variables which denotes the number of days in April for which the bottling plant in Bhopal and Indore must be run respectively.

: Minimize production cost (Z)600 + 400
will be on demand
for, Product A1500 + 1500 >= 20000
Product B3000 + 1000 >= 40000
Product C2000 + 5000 >= 44000
where , >= 0

After this next step will be making the model in Excel Spreadsheet. As shown in image “Excel Spreadsheet Model” we have converted mathematical model into the tabular format for further calculation.

Making the Excel Spreadsheet Model

assignment problem linear programming excel

Cell Values

assignment problem linear programming excel

Here , Cell E5 represents the objective function (which is to minimize the cost).Cell C4 and D4 are values of decision variables x 1 and x 2 which denotes the number of days in April for which the bottling plant in Bhopal and Indore must run respectively.

Here Cell G8:G10 represents the minimum demand to be met for product A, B and C respectively. Cell E8:E10 represents the Total quantity of the product A, B and C to be produced. Also cell C8:C10 represents the quantity of product A, B and C to be produced at Bhopal Plant. Cell D8:D10 represents the quantity of product A, B and C to be produced at Indore Plant.

Now we can use the solver to find the optimal solution for the problem. Solver is a free Excel add in need to be installed ( Link ).After installing this add in, Go to Data > Analysis > Solver .

Input solver parameters

assignment problem linear programming excel

Use of solver has made the calculation easy for us while solving Linear Programming Problem if we compare it with manual calculation methods(Graphical, Simplex). Therefore we need to make sure that we are defining the following things in correct manner otherwise it will lead to an error.

  • Defining the objective function (Maximize or Minimize)
  • Define the variable cells (Decision Variables)
  • Define the constraints.

We want to minimize the total cost. For that, Select cell E5 in set objective value. Choose “Min” in radio button. Now in “By changing cell variables” select the decision variables C4 and D4.

To add the constraints , Click on Add in as shown in Image above. It will open the dialogue box as shown in “Cell reference” select the cell E8. Choose the “>=” (greater than or equal to) sign from drop down menu. Select cell G8 in “Constraints”. Do the same for remaining two constraints.

assignment problem linear programming excel

Now select the check box “Make Unconstrained Variables Non- Negative” which states that decision variables x 1 and x 2 are greater than or equal to zero.

Select solving method as “Simplex LP”. Once all the inputs parameters are defined click on the “Solve”.

Excel spreadsheet model with Solver Solution

assignment problem linear programming excel

Above image shows the solver solution for our Linear Programming Problem. Solver has come up with solution that plant at Bhopal should run for 12 days and Indore should run for 4 days to meet the objective of minimizing the cost which is 8800 monetary units.(Cell E5)

In above example, the manager has to decide for how many days he has to run the plant at Bhopal and Indore. To minimize the cost it is clearly seen(intuitively) that Indore has low production cost compared to Bhopal plant as a result we should only run the plant at Indore. But if you compare it with the solution we can see that the plant at Bhopal has more production cost than Indore, still it should be run more no. of days considering the demand constraints.

Thank you…!

If you know any subject that can be related to manufacturing industry or industrial engineering, you can earn some income by becoming article contributor of this website. For knowing more about it, please visit  Join us page .

You don’t need to have any experience in article writing, just knowledge on the subject is needed.

Also you can know more about our team of article contributors by visiting the  about us page .

About the Author

assignment problem linear programming excel

Nikunj Patel is a researcher and post graduate in Industrial engineering, Graduate in Mechanical engineering. His area of interests are Statistics, Operations Research, Supply Chain Management, Quality Management.

Share this:

guest

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Transportation, Transshipment, and Assignment Problems


Learning Objectives

After completing this chapter, you should be able to:


To learn more about the book this website supports, please visit its .
and .
is one of the many fine businesses of .
You must be a registered user to view the in this website.

If you already have a username and password, enter it below. If your textbook came with a card and this is your first visit to this site, you can to register.
Username:
Password:
'); document.write(''); } // -->
( )
.'); } else{ document.write('This form changes settings for this website only.'); } //-->
Send mail as:
'); } else { document.write(' '); } } else { document.write(' '); } // -->
'); } else { document.write(' '); } } else { document.write(' '); } document.write('
TA email: '); } else { document.write(' '); } } else { document.write(' '); } // -->
Other email: '); } else { document.write(' '); } } else { document.write(' '); } // -->
"Floating" navigation? '); } else if (floatNav == 2) { document.write(' '); } else { document.write(' '); } // -->
Drawer speed: '; theseOptions += (glideSpeed == 1) ? ' ' : ' ' ; theseOptions += (glideSpeed == 2) ? ' ' : ' ' ; theseOptions += (glideSpeed == 3) ? ' ' : ' ' ; theseOptions += (glideSpeed == 4) ? ' ' : ' ' ; theseOptions += (glideSpeed == 5) ? ' ' : ' ' ; theseOptions += (glideSpeed == 6) ? ' ' : ' ' ; document.write(theseOptions); // -->
1. (optional) Enter a note here:

2. (optional) Select some text on the page (or do this before you open the "Notes" drawer).
3.Highlighter Color:
4.
Search for:
Search in:
Course-wide Content


Quizzes

More Resources



Instructor Resources



Course-wide Content


Instructor Resources


Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Problem solving a linear program using Excel

The exercise is as follows:

ACI has decided to put an order for golf shoes twice every year and expects to receive one shipment of $960$ pallets of shoes by the beginning of January and another shipment of $1250$ pallets of shoes by July. Each pallet contains $20$ cartons of shoes. Upon arrival to Canada, CBSA takes custody of the shoes. The company should decide how many cartons of shoes to release each month from Customs to supply all their demand while maintaining the lowest cost. For the amount of shoes that are released from Customs, the company needs to pay their duty cost. Because of the time value of money, it costs the company more to clear the shoes sooner than it does to release them later. So, the company might decide to delay releasing some of the shoes by a few months. All the shoes however should be released by the end of December. If we consider the value of shoes, the $19$ percent duty cost and the company’s goal to return $13$ percent on their investment, the cost of releasing one carton in each month along with the expected amount of demand for each month is listed in the table. Note that the duty cost and the return rate are already considered and you do not need to account for them. The company can choose to delay releasing some of the shoes and keep them in the CBSA storage facilities. In this case, the company will not have to pay duty until the time the shoes are released but will have to pay $\$0.36$ per month for each carton that is being held in the storage facilities. Formulate a linear programming model for the problem that minimizes the company’s overall cost. Define the three linear programming elements of the model and write down the formulation. (a) Write the model in Excel using color-coded and clearly-defined cells, then solve the model using Excel solver. (b) Observe the solutions, and very briefly describe your observations. This can include a brief description of what the company should do in plain words. (c) Now, assume that CBSA storage facilities will not store more than $4000$ cartons at a time. The company however, has an internal storage capacity that can store the rest of the shoes that are not sold and are already released from Customs. There is a $\$0.1$ cost for storing one carton of shoes for one month internally. Note that in order for the company to store the shoes in the internal storage facilities, the shoes must have been released (i.e. the duty cost must have been paid). Write a linear programming model for this problem. (d) Write the model described in (c) in Excel and use Excel Solver to solve it. (e) Describe your observations from the solutions.

I am having explicit trouble with my solution for (d) as well as suspicions about my solution for part (a). Here's what I did:

Let $x_i = $ the number of cartons of shoes released in month $i$ (month $1$ is January, month $2$ is February, etc.). Then the constraints on my objective functions are as follows:

$\cdot \ x_1 + x_2 + x_3 + x_4 + x_5 + x_6 \leq 19200$

$\cdot \ x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 + x_8 + x_9 + x_{10} + x_{11} + x_{12} = 19200 + 25000 = 44200 $

$\cdot \ x_1 \geq 7000, \ x_2 \geq 6600, \ x_3 \geq 2800, \ x_4 \geq 1200, \ x_5 \geq 0, \ x_6 \geq 1600, \ x_7 \geq 2800, \ x_8 \geq 4000, \ x_9 \geq 4400, \ x_{10} \geq 4400, \ x_{11} \geq 4600, \ x_{12} \geq 4800$

$\cdot \ x_i \in \mathbb{N_0}$

Letting $Z =$ total cost:

$$Z = 1824x_1 + 1787.52x_2 + 1751.77x_3 + 1716.73x_4 + 1682.4x_5 + 1648.75x_6 + 1824x_7 + 1787.52x_8 + 1751.7696x_9 + 1716.73421x_{10} + 1682.39952x_{11} + 1648.75153x_{12} + (19200-x_1)(.36) + (19200 - (x_1 + x_2))(.36) + \cdot \cdot \cdot + (19200 - (x_1 + x_2 + x_3 + x_4 + x_5 + x_6))(.36) + (44200 - (x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7))(.36) + \cdot \cdot \cdot + (44200 - \left(\sum_{i=1}^{12}x_i\right))(.36) \\ = 1824x_1 + 1787.52x_2 + 1751.77x_3 + 1716.73x_4 + 1682.4x_5 + 1648.75x_6 + 1824x_7 + 1787.52x_8 + 1751.7696x_9 + 1716.73421x_{10} + 1682.39952x_{11} + 1648.75153x_{12} + .36((12*19200 + 6*25000) - (12x_1 + 11x_2 + 10x_3 + 9x_4 + 8x_5 + 7x_6 + 6x_7 + 5x_8 + 4x_9 + 3x_{10} + 2x_{11} + x_{12}))$$

My objective is to minimize $Z$ . I will do this using a linear program solver in Microsoft Excel.

part a w/ formulas

The reason I am suspicious of this solution is that it seems trivial. It's not unbelievable, but it does seem slightly odd that this would be the answer. But okay, on to part (c).

The new constraints on our model are as follows:

$\cdot \ 19200 - x_1 \leq 4000$

$\cdot \ 44200 - \sum_{i=1}^7x_i \leq 4000$ .

I believe these are sufficient to represent the new scenario, because if we don't have overflow in the CBSA storage in January and July, then we won't have overflow at any other time because those are the only times we have new supply.

Let $d_i =$ demand in month $i$ . Let $Y =$ the new cost. Then

$Y = Z + .1(x_1 - d_1) + .1(x_1 + x_2 - (d_1 + d_2)) + ... + .1(\sum_{i=1}^{12}x_i - \sum_{i=1}^{12}d_i)$

$= 1824x_1 + 1787.52x_2 + 1751.77x_3 + 1716.73x_4 + 1682.4x_5 + 1648.75x_6 + 1824x_7 + 1787.52x_8 + 1751.7696x_9 + 1716.73421x_{10} + 1682.39952x_{11} + 1648.75153x_{12} + .36((12*19200 + 6*25000) - (12x_1 + 11x_2 + 10x_3 + 9x_4 + 8x_5 + 7x_6 + 6x_7 + 5x_8 + 4x_9 + 3x_{10} + 2x_{11} + x_{12})) + .1(12(x_1 - 7000) + 11(x_2 - 6600) + 10(x_3 - 2800) + 9(x_4 - 1200) +8x_5 + 7(x_6 - 1600) + 6(x_7 - 2800) + 5(x_8 - 4000) + 4(x_9 - 4400) + 3(x_{10} - 4400) + 2(x_{11} - 4600) + (x_{12} - 4800))$

enter image description here

And finally, here is where I have an error:

enter image description here

So I suppose I must have made an error somewhere. I cannot find it. I know the problem is extremely long - I guess that's the nature of these linear programming problems - so I thank you infinitely for the help.

  • linear-programming
  • integer-programming

jeremy909's user avatar

  • $\begingroup$ If I were a Canadian, I'd tell the CBSA to get the hell out of the commercial warehouse business. $\endgroup$ –  Mark L. Stone Commented Apr 14, 2020 at 0:45
  • $\begingroup$ @MarkL.Stone Ha-ha, Mark. Me too. $\endgroup$ –  jeremy909 Commented Apr 14, 2020 at 1:01
  • $\begingroup$ X-posted: math.stackexchange.com/q/3619655/339790 $\endgroup$ –  Rodrigo de Azevedo Commented Apr 14, 2020 at 4:31
  • $\begingroup$ @jeremy909, out of curiosity, would you try using the mathematical modelling language to interpret your problem? (E.g. open-source Python-based language like Pulp) $\endgroup$ –  A.Omidi Commented Apr 14, 2020 at 6:03
  • $\begingroup$ @A.Omidi although I would be happy to otherwise, I do not know how :/ $\endgroup$ –  jeremy909 Commented Apr 14, 2020 at 14:20

Try to come up with a feasible (not necessarily optimal) solution, plug it into cells F2 to F13, and see if any of your constraints are violated. If so, and assuming your solution is really feasible, those are the constraints to fix. If not, meaning all constraints are satisfied, then possibly there is an issue with how the model was plugged into Solver.

prubin's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged linear-programming solver integer-programming excel or ask your own question .

  • Featured on Meta
  • Site maintenance - Mon, Sept 16 2024, 21:00 UTC to Tue, Sept 17 2024, 2:00...
  • User activation: Learnings and opportunities
  • Join Stack Overflow’s CEO and me for the first Stack IRL Community Event in...

Hot Network Questions

  • Copy and pasting wont work in animation. Not even duplicate
  • Do I have to use a new background that's been republished under the 2024 rules?
  • Stretched space in math mode
  • Are Backstabs All That Bad?
  • Symbolic integral over real functions with interger parametres evaluates to complex numbers
  • Coloring a function based on its monotonicity
  • Not great at regexs. Trying to code-golf this beast of a regex WITHOUT using string replacement (for G-Zip purposes)
  • How to execute this time-stamped auto-backup function every N minutes?
  • Young adult fantasy book about a girl who accidentally kills her boyfriend and decides to attend an academy for witches or magic
  • Does the different strength of gravity at varying heights affect the forces within a suspended or standing object
  • Do carbon fiber wings need a wing spar?
  • What would a planet need for rain drops to trigger explosions upon making contact with the ground?
  • how does the US justice system combat rights violations that happen when bad practices are given a new name to avoid old rulings?
  • My math professor is Chinese. Is it okay for me to speak Chinese to her in office hours?
  • Will a recent B2 travel to the same location as my F1 college application affect the decision
  • When a creature enchanted with Fungal Fortitude dies and returns to the battlefield, does it keep Fungal Fortitude?
  • crontab schedule on Alpine Linux runs on days it's not supposed to run on
  • Python script to renumber slide ids inside a pptx presentation
  • View undo history of Windows Explorer on Win11
  • What is the best way to protect from polymorphic viruses?
  • Is it really a "space walk" (EVA proper) if you don't get your feet wet (in space)?
  • Missed the application deadline for a TA job. Should I contact them back?
  • Is it possible/recommended to paint the side of piano's keys?
  • If someone threatens force to prevent another person from leaving, are they holding them hostage?

assignment problem linear programming excel

How to Do Linear Programming in Excel?

Spreadsheets are a few people’s ideas of fun. Indeed, of all the major productivity software, spreadsheets like those in Microsoft Excel are among the least loved and most dreaded.

In this article, we’ll take a look at how to use Excel to do linear programming. Wait, you say, you mean that Excel can do linear programming ? Yes, it can! And it’s easier than you might think.

Before we get started, let’s talk a little bit about what linear programming is and how to do linear programming in Excel.

Table of Contents

What is Linear Programming?

So, what is linear programming? Linear programming is a type of mathematical modeling involving linear functions.

For example, imagine that you work for a delivery service and need to deliver fifty packages while simultaneously traveling the shortest distance and saving the most fuel.

When you engage in linear programming, there are five basic steps that allow you to make the calculation:

While Microsoft Excel isn’t able to identify variables and formulate the function for you, it can help you to solve the linear programming problem more easily.

Microsoft Excel

Microsoft Excel empowers users to use Excel as a one-stop shop for working with all manner of data and processing it into usable information.

Indeed, Excel goes beyond just a spreadsheet to offer graphing options, pivot tables, calculation and computation abilities, and a macro programming language. There are more than 480 functions currently available in Microsoft Excel.

Given the power of Excel, it’s no wonder that Excel can help with linear programming. Let’s examine how to do linear programming in Excel in detail.

Using Excel for Linear Programming

Note: Before you begin to do linear programming in Excel, you will need to have identified your problem, constraints, and objective function. If you need Excel homework assignment help with any step of the programming process, including the identification of these aspects, you may find it beneficial to contact online experts who are trained to assist with thorny Excel issues and turn problems into solutions. There are many online services that can help with Excel homework problems.

When using a template, all you have to do is fill in the boxes and solve! It’s that simple: You can have a linear programming problem solved in minutes, provided you know the constraints and functions you need.

Share With Your Friends

Recommended articles, leave a comment cancel reply, more articles.

IMAGES

  1. How to Perform Linear Programming in Excel

    assignment problem linear programming excel

  2. How to Perform Linear Programming in Excel

    assignment problem linear programming excel

  3. Assignment Problem in Excel (In Easy Steps)

    assignment problem linear programming excel

  4. Linear Programming

    assignment problem linear programming excel

  5. Linear Programming (LP) Optimization with Excel Solver

    assignment problem linear programming excel

  6. Solving Linear Programming Problem using Excel's Solver

    assignment problem linear programming excel

VIDEO

  1. UNBALANCED ASSIGNMENT PROBLEM: HUNGARIAN METHOD#03

  2. Excel : How to solve Linear Programming Problem LP in Excel- OR- Operational Research

  3. Application of Linear Programming Method in OR

  4. SESSION 16 LINEAR PROGRAMMING WITH EXCEL PART 2 UGBS301

  5. Assignment Problem in Operation Research Hungarian Method #OperationResearch

  6. how to solve the linear programming by excel

COMMENTS

  1. Assignment Problem in Excel (In Easy Steps)

    The model we are going to solve looks as follows in Excel. 1. To formulate this assignment problem, answer the following three questions. a. What are the decisions to be made? For this problem, we need Excel to find out which person to assign to which task (Yes=1, No=0). For example, if we assign Person 1 to Task 1, cell C10 equals 1. If not ...

  2. Solving an Assignment Problem in Solver: Linear Programming

    It shows how to solve an assignment linear programming model in Solver Add-in in Excel. It finds the optimum assignment of multiple tasks to multiple workers...

  3. Ch05-08 Assignment Problem

    This video is part of a lecture series available at https://www.youtube.com/channel/UCMvO2umWRQtlUeoibC8fp8Q

  4. PDF Assignment Problem Using QM

    In this example, we will solve an assignment problem using linear programming with Excel QM. The hospital administrator at St. Charles General Hospital must appoint head nurses to four newly established departments: urology, cardiology, orthopedic, and obstetrics. In anticipation of this staffing problem, she has hired four nurses: Hawkins ...

  5. Linear Programming: Assignment with Excel Solver (Network ...

    Enjoyed this content & want to support my channel? You can get the spreadsheet I build in the video or buy me a coffee! Links below:Buy me a coffee: https://...

  6. Excel Solver tutorial with step-by-step examples

    To add Solver to your Excel, perform the following steps: In Excel 2010 - Excel 365, click File > Options. In Excel 2007, click the Microsoft Office button, and then click Excel Options. In the Excel Options dialog, click Add-Ins on the left sidebar, make sure Excel Add-ins is selected in the Manage box at the bottom of the window, and click Go ...

  7. Excel Linear Programming (Using the Solver and Graphical Methods)

    How to Tabulate Linear Programming Problems in Excel. Tabulate the linear programming model in the following format to input the objective functions and constraints in the Excel Solver Add-in. Here, the Light Green colored boxes are kept empty for calculations and solutions. Use the following formula in F5. The range C5:E5 is empty, so F5 shows 0

  8. PDF Using Excel to solve linear programming problems

    Subject to the constraints: Click on Add. Click on Cell Reference and then click in D15, then click on Constraint and then click in F15. Be sure the test listed between them is <=. Now click on Options. Make sure Assume Linear Model and. Assume Non-Negative boxes are checked, then click OK. Back at the Solver, click Solve.

  9. How to Use Excel Solver for Linear Programming (with Easy Steps)

    STEP 1 - Enabling the Solver Tool in Excel. Go to File and select Options. Select the Add-ins tab. Choose Excel Add-ins from the Manage drop-down. Press Go. The Add-ins dialog box will pop out. Check the box for Solver Add-in. Press OK. You'll see the Solver command in the Analyze section under the Data tab.

  10. Balanced Assignment Problem Using Excel Solver

    An Assignment problem is a type of linear programming problem, which is about assigning the correct number of resources to various destinations or problems. This gives you the optimal solution which is either maximizing the profit or minimizing the cost of production. How to Solve Balanced Assignment Problem Using Excel Solver Add-In? Let's ...

  11. How to Solve Linear Programming in Excel Using Solver Option?

    To allow this solver option, we must follow the below steps. Step 1: We must first go to the "File" tab. Then, under the "File tab," click on "Options." Step 2: Next, go to "Add-ins" under Excel "Options." Step 3: Under this, select "Excel Add-ins" and click on "Go." Step 4: Under the pop-up below, choose "Solver Add-in" and click on "OK ...

  12. PDF LINEAR PROGRAMMING USING THE EXCEL SOLVER

    can use linear programming. When multiple objectives exist, goal programming is used. If a problem is best solved in stages or time frames, dynamic programming is employed. Other restrictions on the nature of the problem may require that it be solved by other variations of the technique, such as nonlinear programming or quadratic programming.

  13. Solve problems with linear programming and Excel

    Linear programming. Linear programming is a form of mathematical optimisation that seeks to determine the best way of using limited resources to achieve a given objective. The key elements of a linear programming problem include: Decision variables: Decision variables are often unknown when initially approaching the problem.

  14. Assignment Model with Excel Solver

    The video explains on how to solve the Assignment Model of problems using MS Excel Solver.

  15. Optimization Modeling with Solver in Excel

    By Stephen L. Nelson Leave a Comment. Excel's Solver tool lets you solve optimization-modeling problems, also commonly known as linear programming programs. With an optimization-modeling problem, you want to optimize an objective function but at the same time recognize that there are constraints, or limits. While this abstract definition ...

  16. Solving Linear Programming Problems By Using Excel's Solver

    Also it provides: a brief overview of Excel's Add-in Solver; basic theory of optimization as implemented within the Solver; advantages of the Excel Solver in linear programming, and three numerical examples outlining the steps involved in carrying out adjustment of Solver to solve the linear programming problems.

  17. Solve linear programming problem using Excel

    Modelling Linear Programming. As the first step we have to do the modelling i.e. make the required equation. We can find the constraints in the right side (column N). Cell F4 is our equation P which has to be minimized and F6,F7,F8 are the constraints. Solving the linear model using Excel Solver. Now go to Data and open solver.

  18. Solving Linear Programming Problems By Using Excel's Solver

    In the following pages the paper introduces and describes. the method of using the Microsoft Excel's Solver to find. the opti mal solution of some Linear Programming. problems. Steps of LP ...

  19. Linear Programming Problem (LPP) using Solver in Microsoft Excel

    Choose "Min" in radio button. Now in "By changing cell variables" select the decision variables C4 and D4. To add the constraints , Click on Add in as shown in Image above. It will open the dialogue box as shown in "Cell reference" select the cell E8. Choose the ">=" (greater than or equal to) sign from drop down menu.

  20. Transportation, Transshipment, and Assignment Problems

    After completing this chapter, you should be able to: Describe the nature of transportation transshipment and assignment problems. Formulate a transportation problem as a linear programming model. Use the transportation method to solve problems with Excel. Solve maximization transportation problems, unbalanced problems, and problems with ...

  21. solver

    Formulate a linear programming model for the problem that minimizes the company's overall cost. Define the three linear programming elements of the model and write down the formulation. (a) Write the model in Excel using color-coded and clearly-defined cells, then solve the model using Excel solver. (b) Observe the solutions, and very briefly ...

  22. How to Do Linear Programming in Excel?

    After you have finished inputting the problem, use the "Data" tab in Excel to select "Solver" from the "Analysis" group. This will give you access to the linear programming tool. Once you have navigated to "Solver," in the "Parameters" dialog box, choose whether to minimize or maximize the objective function and then select ...

  23. Solving LP Transportation Problem

    How to use Solver in Excel to solve a transportation problem.00:00 Components of Transportation matrix00:22 Setting up for Solver 02:11 Loading Solver Addin0...