convexengineering / gpkit

Geometric programming for engineers
http://gpkit.readthedocs.org
MIT License
206 stars 40 forks source link

fmincon generator #602

Closed whoburg closed 8 years ago

whoburg commented 8 years ago

high priority. would like a way to do experiments comparing GP solve time to blindly running matlab's fmincon on the same model (without log transformation).

http://www.mathworks.com/help/optim/ug/fmincon.html

the gpkit/Python side should be easy -- just dump out the problem parameters (A, c, map) to a text file in a defined format. (mosek_cli format, perhaps?)

Then, just need to implement the nonlinear functions c(x) <= 0representing posynomial inequality constraints and ceq(x) = 0 representing monomial equality constraints in MATLAB. Gradients should be included for a fair comparison.

@mayork, want to take a shot at this? get @bqpd's help with defining the format for passing the problem data.

whoburg commented 8 years ago

@bqpd, any thoughts on the best approach for this? I think it should be straightforward but your input would be helpful.

bqpd commented 8 years ago

We could write it to a tsv/csv for easy matlab reading? I don't know enough matlab to know if .eo files will be hard to read.

whoburg commented 8 years ago

csv is easy -- maybe we just write out A.csv, cs.csv, and map.csv, and assemble those into posynomial functions in MATLAB.

pgkirsch commented 8 years ago

This is a work in process on the fmincon branch. Current approach is to generate all of the necessary .m files to run fmincon directly in matlab.

pgkirsch commented 8 years ago

Closed by #623