fmin_cobyla changes?



 I was discussing some things about fmin_cobyla with David Billinghurst,
but I think perhaps it's better suited to the mailing list.

David wrote the documentation for fmin_cobyla (Thanks!) and mentioned
that the equality constraint h(x) = 0 can be used with fmin_cobyla by
adding the inequality constraints h(x) >= 0 and -h(x) >= 0, which
fmin_coblya can handle.

While the user can easily do this himself, I thought it would be nice if
fmin_cobyla did this.  It's not very hard.  Also, the inequality
constraints are optional, so it would be nice to make that parameter
optional too.

So, I propose fmin_coblya be changed from

fmin_cobyla(f, vars, constraints, initx[, rhobeg, rhoend, iprint, maxfun])

to

fmin_cobyla(f, vars, initx[, ineq, eq, rhobeg, rhoend, iprint, maxfun])

That is, the constraints parameter is now longer required and becomes
the ineq keyword parameter, and add the eq keyword parameter.

The output is also slightly changed.  fmin_cobyla returns the value of
each constraint.  With equality constraints, fmin_cobyla appends the
value of each equality constraint to the list of contraint values. 
(Perhaps this should be made a bit clearer with two lists returned:  the
values of the inequality constraints and the values of the equality
constraints.)

Ray