Ask Your Question

# sage.numerical.optimize.minimize_constrained versus fmincon

Matlab has this function: http://www.mathworks.com/help/toolbox...

And as far as I can tell, Sage's closest equivalent is this: http://www.sagemath.org/doc/reference...

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?

Thanks.

edit retag close merge delete

## 1 Answer

Sort by ยป oldest newest most voted

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.

more

## Comments

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

( 2011-10-12 11:06:28 +0200 )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?

( 2011-10-12 11:08:40 +0200 )edit

It seems that someone is already using this, although I have to read more closely to see how it's done: http://www.sagenb.org/home/pub/1224/

( 2011-10-12 11:11:44 +0200 )edit

## Your Answer

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

Add Answer

## Stats

Asked: 2011-10-11 13:08:11 +0200

Seen: 1,357 times

Last updated: Oct 11 '11