Problems with ranges of shadow cost

Hello, I have been trying to find the ranges in which the dual prices (shadow prices) are valid. According to the official AMPL manual, the command [constraint].dual; can be used, and it works fine. The problem arises when using the command [constraint].up; or [constraint].down;, as I get the following message:

Bad suffix .up for x1

My .run file:

reset;

model windor.mod;
data windor.dat;

option cplex_options "sensitivity";
option presolve 0;
option solver cplex;

solve;

display z, x;
display r.dual;
#display x.rc;
display r.down, r.up;

How can I solve this? What am I doing wrong?

Thanks.

When CPLEX was switched to our new solver interface library, the sensitivity option and suffixes were changed for consistency with other solvers.

To use the old option and suffixes, set option solver cplexasl; instead of option solver cplex;. This will revert to the older interface library (which does not have all features of the new library, but has all features described in the AMPL book).

If you want to stay with option solver cplex; then here are the new sensitivity option and suffixes from the CPLEX options page:

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 coefficients
      .sensobj = current objective coefficients
      .sensobjhi = greatest objective coefficients
      .senslblo = smallest variable lower bounds
      .senslbhi = greatest variable lower bounds
      .sensublo = smallest variable upper bounds
      .sensubhi = greatest variable upper bounds;

      suffixes for all constraints are

      .senslblo = smallest constraint lower bounds
      .senslbhi = greatest constraint lower bounds
      .sensublo = smallest constraint upper bounds
      .sensubhi = greatest constraint upper bounds;

      suffixes for one-sided constraints only:

      .sensrhslo = smallest right-hand side values
      .sensrhshi = greatest right-hand side values.

      The suffixes correspond to the AMPL solver model, command 'solexpand'.
      For easiest interpretation, disable AMPL presolve, 'option presolve 0;'

Note that you need to specify sensitivity=1 to get these sensitivity values.

Thank you for the response. It was very useful.

One doubt more, I wonder if you know what is the meaning of the suffixes?, for example in I suppose that is , the last is but the ?

Best regards,

I think part of your message has not come through properly:

for example in I suppose that is , the last is but the ?

Please explain which suffix (or suffixes) you want an explanation for.

You are right, let me please give the complete sentence.

One doubt more, I wonder if you know what is the meaning of the suffixes?, for example in sensublo I suppose that sens is sensitivity, the last lo is lower bound but what is the ub?

Thank you in advance.

You can consider that each constraint in a linear program is of the form

lb <= body <= ub

where lb and ub are constant values computed from the data, and body is a linear expression involving the variables. When the linear program is solved, the solver can return an optimal basis (which determines the optimal solution).

If you change ub by not too much, then then same basis will be optimal (though it might give a different optimal solution). Suffixes sensublo and sensubhi are the lowest and highest values of ub for which the same basis is optimal.

Most constraints have either lb = -Infinity or ub = +Infinity, so that they can also be considered to have the form

body <= rhs

or

body >= rhs

where rhs is a constant. In that case, you can instead use suffixes .sensrhslo and .sensrhshi, which are the lowest and highest values of rhs for which the same basis is optimal.

Variables also have lower and upper bounds, so suffixes .sensublo and .sensubhi also make sense when applied to a variable.

(Note that all sensitivity results assume that only one constant is changed, while the rest of the linear program stays the same.)