An AMPL param defines data that are assigned values before solving. When you write
param c integer in 1..C_Max;
param r integer in 1..R_Max;
then AMPL checks that c
and r
are assigned integer values, and gives an error message if you try to assign them fractional values. If you want fractional values to be accepted for these params, you can drop integer
from the above definitions. However, since your loop begins
for {cval in 2..C_Max, rval in 1..R_Max} {
let c := cval;
let r := rval;
the values of c
and r
will always integers in your script.
The concept of relaxing integrality makes a lot more sense for variables (defined in var
statements). Relaxing integrality of a variable means that the solver is allowed to give it a fractional value in the optimal solution. Do you want to relax the integrality of some of the integer variables in your model?