convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

Mixed-integer GP example #8

Open bqpd opened 8 years ago

bqpd commented 8 years ago

(@whoburg): Some colleagues are working on a new solver which is capable of handling MIDCP (mixed-integer disciplined convex, a la CVX) problems. Through the magic of the exponential cone, this means that they could also handle mixed-integer geometric programming problems.

Would be great to come up with some mixed-integer GP examples we're interested in solving, and have GPkit dump out the solver-format description (c, A, map, etc) for them to try their solver on.

In case anyone's wondering, they're not ready to hook into GPkit just yet -- their solver is still experimental / in development.

mayork commented 7 years ago

D8 vertical tail model (includes yaw acceleration constraint)

D8_VT_yaw_rate_and_EO_simple_profile.py https://github.com/hoburg/d8/commit/f8af941b04db9a3c29f0adefdf918932c6eaad8a

Running the file currently solve a number of sweeps. If you don't want the sweeps change plot to False on line 893 Solves reliably across a variety of sweeps (mosek solves it in 4 GP solves).

mayork commented 7 years ago

Simple aircraft and flight profile for intuition building

stand_alone_simple_profile.py https://github.com/hoburg/d8/commit/baf29a126210e281743de62ba15d8b837ca69d34

Run the file to perform sweeps on altitude and range Model solves reliably across range and altitude sweeps.

mayork commented 7 years ago

D8 horizontal tail with a simple flight profile

D8_HT_simple_profile.py https://github.com/hoburg/d8/commit/fe145984f5b6cc76e711149e167a9b0d90b397de

Run the file to sweep on altitude and range. Full disclosure, when sweeping on verbosity=4 you can see that the first few non-feasibility solves return dual infeasible, but the SP always ends up solving. I don't think I have time to figure this out before 0900 tomorrow but I know this is a behavior that I have seen in a number of models so it might be interesting to analyze with a different solver to see if that provides insight.

mayork commented 7 years ago

D8 HT, VT, and simple flight profile integration

D8_empennage.py https://github.com/hoburg/d8/commit/d7224344ac85214d904a0e07278719a8ea09f3be

Run the file, it sweeps on altitude, range, and yaw rate acceleration The same disclaimer as my previous commit applies...some of the GP solves return dual infeasible yet the SP always solves. Probably can't get that fixed tonight but will continue to investigate the HT model and hopefully figure out what's going on.

mayork commented 7 years ago

Wing integrated with a simple flight profile

Wing_simple_performance.py https://github.com/hoburg/d8/commit/4d567a42f73dcd05225a40ccd6e82bcbcef1c626

Run the file, it will sweep across range and altitude. To not sweep change plot to False on line 774. Essentially Philippe's thesis wing with a minor tweak or two to facilitate integration with the flight profile. This solves reliably for all sweeps with no odd GP iteration behavior.

mayork commented 7 years ago

Turbofan engine model

CFM_56_validation.py or TASOPT_validation.py https://github.com/hoburg/gpkit/commit/4f84d550251127aef698969d844dbce4ba197a45 & https://github.com/hoburg/turbofan/commit/b423c017703979ba922ae552d3cbb212b72ae6dd

Just run either file, the only difference is in the substituted coefficients

1ozturkbe commented 7 years ago

Double bubble fuselage model

CFP_Fuselage_Performance.py https://github.com/hoburg/d8/commit/83fdb0bf81ba540d9cf6ac6cdb17812c68f70b0b

Just run. The file is stand-alone, with all SP's and SPEqualities labelled. It's pretty robust, so feel free to mess around with the substitutions :) A really fun thing to do is to set SPR (seats per row) to be a free variable: it solves in 31 GP solves (wow), and finds SPR of 5.32 as the optimum. Really cool!

bqpd commented 7 years ago

(updating this as I generate files)

CFP_Fuselage_Performance.py @ https://github.com/hoburg/d8/tree/CFP_h5 TASOPT_validation.h5.zip

TASOPT_validation.py @ [can't push to turbofan minor changes to hoburg/turbofan@b423c01] TASOPT_validation.h5.zip

bqpd commented 7 years ago

@1ozturkbe, @mayork, do you have any SPs without SignomialEqualities? Those became important real fast, it seems!

1ozturkbe commented 7 years ago

Seriously. They are rather convenient when it is not clear which way a constraint should point. Even the simplest model in d8, which is stand_alone_simple_profile.py, features two SigEqs. I'm certain we could figure out a way to relax those if you are in need of a model. What is it that you need it for, just curious?

bqpd commented 7 years ago

I'm testing the file generation tool above. I found a pretty simple bug, but still checking that those h5 files can be read in and get the same result...used Phillipe's thesis airplane, which (a little surprisingly) still runs great on the latest GPkit!

1ozturkbe commented 7 years ago

Sweet! How about that backwards compatibility? =D