Download presentation
Presentation is loading. Please wait.
1
1 Chapter 7 Linear Programming Models Continued – file 7c
2
2 LP and Microsoft Excel The version of Microsoft Excel on the network at Wayne State College, and probably the one you have at home, will perform Linear Programming problems. If you go to the main toolbar at the top of an open Excel file and with the mouse if you left click on tools (unless you have manually changed the function of the mouse, then you would right click - most of you can ignore this note) you will see a scroll down menu. Go down to Solver and left click on the mouse. The solver parameters drop down box appears. Close it for now. We will come back to this. I just wanted to make sure your version of Excel has Solver. If it does not, either go to tools and scroll Add-ins and check Solver Add in or get the install program and include Solver. It is an Add-In.
3
3 The product mix problem In the problem we had the following Maximize profit = $7x1 + 5x2 subject to 4x1 + 3x2 < = 240, 2x1 + 1x2 < =100, x1 > = 0, and x2 > = 0. Note: < = means less than or equal to > = means greater than or equal to. It is easier to type this way.
4
4 Excel When you open Excel you have to type in information about the objective function and the constraints. The non-negativity constraints are assumed to hold. In the file chapter 7b I put what excel looks like after you have typed some information in. Let’s review this on the following slides. If you did not already do so, you may want to print chapter 7b as a slide. This makes it easier for you to see.
5
5 Excel Note how in cell A1 I just put the cursor there and typed “Flair Furniture” You can do the same. Go down to A4 and mimic what I have on the sheet. When you are done with A8, and have hit the enter key, you may noticed that what you have typed is larger that the column with. You can expand the column size. First make sure the cursor is not in a cell with words or numbers in it. Then notice at the top of the column the letter “A.” To the right is an indentation. Move the cursor or mouse to the indentation and notice how a thin cross appears. With the thin cross, left click and drag the column to the size you want. You can always do this to columns (rows too!).
6
6 Excel Notice in cells b3 and c3 that I put “tables” and “chairs,” respectively. See how the numbers I put beneath the headings are exactly like the coefficients on the variables x1 and x2 in the full mathematical statement of the problem that we saw on slide 3 (ignoring non-negativelty constraints). The solutions values are 1 and 1 in cells b8 and c8 because Excel likes to start here in finding a solution to the maximization problem. (Later we will ask Excel to start here and then keep looking for the max)You would see this in an Excel note about LP problems. Excel does not go to the corners, as we suggested in the past. Computer technology can be used to find shortcuts. The corner point method makes sense in theory. The practice within the computer may be inefficient.
7
7 Excel Note in Column d, cell 3 I typed “left hand side.” This corresponds to the statement of the problem to the left of equal or inequality signs. Since we have a maximization problem I put <= signs in column E, but only in the rows with the CONSTRAINTS. This column is merely a window dressing column. In column F, note where I put the phrase “right hand side” (corresponding to the constraint values) and constraint values. Slack is also put in for something we do later.
8
8 excel Now in cell d4 type =sumproduct($b$8:$c$8,b4:c4) What is happening here is that in a search for the solution the computer will start with 1 table and 1 chair (in cells b8 and c8) and calculate profit as 7(1) + 5(1)=12. The computer will then do another solution (because we will tell it to later), like 1 table and 2 chairs and see if profit is higher and the computer will stop looking when it can’t find a higher value, assuming constraints are not violated. Now take the mouse and go to the bottom right corner of cell d4. You will notice the cursor changes, maybe to a small cross. Left click and drag down till the last constraint (painting here), but stay in column d. You have copied info.
9
9 Excel In column G, next to the constraint 240, type in cell g5 =f5-d5 This function just checks if you have used up all the value in the constraint. For example, did we use up all the time in carpentry. If the value ends up zero, then all the time was used in carpentry and we would say there is nothing left, or no “slack,” in carpentry. If it is not zero, then we have not used all we can in carpentry and the number given tells us how much time we have left. Copy cell c5 to cell c6 - remember how from previous screen?
10
10 Excel For the product mix problem, we have set up the basic parameters Excel needs to solve the problem. I would save the file in Excel at this time. The next file you see on the internet has just one slide (print it as one slide) of what excel will look like when you go to tools on the main tool bar scroll down to solver and let go of the mouse. I will explain what to do next in yet another file. I don’t want files to get so large you can’t print them out.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.