fastoad.models.performances.mission.openmdao.mission_wrapper module¶
Mission wrapper.
- class fastoad.models.performances.mission.openmdao.mission_wrapper.MissionWrapper(*args, **kwargs)[source]¶
Bases:
fastoad.models.performances.mission.mission_definition.mission_builder.MissionBuilder
Wrapper around
MissionBuilder
for using with OpenMDAO.This class builds and computes a mission from a provided definition.
- Parameters
mission_definition – as file path or MissionDefinition instance
propulsion – if not provided, the property
propulsion
must be set before callingbuild()
reference_area – if not provided, the property
reference_area
must be set before callingbuild()
- setup(component: openmdao.core.explicitcomponent.ExplicitComponent, mission_name: Optional[str] = None)[source]¶
To be used during setup() of provided OpenMDAO component.
It adds input and output variables deduced from mission definition file.
- Parameters
component – the OpenMDAO component where the setup is done.
mission_name – mission name (can be omitted if only one mission is defined)
- compute(inputs: openmdao.vectors.vector.Vector, outputs: openmdao.vectors.vector.Vector, start_flight_point: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.DataFrame [source]¶
To be used during compute() of an OpenMDAO component.
Builds the mission from input file, and computes it. outputs vector is filled with duration, burned fuel and covered ground distance for each part of the flight.
- Parameters
inputs – the input vector of the OpenMDAO component
outputs – the output vector of the OpenMDAO component
start_flight_point – the starting flight point just after takeoff
- Returns
a pandas DataFrame where columns names match fields of
FlightPoint