Ask Your Question

sage.numerical.optimize.minimize_constrained versus fmincon

asked 2011-10-11 06:08:11 -0600

Reinderien gravatar image

Matlab has this function:

And as far as I can tell, Sage's closest equivalent is this:

I use the inequality feature of fmincon. I think that the cons lambdas can achieve the same thing, although: will the performance worsen? Since fmincon can run an interior-point method with knowledge of the boundary, will the convergence be better there than with minimize_constrained? Is there some implementation of an interior-point method that I'm not seeing in Sage?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-10-11 15:43:31 -0600

niles gravatar image

When you browse the source, you can see exactly what algorithm is being used--perhaps this can help answer some of your performance questions? For minimize_constrained, Sage calls the multivariate constrained optimization functions from scipy.optimize: either fmin_tnc (truncated Newton's method) or fmin_cobyla (Constrained Optimization BY Linear) or, if requested, fmin_l_bfgs_b (L-BFGS-B algorithm).

If there are any other optimization methods, I would expect them to be in this same source file. Also, you might find some of the other functionality of scipy.optimize useful; in that case, the source here could be a template for how to use it.

edit flag offensive delete link more


It seems that `scipy.optimize.fmin_slsqp` is a good candidate.

Reinderien gravatar imageReinderien ( 2011-10-12 04:06:28 -0600 )edit

I don't see the SLSQP algorithm in that file. Is there a place where I could request that there be a Sage wrapper added for this function?

Reinderien gravatar imageReinderien ( 2011-10-12 04:08:40 -0600 )edit

It seems that someone is already using this, although I have to read more closely to see how it's done:

Reinderien gravatar imageReinderien ( 2011-10-12 04:11:44 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2011-10-11 06:08:11 -0600

Seen: 1,330 times

Last updated: Oct 11 '11