73-75. LNRISE, LNBIGM, LNDLTA

The LNRISE, LNBIGM, and LNDLTA parameters control the linearization option in LINGO. Many nonlinear operations can be replaced by linear operations that are mathematically equivalent. The ultimate goal is to replace all the nonlinear operations in a model with equivalent linear ones, thereby allowing use of the faster and more robust linear solvers. We refer to this process as linearization.

The LNRISE parameter determines the extent to which LINGO will attempt to linearize models. The available options are:

LNRISE Setting

Linearization Level

0

Solver Decides

1

None

2

Math

3

Math and Logic

Under the None option, no linearization occurs. With the Math option, LINGO linearizes the mathematical functions: @ABS(), @MAX(), @MIN(), @SMAX(), and @SMIN() along with any products of binary and continuous variables. The Math and Logicoption is equivalent to the Math option, plus LINGO will linearize all logical operators (#LT#, #LE#, #EQ#, #GT#, #GE#, and #NE#). Under the Solver Decides option, LINGO will do maximum linearization if the number of variables doesn’t exceed 12. Otherwise, LINGO will not perform any linearization. LINGO defaults to the Solver Decides setting.

The LNDLTA parameter controls the Delta Coefficient, which is a tolerance indicating how closely you want the additional constraints added as part of linearization to be satisfied. Most models won’t require any changes to this parameter. However, some numerically challenging formulations may benefit from increasing Delta slightly. LINGO defaults to a Delta of 1.e-6.

When LINGO linearizes a model, it adds forcing constraints to the mathematical program generated to optimize your model. These forcing constraints are of the form:

f( x) My

where M is the BigM Coefficient and y is a 0/1 variable. The idea is that, if some activity in the variables is occurring, then the forcing constraint will drive y to take on the value of 1. Given this, if we set the BigM value to be too small, we may end up with an infeasible model. Therefore, the astute reader might conclude that it would be smart to make BigM quite large, thereby minimizing the chance of an infeasible model. Unfortunately, setting BigM to a large number can lead to numerical stability problems in the solver resulting in infeasible or sub-optimal solutions. So, getting a good value for the BigM Coefficient may take some experimentation. The default value for BigM is 100,000.

As an example of linearization, consider the following model:

model:

sets:

  projects: baths, sqft, beds, cost, est;

endsets

data:

projects, beds, baths,  sqft,         cost =

p1          5     4     6200        559608        

p2          2     1      820        151826        

p3          1     1      710        125943

p4          4     3     4300        420801        

p5          4     2     3800        374751

p6          3     1     2200        251674

p7          3     2     3400        332426        

;

enddata

min = @max( projects: @abs( cost - est));

@for( projects:

est = a0 + a1 * beds + a2 * baths + a3 * sqft

);

end

Model: COSTING

This model estimates the cost of home construction jobs based on historical data on the number of bedrooms, bathrooms, and square footage. The objective minimizes the maximum error over the sample project set. Both the @MAX() and @ABS() functions in the objective are non-smooth nonlinear functions, and, as a result, can present problems for LINGO’s default, local search NLP solver. Running the model under the default settings with linearization disabled, we get the following result:

  Local optimal solution found at step:             91

  Objective value:                            3997.347

        Variable           Value        Reduced Cost

              A0        37441.55            0.000000

              A1        27234.51            0.000000

              A2        23416.53            0.000000

              A3        47.77956            0.000000

Enabling linearization and re-optimizing yields the substantially better solution:

  Global optimal solution found at step:           186

  Objective value:                            1426.660

        Variable           Value        Reduced Cost

              A0        46814.64            0.000000

              A1        22824.18            0.000000

              A2        16717.33            0.000000

              A3        53.74674            0.000000

Note that the maximum error has been reduced from 3,997 to 1,426!

Linearization will substantially increase the size of your model. The sample model above, in un-linearized form, has a mere 8 rows and 11 continuous variables. On the other hand, the linearized version has 51 rows, 33 continuous variables, and 14 binary variables! Although linearization will cause your model to grow in size, you will tend to get much better solution results if the model can be converted entirely to an equivalent linear form.

Note:Linearization will be of most use when a nonlinear model can be 100% linearized. If LINGO can only linearize a portion of your model, then you may actually end up with a more difficult nonlinear model.

The linearization option is set to Solver Decides by default.