In [1]:
import warnings

import matplotlib.pyplot as plt

import opentop

warnings.filterwarnings("ignore")

Specify flight information¶

Required: aircraft type, origin, destination, and take-off mass

Take-off mass can be in kg, or fraction of maximum take-off mass

In [2]:
actype = "A320"
origin = "EHAM"
destination = "LGAV"
m0 = 0.85
m0 * 78
Out[2]:
66.3

Define trip type¶

  • opentop.CompleteFlight(): full trajectory, non-phase specific
  • opentop.MultiPhase(): full trajectory, including climbing, cruise, and descent
  • opentop.Climb()
  • opentop.Cruise()
  • opentop.Descent()
In [3]:
optimizer = opentop.CompleteFlight(actype, origin, destination, m0)
flight = optimizer.trajectory(objective="fuel")

You can visualize the trajectory quickly with the vis.trajectory() function

In [4]:
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image

Examples of different trajectories¶

Multi-phase¶

In [5]:
flight = optimizer.trajectory(objective="fuel")

opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image

Cruise phase only¶

In [6]:
optimizer = opentop.Cruise(actype, origin, destination, m0)
flight = optimizer.trajectory(objective="fuel")

opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image

Using different built-in objective functions¶

In [7]:
optimizer = opentop.CompleteFlight(actype, origin, destination, m0)
In [8]:
flight = optimizer.trajectory(objective="fuel")
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image
In [9]:
flight = optimizer.trajectory(objective="ci:60")
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image
In [10]:
flight = optimizer.trajectory(objective="gwp100")
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image
In [11]:
flight = optimizer.trajectory(objective="gtp100")
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image

Specify different objective functions for different phases¶

In [12]:
flight = optimizer.trajectory(objective="time")
opentop.vis.trajectory(flight)
plt.show()
No description has been provided for this image