The Rose solver applies special handling for certain large and small values to mitigate numerical instability, enhancing both robustness and performance. This approach simplifies the formulation of constraints and objectives, particularly when large coefficients represent unbounded or extremely large conditions. By treating such values as effectively infinite, the solver focuses on the core elements of the problem without being burdened by the complexities of managing extremely large numbers, thereby improving overall computational efficiency.
If your model requires very large or very small numbers, consider scaling it. This means multiplying or dividing all of your coefficients by a consistent factor to bring them into a more manageable range.
Below are the specific ranges that Rose treats with special handling when these values are on the right-hand side of the constraint. The right-hand side of the constraint meaning these values are not multiplied by any decision variables.
- Numbers greater than or equal to 1e20 are treated as positive infinity.
- Numbers less than or equal to -1e20 are treated as as negative infinity.
- Numbers greater than or equal to -1e-10 and less than or equal to 1e-10 are treated as zero.
For example, consider the following optimization model.
max x
such that
x < 1e20
In this case, the solver treats the right-hand side of the constraint (1e20) as positive infinity. As a result, the constraint is effectively ignored, and \(x\) can take on any value. Thus, this trivial model becomes unconstrained, or unbounded.
Rose may not be able to solve models when the coefficients in the objective function are outside of these bounds. Such coefficients may cause the solver to stop parsing the input file.
- 1e20 or larger
- -1e20 or smaller
Rose cannot solve models when the coefficients on the left-hand side of the constraint, meaning multiplied by any decision variables, are outside of these bounds. Such coefficients cause the solver to stop parsing the input file.
- 1e15 or larger
- -1e15 or smaller
Comments
0 comments
Please sign in to leave a comment.