Search code examples
mathematical-optimizationcplexampl

why AMPL can't solve the optimization failure


I have a problem that I don't know how to solve. In my AMPL model, 1B12 is an item that belongs to a Set.

And when I try to solve the problem by AMPL + cplex, the AMPL command show

presolve, constraint production['1B12']:
no variables, but lower bound = 12792, upper = 12792

And the AMPL doesn't give me the optimal value I want. I am new to AMPL and can't know what the sentence meaning, especially the sentence

no variables, but lower bound = 12792, upper = 12792

And in fact, I checked that 1B12 is in my set when I load the data, thus I am confused why AMPL says no variables

I hope someone can help me solve this problem. Thanks!


Solution

  • AMPL is reporting that the specific row (constraint) has no variables in the left hand side, after it runs its presolve algorithms. So the constraint becomes

    0 = 12792
    

    It isn't saying that you have no variables in your model. You might even have variables in that constraint, but presolve figured out what their values must be in any feasible solution and replaced them with those values.