I am trying to define both upper and lower bounds for a vector of variables in AMPL (solver Gurobi). However, after solving to optimal solution, the variables violate the bounds. The only way these bounds work is defined as explicit constraint in AMPL through the 'subject to' clause. Any idea why AMPL doesn't accept the bounds defined in the first way?
The first way:
var pi{t in 1..T} >= lb_pi[t] <= ub_pi[t];
The explicit way:
subject to C_pi_low{t in 1..T}:
pi[t] >= lb_pi[t];
subject to C_pi_up{t in 1..T}:
pi[t] <= ub_pi[t];
expand pi;
? $\endgroup$