You are on page 1of 19

Computer-assisted Learning

Concepts & Techniques


Tell me and I'll forget.
Show me and I might remember.
But involve me and I will understand.
Computer-assisted learning is to convey a vast amount of information in a very
short period of time. It is a powerful method of reinforcing concepts and topics first
introduced to you through your textbook, and discussion in the classroom.
Computer-assessed learning enables you in a powerful way to comprehend
complex concepts.
Professor Hossein Arsham
To search the site, try Edit | Find in page [Ctrl + f]. Enter a word or phrase in the dialogue box, e.g.
"parameter " or "linear " If the first appearance of the word/phrase is not what you are looking for, try
Find Next.
MENU
1. Introduction
2. Computer Package: WinQSB
3. Linear Programming (LP) implementations with the WinQSB
4. Managerial Interpretation of the WinQSB Report for LP
5. How to Use LINDO and Interpret Its Output
6. Solving Unrestricted Variables by LINDO
7. Integer LP Programs by LINDO
8. Shadow Price Might Have Wrong Sign
9. Solving LP Problems by Excel
10. Network Models Implementations with the WinQSB
11. NonLinear Programming Implementations with the WinQSB
12. Decision Analysis Implementation with the WinQSB
13. Business Forecasting Implementation with the WinQSB
14. How to Import/Export Data from WinQSB to Other Applications
15. Linear Programming by Excel Solver
16. Linear Programming Software Survey
17. Forecasting Software Survey
18. Decision Analysis Software Survey
Companion Sites:
Linear Optimization Solvers to Download
Success Science
Leadership Decision Making
Linear Programming (LP) and Goal-Seeking Strategy
Artificial-variable Free LP Solution Algorithms
Integer Optimization and the Network Models
Tools for LP Modeling Validation
The Classical Simplex Method
Zero-Sum Games with Applications
Linear Algebra and LP Connections
From Linear to Nonlinear Optimization with Business Applications
Sensitivity Region for LP Models
Zero Sagas in Four Dimensions
Probabilistic Modeling
Systems Simulation
Keywords and Phrases
Compendium of Web Site Review
Collection of JavaScript E-labs Learning Objects
Decision Science Resources
Introduction
The Value of Performing Experiment: If the learning environment is focused on background
information, knowledge of terms and new concepts, the learner is likely to learn that basic information
successfully. However, this basic knowledge may not be sufficient to enable the learner to carry out
successfully the on-the-job tasks that require more than basic knowledge. Thus, the probability of
making real errors in the business environment is high. On the other hand, if the learning environment
allows the learner to experience and learn from failures within a variety of situations similar to what
they would experience in the "real world" of their job, the probability of having similar failures in
their business environment is low. This is the realm of simulations-a safe place to fail.
The appearance of management science software is one of the most important events in decision
making process. OR/MS software systems are used to construct examples, to understand the existing
concepts, and to discover useful managerial concepts. On the other hand, new developments in
decision making process often motivate developments of new solution algorithms and revision of the
existing software systems. OR/MS software systems rely on a cooperation of OR/MS practitioners,
designers of algorithms, and software developers.
The major change in learning this course over the last few years is to have less emphasis on strategic
solution algorithms and more on the modeling process, applications, and use of software. This trend
will continue as more students with diverse backgrounds seek MBA degrees without too much theory
and mathematics. Our approach is middle-of-the-road. It does not have an excess of mathematics nor
too much of software orientation. For example, we lean how to formulate problems prior to software
usage. What you need to know is how to model a decision problem, first by hand and then using the
software to solve it. The software should be used for two different purposes.
Personal computers, spreadsheets, professional decision making packages and other information
technologies are now ubiquitous in management. Most management decision-making now involves
some form of computer output. Moreover, we need caveats to question our thinking and show why we
must learn by instrument. In this course, the instrument is your computer software package. Every
student taking courses in Physics and Chemistry does experimentation in the labs to have a good
feeling of the topics in these fields of study. You must also perform managerial experimentation to
understand the Management Science concepts and techniques.
Learning Objects: My teaching style deprecates the 'plug the numbers into the software and let the
magic box work it out' approach.
Computer-assisted learning is similar to the experiential model of learning. The adherents of
experiential learning are fairly adamant about how we learn. Learning seldom takes place by rote.
Learning occurs because we immerse ourselves in a situation in which we are forced to perform. You
get feedback from the computer output and then adjust your thinking-process if needed.
Unfortunately, most classroom courses are not learning systems. The way the instructors attempt to
help their students acquire skills and knowledge has absolutely nothing to do with the way students
actually learn. Many instructors rely on lectures and tests, and memorization. All too often, they rely
on "telling." No one remembers much that's taught by telling, and what's told doesn't translate into
usable skills. Certainly, we learn by doing, failing, and practicing until we do it right. The computer
assisted learning serve this purpose.
1. Computer assisted learning is a collection of experimentation (as in Physics lab to learn
Physics) on the course software package to understand the concepts and techniques. Before
using the software, you will be asked to do a simple problem by hand without the aid of
software. Then use the software to see in what format the software provides the solution. We
also use the software as a learning tool. For example, in order to understand linear programming
sensitivity analysis concepts, you will be given several managerial scenarios to think about and
then use the software to check the accuracy of your answers.
2. To solving larger problems which are hard to do by hand.
Unfortunately, the first objective is missing in all management science/operations research textbooks.
What is critical and challenges for you is to lean the new technology, mainly the use of software
within a reasonable portion of your time. The learning curve of the software we will be using is very
sharp.
We need caveats to question our thinking and show why we must learn-to by instrument that in this
course is your computer package. Every student taking courses in Physics and Chemistry does
experimentation in the labs to have a good feeling of the topics in these fields of study. You must also
perform experimentation to understand the Management Science concepts. For example, you must use
your computer packages to perform the "what if" analysis. Your computer software allows you
observe the effects of varying the "givens".
You will be engaged in thinking process of building models rather than how to use the software to
model some specific problems. Software is a tool, it cannot substitute for your the thinking process.
We will not put too much focus on the software at the expense of leaning the concepts. We will lean
step-by-step problem formulation, and managerial interpretation of the software output.
Managerial Interpretations: The decision problem is stated by the decision maker often in some non-
technical terms. When you think over the problem, and finding out what module of the software to
use, you will use the software to get the solution. The strategic solution should also be presented to the
decision maker in the same style of language which is understandable by the decision maker.
Therefore, just do not give me the printout of the software. You must also provide managerial
interpretation of the strategic solution in some non-technical terms.
Computer Package: WinQSB
Learn by Doing: We will use WinQSB package as a computer-assisted learning tool to gain a good
"hands-on" experience on concepts and techniques used in this course. These labs experimentation
will enhance your understanding of the technical concepts covered in this course.
The QSB (Quantitative Systems for Business) is developed and maintains by Yih-Long Chang. This
software package contains the most widely used problem-solving algorithms in Operations Research
and Management Science (OR/MS). The WinQSB is the Windows version of the QSB software
package runs under the CD-ROM Windows. There is no learning-curve for this package, you just
need a few minutes to master its useful features.
The WinQSB Decision Support Software for MS/OM is available from the John Wiley & Sons
publisher, ISBN 0-471-40672-4, 2003.
Further Reading:
Chang Y-L., QSB+: Quantitative Systems for Business Plus, Prentice Hall, 1994.
This course uses a professional software called WinQSB, available at: WinQSB Software.
WinQSB Installation Instructions
1. Create a folder (directory) named WinQSB
2. Open the CD-ROM files, and save this file to the folder created in step 1.
3. Run the WinQSB.exe program first (You must execute these programs in the proper sequence).
Go to the file location (where you saved it step 2) and double click (or click on file-open) to
execute the file. Follow the prompts and extract the files to the WinQSB folder that you created
in step 1.
4. Reboot your system.
5. You will now have a list of files (both executable and support files) in the WinQSB folder that
you created in step 1. To use the Linear Program model, for example, click (or double-click) on
the file called LP-ILP.exe.
If you have no access to any computer outside, you may use the university computer network. The
QSB is available on the the University NT server. To reach the system you need an NT account. To
obtain your NT account see the Technical Assistance (TA) at the lower level of Business Center.
After obtaining your username and a password then you can access the NT system. To reach the QSB,
click on Start, choose the Business School Applications, then click on the Shortcut to QSB, or QSB.
Then, pick-up the application you wish. All QSB applications are therein.
How to Use LINDO and Interpret Its Output for Linear Programs
Computer always solves real world linear programs mostly using the simplex method. The
coefficients of the objective function are known as cost coefficients (because historically during
World War II, the first LP problem was a cost minimization problem), technological coefficients, and
the RHS values. This is a perfect way to learn the concepts of sensitivity analysis. As a user, you have
the luxury of viewing numerical results and comparing them with what you expect to see.
The widely used software for LP problems is the Lindo package. A free Windows version can be
downloaded right from LINDO's Home page at LINDO, http://www.lindo.com.
Caution! Before using any software, it is a good idea to check to see if you can trust the package.
Here is an LP Software Guide for your review.
Lindo is a popular software package, which solves linear programs. The LP/ILP application of
WinQSB does the same operations as Lindo does, but in a much easier to use fashion.
The name LINDO is an abbreviation of Linear INteractive Discrete Optimization. Here the word
"discrete" means jumping from one basic feasible solution (BFS) to the next one rather than crawling
around the entire feasible region in search of the optimal BFS (if it exists).
Like almost all LP packages, including WinQSB, Lindo uses the simplex method. Along with the
solution to the problem, the program will also provide ordinary sensitivity analysis of the Objective
Function Coefficients (called Cost Coefficients) and the Right-hand-side (RHS) of the constraints.
Below is an explanation of the output from the LINDO package.
Using WinQSB: How To?
Suppose you wish to run the Carpenter's Problem. Bring up the LINDO (or your WinQSB) package.
Type in the current window as follow:
MAX 5X1 + 3X2
S.T. 2X1 + X2 < 40
X1 + 2X2 < 50
End
NOTICE:
1. The objective function should not contain any constant. For example, Max 2X1 + 5 is not
allowed.
2. All variables must appear in the left side of the constraints, while the numerical values must
appear on the right side of the constraints (that is why these numbers are called the RHS
values).
3. All variables are assumed to be nonnegative. Therefore, do not type in the non-negativity
conditions.
If you wish to get all Simplex Tableaux, then
Click on "Reports" and then choose "Tableau", then click on "Solve" and choose "Pivot" then
choose "OK", "Close", "Cancel", continue in this manner until you get the message "Do? Range
(Sensitivity) Analysis". Select "Yes", if you wish. After minimizing the current window, you
will see the output that you may print for your managerial analysis.
Otherwise, click on "Solve", then choose "Solve".
It is good practice to copy the LP problem from your first window and then paste it at the top of the
output page.
On the top of the page is the initial tableau, and across the top of tableau are the variables. The first
row in the tableau is the objective function. The second row is the first constraint. The third row is the
second constraint, and so on until all constraints are listed in the tableau.
Following the initial tableau is a statement that indicates the entering variable and the exiting variable.
The exiting variable is expressed as which row the entering variable will be placed. The first iteration
tableau is printed next. Entering statements and iterations of the tableau continue until the optimum
solution is reached.
The next statement, `LP OPTIMUM FOUND AT STEP 2' indicates that the optimum solution was
found in iteration 2 of the initial tableau. Immediately below this is the optimum of the objective
function value. This is the most important piece of information that every manager is interested in.
In many cases you will get a very surprising message: "LP OPTIMUM FOUND AT STEP 0." How
could it be step 0. Doesn't first have to move in order to find out a result.....? This message is very
misleading. Lindo keeps a record of any previous activities performed prior to solving any problem
you submit in its memory. Therefore it does not show exactly how many iterations it took to solve
your specific problem. Here is a detailed explanation and remedy for finding the exact number of
iterations: Suppose you run the problem more than once, or solve a similar problem. To find out how
many iterations it really takes to solve any specific problem, you must quit Lindo and then re-enter,
retype, and resubmit the problem. The exact number of vertices (excluding the origin) visited to reach
the optimal solution (if it exists) will be shown correctly.
Following this is the solution to the problem. That is, the strategy to set the decision variables in order
to achieve the above optimal value. This is stated with a variable column and a value column. The
value column contains the solution to the problem. The cost reduction associated with each variable is
printed to the right of the value column. These values are taken directly from the final simplex
tableau. The value column comes from the RHS. The reduced cost column comes directly from the
indicator row.
Below the solution is the `SLACK OR SURPLUS' column providing the slack/surplus variable value.
The related shadow prices for the RHS's are found to the right of this. Remember: Slack is the leftover
of a resource and a Surplus is the excess of production.
The binding constraint can be found by finding the slack/surplus variable with the value of zero. Then
examine each constraint for the one which has only this variable specified in it. Another way to
express this is to find the constraint that expresses equality with the final solution.
Below this is the sensitivity analysis of the cost coefficients (i.e., the coefficients of the objective
function). Each cost coefficient parameter can change without affecting the current optimal solution.
The current value of the coefficient is printed along with the allowable increase increment and
decrease decrement.
Below this is the sensitivity analysis for the RHS. The row column prints the row number from the
initial problem. For example the first row printed will be row two. This is because row one is the
objective function. The first constraint is row two. The RHS of the first constraint is represented by
row two. To the right of this are the values for which the RHS value can change while maintaining the
validity of shadow prices.
Note that in the final simplex tableau, the coefficients of the slack/surplus variables in the objective
row give the unit worth of the resource. These numbers are called shadow prices or dual prices. We
must be careful when applying these numbers. They are only good for "small" changes in the amounts
of resources (i.e., within the RHS sensitivity ranges).
Creating the Non-negativity Conditions (free variables): By default, almost all LP solvers (such as
LINDO) assume that all variables are non-negative.
To achieve this requirement, convert any unrestricted variable Xj to two non-negative variables by
substituting y - Xj for every Xj. This increases the dimensionality of the problem by only one
(introduce one y variable) regardless of how many variables are unrestricted.
If any Xj variable is restricted to be non-positive, substitute - Xj for every Xj. This reduces the
complexity of the problem.
Solve the converted problem, and then substitute these changes back to get the values for the original
variables and optimal value.
Numerical Examples
Maximize -X1
subject to:
X1 + X2 0,
X1 + 3X2 3.
The converted problem is:
Maximize -y + X1
subject to:
-X1 - X2 + 2y 0,
-X1 - 3X2 + 4y 3,
X1 0,
X2 0,
and y 0.
The optimal solution for the original variables is: X1 = 3/2 - 3 = -3/2, X2 = 3/2 - 0 = 3/2, with optimal
value of 3/2.
Solving Unrestricted Variables by LINDO
Suppose you wish to solve the following LP model:
Maximize X1
Subject To:
X1 + X2 > 0
2X1 + X2 < 2
X1 > 0
X2 < 0
The LINDI input is:
Maximize X1
S.T.
X1 + X2 > 0
2X1 + X2 < 2
X1 > 0
X2 < 0
End
free X1
free X2
Solution is (X1 = 2, X2 = -2) with optimal value of 2.
For details on the solution algorithms, visit the Web site Artificial-Free Solution Algorithms, example
N0. 7 therein.
Integer LP Programs by LINDO
Suppose in the Carpenters Problem ever table needs four chairs; then the LP formulation is:
Max 5X1+3X2
S.T.
2X1+X2 40
X1 + 2X2 50
4X1 - X2 = 0
X1 0
X2 0
End
GIN X1
GIN X2
GIN stands for general integer variable.
The optimal solution is (X1 = 5, X2 = 20) with optimal value of 85.
Special case of binary variables (X= 0 or 1) is also permitted in LINDO, the command to make the
variable X a binary variable is INT X1.
Computer Implementations with the WinQSB Package
Use the LP/ILP module in your WinQSB package for two purposes: to solve large problems, and to
perform numerical experimentation for understanding concepts we have covered in the LP and ILP
sections.
Variable Type: Select the variable type from the "Problem Specification" screen (the first screen you
see when introducing a new problem); for linear programming use the default "Continuous" option.
Input Data Format: Select the input data format from the "Problem Specification" screen. Usually, it
is preferred to use the Matrix format to input the data. In the Normal format the model appears typed
in. This format may be found more convenient when solving a large problem with many variables.
You can go back and forth between the formats, selecting the "Switch to the" from the Format
menu.
Variable/Constraint Identification: It is a good idea to rename variables and constraints to help
identify the context they represent. Changing the names of variables and constraints is done in the
Edit menu.
Best Fit: Using the best fit from the Format menu lets each column have its own width.
Solving for the Optimal Solution (if it exists): Select Solve the problem from the Solve and analyze
menu, or use the "solve" icon at the top of the screen. The run returns a "Combined Report" that gives
the solution and additional output results (reduced costs, ranges of optimality, slack/surplus, ranges of
feasibility, and shadow prices).
Solving by the Graphic Method: Select the Graphic method from the Solve and Analyze menu (can
only be used for a two-variable problem.) You can also click the graph icon at the top the screen. You
can re-scale the X-Y ranges after the problem has been solved and the graph is shown. Choose the
Option menu and select the new ranges from the drop down list.
Alternate Optimal Solutions (if they exist): After solving the problem, if you are notified that
"Alternate solution exists!!", you can see all the extreme point optimal solutions by choosing the
Results menu and then select Obtain alternate optimal. Also visit Multiple Solutions section on this
Web site for some warnings.
Using WinQSB: How To
Notes:
Use the "Help" file in WinQSB package to learn how to work with it.
For entering problem into the QSB software; for a constraint such as X1 + X2 50, the
coefficient is 1 and should be entered that way in the software. For any variables that are not used in
that particular constraint (for example if there was X3 in the problem but it was not part of the above
constraint), just leave the cell blank for that constraint.
You can change the direction of a constraint easily by clicking on (or ) cell.
To construct the dual of a given problem click on Format, then select Switch to the Dual Form.
If you are not careful you may have difficulty with entering LP problem in WinQSB. For example, in
a given problem a few of your constraints may have variable on the right hand side (RHS). You
cannot enter variable name on the RHS cell otherwise you keep getting an infeasibility response. Only
numbers can be entered on the RHS. For example, for the constraint X2 + X4 .5X5 one must
write it first in the form of X2 + X4 - .5X5 0, then using any LP package including your QSB.
Unfortunately, in some browsers the Graphical Methods of WinQSB may not be available. However,
one may, e.g., use the following JavaScript instead.
The LP Grapher
Managerial Interpretation of the WinQSB Combined Report
The LP/ILP module in WinQSB, like any other popular Linear programming software packages
solves large linear models. Most of the software packages use the modified Algebraic Method called
the Simplex algorithm. The input to any package includes:
1. The objective function criterion (Max or Min).
2. The type of each constraint.
3. The actual coefficients for the problem.
The combine report is a solution report consists of both the solution to the primal (original) problem
and it Dual.
The typical output generated from linear programming software includes:
1. The optimal values of the objective function.
2. The optimal values of decision variables. That is, optimal solution.
3. Reduced cost for objective function value.
4. Range of optimality for objective function coefficients. Each cost coefficient parameter can
change within this range without affecting the current optimal solution.
5. The amount of slack or surplus on each constraint depending on whether the constraint is a
resource or a production constraint.
6. Shadow (or dual) prices for the RHS constraints. We must be careful when applying these
numbers. They are only good for "small" changes in the amounts of resources (i.e., within the
RHS sensitivity ranges).
7. Ranges of feasibility for right-hand side values. Each RHS coefficient parameter can change
within this range without affecting the shadow price for that RHS.
The following are detailed descriptions and the meaning of each box in the WinQSB output beginning
in the upper left-hand corner, proceeding one row at a time. The first box contains the decision
variables. This symbol (often denoted by X1, X2, etc.) represents the object being produced. The next
box entitled "solution value" represents the optimal value for the decision variables, that is, the
number of units to be produced when the optimal solution is used. The next box entitled "unit costs"
represents the profit per unit and is the cost coefficient of the objective function variables.
The next box "total contribution", is the dollar amount that will be contributed to the profit of the
project, when the total number of units in the optimal solution is followed. This will produce the
optimal value. The next bow is the "Reduced Cost", which is really the increase in profit that would
need to happen if one were to begin producing that item, in other words the product, which is
currently is not produce becomes profitable to produce.
The next box over is the "allowable minimum" and "allowable maximum", which shows the allowable
change in the cost coefficients of that particular item that can happen and still the current the optimal
solution remains optimal. However, the optimal value may change if any cost coefficient is changed
but the optimal solution will stay the same if the change is within this range. Remember that these
results are valid for one-change-at-a-time only and may not be valid for simultaneous changes in cost
coefficients.
The next line is the optimal value, i.e., and the value of objective function evaluated at optimal
solution strategy. This line shows the maximum (or minimum) value that can be derived under the
given the optimal strategy.
The next line down contains the constraints; often C1, C2, etc. denote the constraints. Starting on the
left-hand side the first box contains the symbol C1 that represents the first constraint. The next box is
the constraint value. That is, the left-hand-side (LHS) of each C1 evaluated ate the optimal solution.
The next box over is the "direction box", which is either greater than or equal to / less than or equal to,
which are the direction of the each constraint. The next box is the right hand side value, which states
the value that is on the right hand side of each constraint.
The next box is the difference between RHS and LHS numerical values called the slack or surplus
box. If it is slack, it will have a less than or equal to sign associated with it, which means there is
leftover of resources/raw material. If there is a surplus it will have a greater than or equal to sign
associated with it, which means that there are over production. Next box over is the shadow price. If
any slack or surplus is not zero then its shadow price is zero, however the opposite statement may not
be correct. A shadow price is the additional dollar amount that will be earned if the right hand side
constraint is increased by one unit while remaining within the sensitivity limits for that RHS.
The next two boxes show the minimum and maximum allowable for the right hand side constraints.
The first box (minimum box) shows the minimum value that the RHS constraint can be moved to and
still have the same current shadow price. The second box shows the maximum number that the
constraint can be moved to and still have the same current shadow price. Recall that the shadow prices
are the solution to the dual problem. Therefore, the allowable change in the RHS suggest how far each
RHS can go-up or down while maintaining the same solution to the dual problem. In both cases the
optimal solution to the primal problem and the optimal value may change.
Shadow Price Might Have Wrong Sign
Some LP software packages do not obey strict duality for both maximization and minimization.
Therefore one has to take that into account adjust the signs accordingly. This can be done by changing
the RHS by small amount and finding the new optimal value, then using the
definition of shadow price as the rate of change in the optimal value with respect to the change in the
RHS.
For example, considering the following LP with a unique optimum solution:
Minimize 18X
1
+ 10X
2

