The amount that a constraint or variable violates its bounds is represented in AMPL by the name of the constraint or variable with .slack after it. So for example to look for violation in constraint Bal[i,j] you should examine the value of Bal[i,j].slack. The greatest violation over all variables and constraints is given by
display (min {i in 1.._ncons: _con[i].slack < 0} _con[i].slack);
display (min {j in 1.._nvars: _var[j].slack < 0} _var[j].slack);
Similarly append .dual to constraint names to see the dual variables, and .rc to variables to the see the dual constraint slacks ("reduced costs" in LP terminology).
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of erimk...@gmail.com
Sent: Thursday, January 2, 2014 12:43 PM
To: am...@googlegroups.com
Subject: [AMPL 7829] ampl with ipopt constraint violation / infeasibility detection