Closed mayork closed 7 years ago
or each airplane has a model the level above aircraft...so it'd be like the D8 model creates an instance of aircraft. Could the the cleanest implementation...
I have an idea. We need to define each aircraft by a set of booleans I think. For example: D82: D8, BLI, Rear-podded, PiTail. b777300ER: conventional, NoBLI, Wing-podded, ConvTail This will require creating different sets of constraints within D8 for the different configuration options. What do you think?
This would mean that the aircraft argument would just be a global string.
Did the email I sent out about a proposal for configuration make sense / seem like a workable idea? The difference between airplanes could be in the default arguments of models, which could be set on a global level. I'll make a demo for this in the next coupla days.
I didn't really follow the email
You'd do something like
D82_config = {Airplane: {"BLI": True, "tail": PiTail}, PiTail: {"beam": CircSpar}}
b777300ER_config = {Airplane: {"BLI": False, "tail": ConvTail}}
M = Mission(config=D82_config)
where "BLI" and "tail" would be keyword arguments to Airplane which accept a boolean and a submodel respectively.
Inside Mission you'd add a line like
gpkit.apply_config(config)
Does that help clarify the proposal?
I like the proposal; it's a more clean way to implement what I had mentioned above. I totally hadn't followed your initial email either Ned, but it now makes sense.
This is related to issue #89 . I think once that is implemented fully, we will no longer have issues.
We have too many boolean flags for different aircraft types. This worked well when we only had two aircraft, but now we have many. I think what needs to happen is each airplane just has it's own submodels built just for it...thoughts?