[SciPy-User] Flaws in the cobyla routine

Robaula helmrp@yahoo....
Tue Sep 25 20:55:49 CDT 2012

I consider the following to be flaws (not bugs) in the cobyla, or "constrained optimization by (successive) linear approximation" routine.

1. The routine returns only the optimal argument value. No description of the status at the end of the run, such as would be provided by the "Results" class are included. Consequently the user receives no information on the trustworthiness of the returned value.

2. Although "disp" and "iprint" are among the options in cobyla's calling signature, assigning different values to them has absolutely no effect on the output.

3. The docstring's Examples section mentions several values that would be included in the "Results", but with no indication of where they come from or how the users could get at them.

4. The cobyla routine calls the _minimize_cobyla routine, which prepares and returns the "Results" class information. This includes: the optimal value of the argument, the status at end, the success flag value, a message expressing the success flag in English, the optimal value of the function, and the maximum constraint violation. Then the cobyla routine "throws away" all but the first of these values. That occurs because after the cobyla routine receives the "Results" dictionary of values from _minimize_cobyla, it returns, in effect, "Results['x']", i.e., just the "Results" dictionary entry for key 'x'.  This is done in line 165 of the cobyla routine.

Recommend revision to correct these flaws. While doing that, consider the following remarks.

In addition to reporting the maximum constraint violation, it would be helpful to also report which constraint(s) caused the maximum constraint violation. It would also be useful to report which constraints were "tight" and which were "loose."

Bob & Paula H

More information about the SciPy-User mailing list