Subject to:
12X
1
+ 10X
2
120000
10X
1
+ 15X
2
150000
X
1
, X
2
0
Running this problem by LINDO, the final report gives the shadow prices U
1
= -2.125, and U
2
= 0.75,
while the correct ones are U
1
= 2.125, and U
1
= - 0.75.
Another example:
Min 3X1 - 5x2
s.t.
2x1 + x2 40
x1 + 2x2 50
X
1
, X
2
0
end
Soling the problem by lindo, we get (X1 = 0, X2 = 25), with optimal value of -125, and shadow prices
(0. 2.5). The correct shadow prices are (0. -2.5).
Further Readings:
Arsham H., Foundation of Linear Programming: A Managerial Perspective From Solving System of Inequalities to Software
Implementation, International Journal of Strategic Decision Sciences, 3(3), 40-60, 2012.
Solving LP Problems by Excel
In solving an LP problem by the Solver module in the Excel, it is assumed that you have a good
working knowledge and familiarity with the Excel. The following is the steps for solving LP
problems:
1. Before you begin using Solver, you should first enter the problem's parameters.
2. Click Tools, then click Solver.
3. In the Set Target Cell box, enter the cell you want to maximize, minimize or set to a specific
value (Point to cell E18.) $E$18 should now appear in the box (Note: cell references should
always be absolute).
4. Click the Max option button to indicate that you want Solver to maximize the Total Profit.
5. In the By Changing Cells box, enter the cell or range of cells that Excel can change to arrive at
the solution (Highlight cells C15:D15).
6. Click the Subject to the Constraints box, then click the Add... button to add the constraints: For
exanple E17<=40 and E19<=50 and C15:D15>=C14:D14.
7. Click the OK button.
8. Click the Solve button.
9. Click the OK button.
Details: One can also us Excel to solve linear programming problems using the Solver tool. Before
we can use the solver tool, we need to set up our spreadsheet. One needs to include three different
things for solver to run:
1. Cells that contain values of the decision variables.
2. A cell which will contain the value of the objective function.
3. Cells which contain the value of all of the functional constraints in the problem.
Then we will construct a cell that contains the setup for the sample problem. Once the cells have been
setup, select solver under the Tools menu option (if Solver does not show up, go to addins but make
sure that the box marker solver has been selected. In the popup window you see the box labeled
Solver Parameters. In the box labeled Set Target Cell: select the cell which contains the value of the
objective function. If your problem is a maximization problem, be sure the button label Max has been
selected, otherewise select Min. This tells Excel that it is going to maximizes the value in the Target
Cell. In the box labeled "By Changing Cells" select the cells which contain the values of the decision
variables. These are the cells which Excel is going to change to maximize the Target Cell.
The only thing left to do is to setup the constraints for the problem. Click the Add button to include a
new constraint.
Let us begin by including the non-negativity constraints. Under Cell Reference select a cell which
contains a value of a decision variable. Next, select the option ">=" then in the constraint box type 0.
Select OK, you will now see the first non-negativity constraint included in the box labeled "Subject to
the Constraints". Repeat this process for all non-negativity constraints.
Let us turn to the functional constraints. Click the add button again. Now Under the cell reference,
select a cell which contains the value of one of the function constraints. Select the appropriate sign
and type in the desired value. Click Ok. Repeat this for all of the functional constraints.
Once you have finished inputting the constraints, simply hit the solve button. The next thing you
should see is another pop-up which tells you that Solver has found a solution. Simply hit OK. You
should also notice that optimal solution will be reported in the cells which store the value of the
decision rules, and the maximized value will be in the cell which contains the value of the objective
function.
Computer Implementations of Network Models: WinQSB Package
1. Prepare a network model for the problem. (Note: you don't have to have a formal model for the
data entry. You may modify it along with the process.)
2. Select the command New Problem to start a new problem. The program will display a form to
specify the problem. Click the problem type, objection function criterion, and the matrix form
for the data entry. Also enter the number of nodes and the problem name. Press OK button
when specification is done. A spreadsheet will appear for entering the network connection.
3. Enter the arc or connection parameter/coefficient on the spreadsheet (matrix). Here are some
tips:
4. If there is no connection between two nodes, you may leave the corresponding cell empty or
enter "M" for infinite cost.
5. Use Tab or arrow keys to navigate in the spreadsheet.
6. You may click or double click a data cell to select it. Double clicking the light blue entry area
above the spreadsheet will high-light the data entry.
7. Click the vertical or horizontal scroll bar, if it is shown, to scroll the spreadsheet.
8. (Optional) Use the commands from Edit Menu to change the problem name, node names,
problem type, objective function criterion, and to add or delete nodes. You may also change the
flow bounds from Edit Menu if the problem is a network flow problem.
9. (Optional) Use the commands from Format Menu to change the numeric format, font, color,
alignment, row heights, and column widths. You may also switch to the graphic model from the
Format Menu.
10. (Optional, but important) After the problem is entered, choose the command Save Problem As
to save the problem.
NonLinear Programming Implementations with the WinQSB
This program, NonLinear Programming (NLP), solves nonlinear objective functions with or without
constraints. Constraints may also be nonlinear. Specific capabilities include:
1. Solve the single and multiple variable unconstrained problems by line search method
2. Solve the constrained problems by penalty function method
3. Allow to analyze an assigned solution
4. Analyze constraint violation for the constrained problems
5. Perform the constraint function analysis with graph and table
6. Perform the objective function analysis with graph and table
7. Enter the objective function and/or constraints in algebraic functions
8. Enter the problem in spreadsheet format
To specify an NLP problem, here is the procedure:
1. Enter the problem title, which will be part of the heading for the later windows.
2. Enter the number of variables.
3. Enter the number of constraints. If you enter 0 constraint, the problem is an unconstrained
problem.
4. Click or choose the objective criterion of either maximization or minimization.
5. If the specification is complete, press the OK button for entering the problem model. Otherwise,
press the Cancel button. The Help button is for this help message.
Decision Analysis Implementation with the WinQSB Package
The Da.exe "Decision Analysis" module in your WinQSB package is used for two distinct purposes:
to solve large problems, and to perform numerical experimentation. Numerical experimentation
including what-if analysis of the payoff matrix and the subjective probability assignments to the states
of nature.
The following functions are available in the Da.exe module:
Bayesian Analysis: Select this option from the Problem Specification screen to input prior
probabilities and conditional probabilities (probability of an indicator value given a state of nature).
Then, press the 'solve' icon to obtain the posterior probabilities.
Decision Trees: You must draw the decision tree first to number all nodes, including the terminal
nodes. These numbers become the node IDs, when building the decision tree within the program.
When you are ready to enter the data, select the option 'Decision Tree Analysis' from the 'Problem
Specification' screen.
For each node, you will indicate the number of nodes immediately connected to it (type <node
number>,, <node number>).
Mistakes may be corrected by directly typing the changes into the proper cells.
Business Forecasting Implementation with the WinQSB
To enter a forecasting problem, here is the general procedure:
1. For a time series problem, prepare the historical data; for a linear regression problem, prepare
the data for multiple factors.
2. Select the command New Problem to specify the problem. Choose the appropriate problem type
and enter the scope of the data. See Problem Specification.
3. Enter the historical data (time series) or factor data (regression) on the spreadsheet. If it is a
regression problem, you may want to change the factor or variable name before entering the
data. Use the command Variable Name from the Edit Menu to change the variable names.
4. (Optional) Use the commands from Format to change the numeric format, font, color,
alignment, row heights, and column widths.
5. (Optional, but important) After the problem is entered, choose the command Save Problem As
to save the problem.
To perform forecasting for a time series data, here is the general procedure:
1. If the problem is not entered, use the procedure How to Enter a Problem to enter the problem.
2. For a general good practice, you may want to save the problem by choosing the command Save
Problem As before solving it.
3. Select the command Perform Forecasting. The program will bring up a form for setting up the
forecasting. See Perform Forecasting for detail.
4. After the forecasting is done, the result will be shown. You may choose the command Show
Forecasting in Graph from the Results Menu to display graphical result.
To show time series forecasting in graph, here is the general procedure:
1. Use the procedure How to Perform Time Series Forecasting to perform forecasting. Note that
you may specify to retain the previous forecasting result for comparison.
2. After the forecasting is done, the result will be shown. Choose the command Show Forecasting
in Graph from the Results Menu to display graphical result. Note that you may change the
graph range by using the command Change Range.
To perform a linear regression, here is the general procedure:
1. If the problem is not entered, use the procedure How to Enter a Problem to enter the problem.
2. For a general good practice, you may want to save the problem by choosing the command Save
Problem As before solve it.
3. Select the command Perform Linear Regression. The program will bring up a form for setting
up the regression. See Perform Linear Regression for selecting dependent and independent
variables.
4. After the regression is done, the summarized result will be shown. You may choose the
commands from the Results Menu to display other related result.
To perform estimation or prediction in linear regression, here is the general procedure:
1. Use the procedure How to Perform Linear Regression to perform regression.
2. After the regression is done, the result will be shown. Choose the command Perform Estimation
and Prediction. The program will bring up a form for specifying the significance level and
entering the values for independent variables. See Perform Estimation and Prediction for detail.
To show a regression line in linear regression, here is the general procedure:
1. Use the procedure How to Perform Linear Regression to perform regression.
2. After the regression is done, the result will be shown. Choose the command Show Regression
Line from the Results Menu. The program will bring up a form for specifying the x-axis
independent variable and entering the values for other independent variables. See Show
Regression Line for detail. Note that after the line is shown, you may change the graph range by
using the command Change Range.
Create a Graph/Chart From A Spreadsheet Data:
1. Select an area of data from the current spreadsheet. See Select Area for how to select a data
area.
2. Select the command Chart/Graph. The program creates a 3D column chart for the selected data.
3. Using the Gallery Menu, you can change to different types of charts.
4. Using the Data Menu, you can change to titles and data for the chart.
Create a Graph/Chart From Other Data:
1. Select the command Chart/Graph. The program creates a 3D column chart with random data.
2. Using the Gallery Menu, you can change to different types of charts.
3. Using the Data Menu, you can change to titles and data for the chart.
How to Import/Export Data from WinQSB to Other Applications
1. For input data select the copy the data from Word.Doc, block the data area in QSB and then
paste therein.
2. Save solution (or problem) as file.llp in WinQSB. Open file.llp, in directory, using Notepad.
Copy the text and paste it into Excel. Select the area and add grid in "Print Preview". Again,
select the area and paste it into Word.
3. Use "Print Screen" button on the keyboard. Paste it into Word.
II) Guideline from WinQSB's help menu
How to Export Data to Other Applications
You may export the LP-ILP problem data to other applications. The following two methods can
achieve the task.
Through Clipboard
1. Click the left-top cell of the LP-ILP problem (which selects the whole problem).
2. Choose the command Copy or its icon to copy the whole problem to the Clipboard.
3. Switch to the target application and use its Paste command to paste the problem to the target
application.
Through File
1. Choose the command Save Problem As or its icon to save the problem to a file.
2. Switch to the target application and open the saved data file with the text format.
III) Export NET (i.e. transportation) problems
You may export the NET problem data to other applications. The following two methods can achieve
the task.
Through Clipboard
1. Click the left-top cell of the NET problem (which selects the whole problem).
2. Choose the command Copy or its icon to copy the whole problem to the Clipboard.
3. Switch to the target application and use its Paste command to paste the problem to the target
application.
Through File
1. Choose the command Save Problem As or its icon to save the problem to a file.
2. Switch to the target application and open the saved data file with the text format.
More on Decision Analysis
Run the program module for "Decision Analysis" of WinQSB. Select "New problem" from the pull
down menu of "File" in the menu bar.
Change the name of decisions and state of the nature to fit this problem. You can do so by selecting
appropriate options ("State of the Nature Name", and "Decision Alternative Name") of the pull down
menu of "Edit" in the menu bar. Then enter the problem data. Save the problem.
Select the "Solve and Analysis" option in the menu bar. A window will appear, accept all the default
selections, and then click on OK. The software will solve the problem and provides a summary of all
decisions made using different criterion.
You can select three more options from the pull down menu of "Results" in the menu bar. These
selections will provide you with details of payoff analysis using different criteria (Display 4), regret
table calculations, and a decision tree graph. Notice that if you select decision tree, a window
(Decision Tree Setup) will appear that provides you options for how you would like the tree to look
like (Display 6). Make sure you play around with it for different configurations, then you can print it
out.
Draw the decision tree to match the requirements for WinQSB. Notice the triangles are used to
indicate an end point.
Run the program module for "Decision Analysis" of WinQSB. Select "New problem" from the pull
down menu of "File" in the menu bar.
Change the name of nodes to fit this problem. You can do so by selecting each cell and typing in.
Then enter the problem data. Save the problem.
Select the "Solve and Analysis" option in the menu bar. The software will solve the problem and
provides a detailed solution.
You can select one more options, decision tree graph, from the pull down menu of "Results" in the
menu bar. Notice that if you select decision tree, a window (Decision Tree Setup) will appear that
provides you options for how you would like the tree to look like. Make sure you play around with it
for different configurations.
Queuing Analysis
To perform analysis of a queuing system, select the "Queuing Analysis" option of the WinQSB. You
may follow the steps below to input data for each queuing system. Here, entering the cost information
is not discussed. As output you can obtain a table that summarizes the system performance and
another table that lists the probability of having different number of people in the system.
M/M/1/GD/inf/inf:
Select "New Problem" from the pull down menu of "File" in menu bar. Select "M/M System". Enter
information on number of server (1), service rate, and arrival rate.
D/D/1:
Select "New Problem" from the pull down menu of "File" in menu bar. Select radio button for
"General Queuing System" then click on "OK". Type in 1 for "Number of servers". Double click on
"service time distribution". Click on "Constant" and click on "OK". Type in a value for average
service time (not service rate) for "Constant value". Similarly, select constant for "interarrival time
distribution" and enter a value.
M/M/1/GD/C/inf:
Similar to M/M/1, you just type in the value of "queue capacity", C-1, to replace for "M".
M/M/S/GD/inf/inf:
Similar to M/M/1, you just type in the value for number of server (S).
M/M/R/GD/K/K:
Similar to M/M/1, you will type in the value of "R" for "Number of servers", the value of "K-R" for
"Queue capacity", and the value of "K" for "Customer population" (to replace for "M").
Microsoft Excel Add-Ins
Forecasting with regression requires the Excel add-in called "Analysis ToolPak," and linear
programming requires the Excel add-in called "Solver." How you check to see if these are activated
on your computer, and how to activate them if they are not active, varies with Excel version. Here are
instructions for the most common versions. If Excel will not let you activate Data Analysis and
Solver, you must use a different computer.
Excel 2002/2003:
Start Excel, then click Tools and look for Data Analysis and for Solver. If both are there, press Esc
(escape) and continue with the respective assignment. Otherwise click Tools, Add-Ins, and check the
boxes for Analysis ToolPak and for Solver, then click OK. Click Tools again, and both tools should
be there.
Excel 2007:
Start Excel 2007 and click the Data tab at the top. Look to see if Data Analysis and Solver show in
the Analysis section at the far right. If both are there, continue with the respective assignment.
Otherwise, do the following steps exactly as indicated:
-click the Office Button at top left
-click the Excel Options button near the bottom of the resulting window
-click the Add-ins button on the left of the next screen
-near the bottom at Manage Excel Add-ins, click Go
-check the boxes for Analysis ToolPak and Solver Add-in if they are not already checked, then click
OK
-click the Data tab as above and verify that the add-ins show.
Excel 2010:
Start Excel 2010 and click the Data tab at the top. Look to see if Data Analysis and Solver show in
the Analysis section at the far right. If both are there, continue with the respective assignment.
Otherwise, do the following steps exactly as indicated:
-click the File tab at top left
-click the Options button near the bottom of the left side
-click the Add-ins button near the bottom left of the next screen
-near the bottom at Manage Excel Add-ins, click Go
-check the boxes for Analysis ToolPak and Solver Add-in if they are not already checked, then click
OK
-click the Data tab as above and verify that the add-ins show.
Solving Linear Programs by Excel
Some of these examples can be modified for other types problems
1. Excel Add-Ins
2. Excel LP Solver
3. Excel Tutorial (Recommended)
4. Carpenter I
5. Carpenter II
6. Carpenter III
7. Wilson Problem I
8. Wilson Problem II
9. Wilson Sensitivity
10. Wilson Formulation
11. Wilson Problem with New Product
12. LP: Non-Standard-Form
13. Shadow Prices
14. Shadow Prices 3-Constraint
15. Degenerate LP
The Copyright Statement: The fair use, according to the 1996 Fair Use Guidelines for Educational
Multimedia, of materials presented on this Web site is permitted for non-commercial and classroom
purposes only.
This site may be mirrored intact (including these notices), on any server with public access, and linked
to other Web pages. All files are available at http://home.ubalt.edu/ntsbarsh/Business-stat for
mirroring.
Kindly e-mail me your comments, suggestions, and concerns. Thank you.
Professor Hossein Arsham
This site was launched on 2/25/1994, and its intellectual materials have been thoroughly revised on a
yearly basis. The current version is the 8
th
Edition. All external links are checked once a month.
Back to:
Dr Arsham's Home Page
EOF: 1994-2015.

You might also like