Solver|Range


 

Use the Range command to generate a range report for the model in the active window. A range report shows over what ranges you can: 1) change a coefficient in the objective without causing any of the optimal values of the decision variables to change, or 2) change a row's constant term (also referred to as the right-hand side coefficient) without causing any of the optimal values of the dual prices or reduced costs to change.

Note:The solver computes range values when you solve a model. Range computations must be enabled in order for the solver to compute range values. Range computations are not enabled by default. To enable range computations, run the Solver|Options command, select the General Solver Tab, and, in the Dual Computations list box, choose the Prices and Ranges option. Range computations can take a fair amount of computation time, so, if speed is a concern, you don’t want to enable range computations unnecessarily.
Note:The example model below, when solved, yields the range report that follows.

[OBJECTIVE] MAX = 20 * A + 30 * C;

[ALIM]      A <= 60;

[CLIM]      C <= 50;

[JOINT]     A + 2 * C  <= 120;

Here is the range report:

Ranges in which the basis is unchanged:

 

               Objective Coefficient Ranges

             Current    Allowable    Allowable

Variable  Coefficient     Increase     Decrease

      A     20.00000     INFINITY     5.000000

      C     30.00000     10.00000     30.00000

 

                  Righthand Side Ranges

    Row      Current    Allowable    Allowable

                 RHS     Increase     Decrease

   ALIM     60.00000     60.00000     40.00000

   CLIM     50.00000     INFINITY     20.00000

  JOINT     120.0000     40.00000     60.00000

The first section of the report is titled Objective Coefficient Ranges. In the first column, titled Variable, all the optimizable variables are listed by name. The next column, titled Current Coefficient, lists the current coefficient of the variable in the objective row. The next column, Allowable Increase, tells us the amount that we could increase the objective coefficient without changing the optimal values for the variables. The final column, Allowable Decrease, lists the amount that the objective coefficient of the variable could decrease before the optimal values of the variables would change. Information on the allowable increases and decreases on objective coefficients can be useful when you need answers to questions like, "How much more (less) profitable must this activity be before we should be willing to do more (less) of it?".

Referring to the Objective Coefficient Ranges report for our example, we can say, as long as the objective coefficient of A is greater-than-or-equal-to 15, the optimal values of the variables will not change. The same may be said for the objective coefficient of variable C, as long as it falls within the range of [0,40].

Note:Ranges are valid only if you are planning to alter a single objective or right-hand side coefficient. The range information provided by LINGO cannot be applied in situations where one is simultaneously varying two or more coefficients. Furthermore, ranges are only lower bounds on the amount of change required in a coefficient to actually force a change in the optimal solution. You can change a coefficient by any amount up to the amount that is indicated in the range report without causing a change in the optimal solution. Whether the optimal solution will actually change if you exceed the allowable limit is not certain.

The second section of the range report is titled Right-hand Side Ranges. The first column, Row, lists the names of all the optimizable rows, or constraints, in the model. The second column, Current RHS, gives the constant term, or right-hand side value, for the row. The next two columns, Allowable Increase and Allowable Decrease, tell us how far we can either increase or decrease the right-hand side coefficient of the row without causing a change in the optimal values of the dual prices or reduced costs. If you recall, the dual prices on rows are, effectively, shadow prices that tell us at what price we should be willing to buy (or sell) our resources for. The dual prices do not, however, tell us what quantity we should be willing to buy (or sell) at the dual price. This information is obtained from the allowable increases and decreases on the right-hand side coefficients for the row. So, for our example, the dual prices and reduced costs will remain constant as long as the right-hand side of row ALIM falls within the range [20,120], the right-hand side of CLIM is greater-than-or-equal-to 30, and the right-hand side of JOINT is in [60,160].

Note: We preceded all the constraints in our model with a name enclosed in square brackets. This is an important practice if you wish to generate range reports. If you do not name your constraints, LINGO assigns them a name that corresponds to the internal index of the constraint. This internal index will not always correspond to the order of the constraint in the text of the original model. So, to make the Right-hand Side Ranges section of range reports meaningful, be sure to name all your constraints. (See the section Constraint Names for details on assigning constraint names.)
Note: If a variable is nonlinear in the objective, its value in the Current Coefficient column will be displayed as NONLINEAR. Similarly, if a row is nonlinear, the value in the Current RHS column will be displayed as NONLINEAR.

Coefficients that can be increased or decreased indefinitely will display a range of INFINITY.

Fixed variables are substituted out of a model and will not appear in a range report. Rows that contain only fixed variables are also substituted out of models and will also not appear in range reports. As an example, suppose we changed the following inequality in our sample model from:

[ALIM]      A <= 60;

to the equality:

[ALIM]      A = 60;

LINGO can now solve directly for the value of A. The variable A is considered fixed, as is the row ALIM (since it contains no optimizable variables.) Given this, the variable A will no longer appear in the Objective Coefficient Ranges section of the range report and the row ALIM will not appear in the Right-hand Side Ranges section. We can verify this by examining the updated range report:

Ranges in which the basis is unchanged:

 

               Objective Coefficient Ranges

             Current    Allowable    Allowable

Variable  Coefficient     Increase     Decrease

      C     30.00000     INFINITY     30.00000

 

                  Righthand Side Ranges

    Row      Current    Allowable    Allowable

                 RHS     Increase     Decrease

   CLIM     50.00000     INFINITY     20.00000

  JOINT     60.00000     40.00000     60.00000

Note: LINGO maintains the range report for only one model in memory. This is the report for the window that you last issued the Solver|Solve command for. If you try to issue the Range command for a window that LINGO does not currently have range information for, you will receive an error message. If you plan to work with two or more models that take a long time to solve, be sure to save copies of your range reports to disk, so you can refer to them later without having to re-solve your models.
Note:The barrier crossover option must be enabled if you plan to do range analysis.  Range computations cannot be performed if the final solution is not a basic solution.