convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

over constraining variables #95

Closed mjburton11 closed 7 years ago

mjburton11 commented 7 years ago

I discovered that mosek will return an UNKNOWN error on commit @e34e71aac66e2a8ce96fc9da372b322a6b0cd676 for payload weight values of 9.6 < W_{pay} < 10.8. But will work for other values.

mjburton11 commented 7 years ago

After playing around with this for some time I realized that I was over constraining one of my variables. So here's a partial list of constraints:

          constraints = [
              Wzfw >= sum(summing_vars(components, "W")) + Wpay + Wavn,
              mtow >= mission[0]["W_{start}"][0],
              mtow >= JHO["W_{zfw}"] + JHO["W_{fuel-tot}"],
              JHO["W_{fuel-tot}"] >= sum(fs["W_{fuel-fs}"] for fs in mission),
              mission[-1]["W_{end}"][-1] >= JHO["W_{zfw}"],
              JHO["W_{cent}"] >= (JHO["W_{fuel-tot}"] +
                                  sum(summing_vars(JHO.smeared_loads, "W")))
              ]

What has happening is that the second and third constraints were over constraining mtow. Originally, I needed both constraints because I need down pressure on W_{fuel-tot}. But apparently, both were to hard to satisfy for certain conditions. Once I added W_{cent}, then I could get rid of the second and it seems to work pretty well.