You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Differences between CPLEX's sensitivity option in ASL and MP #249
When the CPLEX option .sensitivity is set in ASL, three suffixes are defined:
sensitivity Single-word phrase: return sensitivity information for
the objective (in suffixes .up for the largest value
of a variable's cost coefficient or constraint's
right-hand side before the optimal basis changes,
.down for the smallest such value, and .current for
the current cost coefficient or right-hand side).
In MP, the option is sensitivity=1 and more cases are considered:
alg:sens (sens, solnsens, sensitivity)
Whether to return suffixes for solution sensitivities, i.e., ranges of
values for which the optimal basis remains optimal (note that the
variable and objective values can change):
0 - No (default)
1 - Yes: suffixes returned on variables are
.sensobjlo = smallest objective coefficient
.sensobjhi = greatest objective coefficient
.senslblo = smallest variable lower bound
.senslbhi = greatest variable lower bound
.sensublo = smallest variable upper bound
.sensubhi = greatest variable upper bound;
suffixes for all constraints are
.senslblo = smallest constraint lower bound
.senslbhi = greatest constraint lower bound
.sensublo = smallest constraint upper bound
.sensubhi = greatest constraint upper bound;
suffixes for one-sided constraints only:
.sensrhslo = smallest right-hand side value
.sensrhshi = greatest right-hand side value.
This is arguably all for the best, but a user's questions raise two issues:
The single-word option sensitivity (which turns sensitivity on in ASL) is accepted by MP but is interpreted as alg:sens=0 (which turns it off).
There is no option in MP analogous to .current in ASL. This is mainly a problem for objective coefficients, whose current value is (in general) not easy to display any other way.
Maybe there's nothing that can be done about these differences, but I am posting them here just in case.
Fixed option value parsing - in fact, it did neither check if numerical values were in correct format.
Added suffix .sensobj with current objective coefficients, for Gurobi, Mosek, and CPLEX - our 3 solvers supportiing option alg:sens.
Also had a go at implementing suffixes .sens(lb/ub/rhs) for current values of var/con bounds, but they interfere with AMPL presolve, thus not very useful, moreover we have .lb/.ub. So I left them out.
Activity
Fix parsing wrong or missing option value #249
sens=1 suffix .sensobj #249
glebbelov commentedon Jan 20, 2025
Thank you @4er4er4er.
Fixed option value parsing - in fact, it did neither check if numerical values were in correct format.
Added suffix
.sensobjwith current objective coefficients, for Gurobi, Mosek, and CPLEX - our 3 solvers supportiing optionalg:sens.Also had a go at implementing suffixes
.sens(lb/ub/rhs)for current values of var/con bounds, but they interfere with AMPL presolve, thus not very useful, moreover we have.lb/.ub. So I left them out.Let me know if any comments.
sens=1: hint to disable AMPL presolve #249
Robust redef context #249
4er4er4er commentedon Jan 26, 2025
That looks good.