Enabling sensitivity in cplex

I have used this for many years in my teaching, for sensitivity analyses for my students. However, now when running ampl, it gives me an error message. Any clue to what’s (not) going on? Especially I am interested in the up, down, and current (dual & slack works without the “sensitivity” option), as mentioned in “the AMPL-book” ch.14.3.

CPLEX 22.1.1: Unknown option or invalid key “sensitivity”

Command/Run-file as:
reset;
option solver cplex;
option cplex_options ‘sensitivity’;
option presolve 0;
model 2.mod;
data 2.dat;
solve;
display z;
display x;
display constr.slack, constr.dual;
display constr.down, constr.current, constr.up;

The default distribution of CPLEX for AMPL was recently switched to the new “MP” solver interface library, but it appears that the new library is not properly recognizing some single-word options — including sensitivity.

This will be fixed soon, but for now, you can switch back to the older “ASL” library by specifying

option solver cplexasl;

(This works because both the new cplex and old cplexasl binaries are included in our distributions.)

Perfect, worked fine! :slight_smile: