As of the Optimization Toolbox 2.3 (R13+), the active constraint indices correspond to the original constraints supplied by the user (instead of showing the indices that the code uses internally), and prints them separately under lower, upper, ineqlin and ineqnonlin headers. This helps to clarify the ordering. If you are using a previous version, read the following:
Here is the ordering used for constraints in FMINCON:
linear equalities
nonlinear equalities
lower bounds
upper bounds
linear inequalities
nonlinear inequalities
One way to remember it is that equalities must come before inequalities, and within those two groups it goes from "simplest" to "hardest" (bounds, linear, nonlinear). This assumes none of your constraints were dependent; dependent constraints are removed during the preprocessing of the problem and will offset the numbering of your constraints by the number of dependent constraints removed.
Two other ways to determine which constraints are active are to check the Lagrange multipliers specified in the LAMBDA output parameter of FMINCON or to simply evaluate the constraints at the point returned by FMINCON.
Best Answer