Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort solution tables (that aren't already sorted by values) by model sensitivity, an print a model sensitivity table #1534

Merged
merged 3 commits into from
Dec 15, 2020

Conversation

bqpd
Copy link
Contributor

@bqpd bqpd commented Dec 14, 2020

Closes #1521

Example output:

Optimal Cost
------------
 [ 0.873     1.09      1.61      ]

Swept Variables
---------------
    | Aircraft.Wing
rho : [ 0.5       1         2        ]  [lbf/ft²] areal density

Model Sensitivities (sorts models in sections below)
-------------------
 +2.79 + [   -     -   +0.1 ] : Mission.FlightSegment.AircraftP.WingAero
 +2.51 + [   -     -     -  ] : Mission
 +2.43 + [ -0.2    -   +0.3 ] : Mission.FlightSegment.AircraftP
 +1.64 + [ -0.5    -   +0.6 ] : Aircraft.Wing
 +1.43 + [ -0.6    -   +0.7 ] : Mission.FlightSegment.FlightState
 +1.42 + [ -0.2    -   +0.3 ] : Aircraft
 +0.97 + [   -     -     -  ] : Aircraft.Fuselage

Free Variables
--------------
      | Mission.FlightSegment.AircraftP.WingAero
   CD : [ 0.014     0.014     0.0139    0.0139            drag coefficient
          0.019     0.0189    0.0189    0.0188
          0.0352    0.0351    0.0349    0.0348    ]
   CL : [ 0.797     0.796     0.795     0.793             lift coefficient
          1.01      1         1         1
          1.5       1.49      1.49      1.49      ]
    D : [ 2.19      2.19      2.18      2.18        [lbf] drag force
          2.74      2.73      2.72      2.72
          4.04      4.02      4.01      3.99      ]
   Re : [ 3.79e+05  3.79e+05  3.79e+05  3.79e+05          Reynold's number
          3.65e+05  3.65e+05  3.65e+05  3.65e+05
          3.25e+05  3.25e+05  3.25e+05  3.25e+05  ]

      | Mission.FlightSegment.AircraftP
Wburn : [ 0.219     0.219     0.218     0.218       [lbf] segment fuel burn
          0.274     0.273     0.272     0.272
          0.404     0.402     0.401     0.399     ]
Wfuel : [ 0.873     0.654     0.436     0.218       [lbf] fuel weight
          1.09      0.817     0.544     0.272
          1.61      1.2       0.8       0.399     ]

      | Aircraft.Wing
    S : [ 47.8      44.1      35.1     ]            [ft²] surface area
    W : [ 23.9      44.1      70.1     ]            [lbf] weight
    c : [ 1.33      1.28      1.14     ]            [ft]  mean chord

      | Aircraft
    W : [ 124       144       170      ]            [lbf] weight

Fixed Variables
---------------
    | Mission.FlightSegment.AircraftP.WingAero
  e : [ 0.9       0.9       0.9       0.9      ]           Oswald efficiency

    | Aircraft.Wing
  A : 27                                                   aspect ratio

    | Mission.FlightSegment.FlightState
  V : [ 40        40        40        40       ]  [kt]     true airspeed
 mu : [ 1.63e-05  1.63e-05  1.63e-05  1.63e-05 ]  [N·s/m²] dynamic viscosity
rho : [ 0.74      0.74      0.74      0.74     ]  [kg/m³]  air density

    | Aircraft.Fuselage
  W : 100                                         [lbf]    weight

Variable Sensitivities
----------------------
    | Aircraft.Fuselage
  W : [ +0.96     +0.97     +0.98    ]           weight

    | Aircraft.Wing
  A : [ -0.56     -0.67     -0.82    ]           aspect ratio
rho : [ +0.23     +0.43     +0.69    ]           areal density

    | Mission.FlightSegment.AircraftP.WingAero
  e : [ -0.15     -0.15     -0.15     -0.15      Oswald efficiency
        -0.18     -0.18     -0.18     -0.18
        -0.21     -0.21     -0.21     -0.21     ]

    | Mission.FlightSegment.FlightState
  V : [ -0.12     -0.12     -0.11     -0.11      true airspeed
        -0.22     -0.21     -0.21     -0.21
        -0.35     -0.34     -0.34     -0.34     ]
rho : [ -0.068    -0.068    -0.067    -0.067     air density
        -0.12     -0.11     -0.11     -0.11
        -0.18     -0.18     -0.18     -0.18     ]
 mu : [ +0.02     +0.02     +0.02     +0.02      dynamic viscosity
        +0.015    +0.015    +0.015    +0.015
        +0.0084   +0.0084   +0.0085   +0.0085   ]

Most Sensitive Constraints (in last sweep)
------------------------------------------
       | Aircraft
  +1.7 : .W ≥ .Fuselage.W + .Wing.W

       | Mission
    +1 : Wfuel[0] ≥ Wfuel[1] + Wburn[0]
 +0.75 : Wfuel[1] ≥ Wfuel[2] + Wburn[1]
  +0.5 : Wfuel[2] ≥ Wfuel[3] + Wburn[2]

       | Aircraft.Wing
 +0.69 : .W ≥ S·.rho

@bqpd
Copy link
Contributor Author

bqpd commented Dec 14, 2020

@pgkirsch was this what you were thinking?

@pgkirsch
Copy link
Contributor

@bqpd yes! Looks beautiful!

@bqpd bqpd merged commit aada194 into master Dec 15, 2020
@bqpd bqpd deleted the sortbymodelsenss branch December 15, 2020 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Solution tables and diffs sorted by model sensitivity
2 participants