# sage.numerical.optimize.minimize_constrained versus fmincon

 1 Matlab has this function: http://www.mathworks.com/help/toolbox/optim/ug/fmincon.html And as far as I can tell, Sage's closest equivalent is this: http://www.sagemath.org/doc/reference/sage/numerical/optimize.html#sage.numerical.optimize.minimize_constrained 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. asked Oct 11 '11 Reinderien 11 ● 1 ● 3

 1 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. posted Oct 11 '11 niles 3605 ● 7 ● 45 ● 101 http://nilesjohnson.net/ It seems that scipy.optimize.fmin_slsqp is a good candidate.Reinderien (Oct 12 '11)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 (Oct 12 '11)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/Reinderien (Oct 12 '11)

[hide preview]