convexengineering / SPaircraft

Models for commercial aircraft design
http://spaircraft.readthedocs.org
25 stars 17 forks source link

Multi-mission not working #42

Closed mayork closed 7 years ago

mayork commented 7 years ago

@1ozturkbe i was wondering if you could take a look at https://github.com/hoburg/d8/commit/8383429a61694e043c320ee01d128458be8e506c. It's the mutli-mission formulation with Nmission set to 1 so it should be the same as a normal solve but it isn't working and I have no idea why.

1ozturkbe commented 7 years ago

I will take a look at it now. Sorry, been AWOL for the last few days; they have been crazy since I just got back in town.

1ozturkbe commented 7 years ago

Btw, for some reason it says that there are ReqRng is a vector of length 4. Investigating...

1ozturkbe commented 7 years ago

Btw, for the multimission, the only thing you change is the range, right? Or are you modulating the number of passengers as well? And also, why can't we pass vector substitutions instead of doing the equality constraints?

1ozturkbe commented 7 years ago

So I got it to solve, by literally doing one modification:

ReqRng[0] == 3000 * units('nmi'),
#to
ReqRng[:Nmission] == 3000 * units('nmi'),

I don't see why this makes a difference, but when I do the following, I get some weeeeeiiird shit.

sol('ReqRng')
Out[10]: <Quantity([ 3000.  3000.  3000.  3000.], 'nautical_mile')>
sol('ReqRng')[:Nmission]
Out[12]: <Quantity([ 3000.], 'nautical_mile')>

Confusion? I think yes. Why are there 4 ReqRng values?

1ozturkbe commented 7 years ago

HAHAHA I figured it out... You have this on line 1232:

    if multimission:
        m = Mission(Nclimb, Ncruise, Nmission = 4)

Lol, you set Nmission in the loop, and don't pull it from outside... Will push fix.

1ozturkbe commented 7 years ago

With the latest code, I can't get the non multi-mission 737 to solve. Will push as soon as I get both working. It solves bounded, but not o/w.

1ozturkbe commented 7 years ago

Also, have you noticed that there is some weird g variable that pops up somehow from the Atmosphere model, although no such variable actually exists (to my knowledge? ). I'm so confused... I've been trying to track it down and just can't find it.

mayork commented 7 years ago

starting from the top:

mayork commented 7 years ago

let me know when you push that code

1ozturkbe commented 7 years ago

Got pushed. ReqRng bug fixed.

mayork commented 7 years ago

now working, resolved