Two-Burn Orbit Raise#

This example demonstrates the use of a Trajectory to encapsulate a three-phase orbit raising maneuver with a burn-coast-burn phase sequence. This example is based on the problem provided in Enright [EC91].

The dynamics are given by

(58)#\[\begin{align} \frac{dr}{dt} &= v_r \\ \frac{d\theta}{dt} &= \frac{v_\theta}{r} \\ \frac{dv_r}{dt} &= \frac{v^2_\theta}{r} - \frac{1}{r^2} + a_{thrust} \sin u_1 \\ \frac{dv_\theta}{dt} &= - \frac{v_r v_\theta}{r} + a_{thrust} \cos u_1 \\ \frac{da_{thrust}}{dt} &= \frac{a^2_{thrust}}{c} \\ \frac{d \Delta v}{dt} &= a_{thrust} \end{align}\]

The initial conditions are

(59)#\[\begin{align} r &= 1 \rm{\,DU} \\ \theta &= 0 \rm{\,rad} \\ v_r &= 0 \rm{\,DU/TU}\\ v_\theta &= 1 \rm{\,DU/TU}\\ a_{thrust} &= 0.1 \rm{\,DU/TU^2}\\ \Delta v &= 0 \rm{\,DU/TU} \end{align}\]

and the final conditions are

(60)#\[\begin{align} r &= 3 \rm{\,DU} \\ \theta &= \rm{free} \\ v_r &= 0 \rm{\,DU/TU}\\ v_\theta &= \sqrt{\frac{1}{3}} \rm{\,DU/TU}\\ a_{thrust} &= \rm{free}\\ \Delta v &= \rm{free} \end{align}\]

Building and running the problem#

The following code instantiates our problem, our trajectory, three phases, and links them accordingly. The spacecraft initial position, velocity, and acceleration magnitude are fixed. The objective is to minimize the delta-V needed to raise the spacecraft into a circular orbit at 3 Earth radii.

Note the call to link_phases which provides time, position, velocity, and delta-V continuity across all phases, and acceleration continuity between the first and second burn phases. Acceleration is 0 during the coast phase. Alternatively, we could have specified a different ODE for the coast phase, as in the example.

This example runs inconsistently with SLSQP but is solved handily by IPOPT and SNOPT.

Hide code cell outputs

import numpy as np
import openmdao.api as om
import openmdao.utils.units as units

# Add canonical units to OpenMDAO
MU_earth = 3.986592936294783e14
R_earth = 6378137.0

period = 2 * np.pi * np.sqrt(R_earth**3 / MU_earth)

# Add canonical time and distance units for these EOM
units.add_unit('TU', '{0}*s'.format(period))
units.add_unit('DU', '{0}*m'.format(R_earth))


class FiniteBurnODE(om.ExplicitComponent):

    def initialize(self):
        self.options.declare('num_nodes', types=int)

    def setup(self):
        nn = self.options['num_nodes']

        # Inputs
        self.add_input('r',
                       val=np.ones(nn),
                       desc='radius from center of attraction',
                       units='DU')

        self.add_input('theta',
                       val=np.zeros(nn),
                       desc='anomaly term',
                       units='rad')

        self.add_input('vr',
                       val=np.zeros(nn),
                       desc='local vertical velocity component',
                       units='DU/TU')

        self.add_input('vt',
                       val=np.zeros(nn),
                       desc='local horizontal velocity component',
                       units='DU/TU')

        self.add_input('accel',
                       val=np.zeros(nn),
                       desc='acceleration due to thrust',
                       units='DU/TU**2')

        self.add_input('u1',
                       val=np.zeros(nn),
                       desc='thrust angle above local horizontal',
                       units='rad')

        self.add_input('c',
                       val=np.zeros(nn),
                       desc='exhaust velocity',
                       units='DU/TU')

        self.add_output('r_dot',
                        val=np.ones(nn),
                        desc='rate of change of radius from center of attraction',
                        units='DU/TU')

        self.add_output('theta_dot',
                        val=np.zeros(nn),
                        desc='rate of change of anomaly term',
                        units='rad/TU')

        self.add_output('vr_dot',
                        val=np.zeros(nn),
                        desc='rate of change of local vertical velocity component',
                        units='DU/TU**2')

        self.add_output('vt_dot',
                        val=np.zeros(nn),
                        desc='rate of change of local horizontal velocity component',
                        units='DU/TU**2')

        self.add_output('at_dot',
                        val=np.zeros(nn),
                        desc='rate of change of acceleration due to thrust',
                        units='DU/TU**3')

        self.add_output('deltav_dot',
                        val=np.zeros(nn),
                        desc='rate of change of delta-V',
                        units='DU/TU**2')

        self.add_output('pos_x',
                        val=np.zeros(nn),
                        desc='x-component of position',
                        units='DU')

        self.add_output('pos_y',
                        val=np.zeros(nn),
                        desc='x-component of position',
                        units='DU')

        # Setup partials
        ar = np.arange(self.options['num_nodes'])

        # r dot is a linear function of vr, so provide the partial value here
        self.declare_partials(of='r_dot', wrt='vr', rows=ar, cols=ar, val=1.0)

        self.declare_partials(of='theta_dot', wrt='r', rows=ar, cols=ar)
        self.declare_partials(of='theta_dot', wrt='vt', rows=ar, cols=ar)

        self.declare_partials(of='vr_dot', wrt='r', rows=ar, cols=ar)
        self.declare_partials(of='vr_dot', wrt='vt', rows=ar, cols=ar)
        self.declare_partials(of='vr_dot', wrt='accel', rows=ar, cols=ar)
        self.declare_partials(of='vr_dot', wrt='u1', rows=ar, cols=ar)

        self.declare_partials(of='vt_dot', wrt='r', rows=ar, cols=ar)
        self.declare_partials(of='vt_dot', wrt='vr', rows=ar, cols=ar)
        self.declare_partials(of='vt_dot', wrt='vt', rows=ar, cols=ar)
        self.declare_partials(of='vt_dot', wrt='accel', rows=ar, cols=ar)
        self.declare_partials(of='vt_dot', wrt='u1', rows=ar, cols=ar)

        self.declare_partials(of='at_dot', wrt='accel', rows=ar, cols=ar)
        self.declare_partials(of='at_dot', wrt='c', rows=ar, cols=ar)

        self.declare_partials(of='deltav_dot', wrt='accel', rows=ar, cols=ar, val=1.0)

        self.declare_partials(of='pos_x', wrt='r', rows=ar, cols=ar)
        self.declare_partials(of='pos_x', wrt='theta', rows=ar, cols=ar)

        self.declare_partials(of='pos_y', wrt='r', rows=ar, cols=ar)
        self.declare_partials(of='pos_y', wrt='theta', rows=ar, cols=ar)

    def compute(self, inputs, outputs):
        r = inputs['r']
        theta = inputs['theta']
        vr = inputs['vr']
        vt = inputs['vt']
        at = inputs['accel']
        u1 = inputs['u1']
        c = inputs['c']

        outputs['r_dot'] = vr
        outputs['theta_dot'] = vt / r
        outputs['vr_dot'] = vt**2 / r - 1 / r**2 + at * np.sin(u1)
        outputs['vt_dot'] = -vr * vt / r + at * np.cos(u1)
        outputs['at_dot'] = at**2 / c
        outputs['deltav_dot'] = at

        outputs['pos_x'] = r * np.cos(theta)
        outputs['pos_y'] = r * np.sin(theta)

    def compute_partials(self, inputs, partials):
        r = inputs['r']
        theta = inputs['theta']
        vr = inputs['vr']
        vt = inputs['vt']
        at = inputs['accel']
        u1 = inputs['u1']
        c = inputs['c']

        su1 = np.sin(u1)
        cu1 = np.cos(u1)

        partials['theta_dot', 'r'] = -vt / r**2
        partials['theta_dot', 'vt'] = 1.0 / r

        partials['vr_dot', 'r'] = -vt**2 / r**2 + 2.0 / r**3
        partials['vr_dot', 'vt'] = 2 * vt / r
        partials['vr_dot', 'accel'] = su1
        partials['vr_dot', 'u1'] = at * cu1

        partials['vt_dot', 'r'] = vr * vt / r**2
        partials['vt_dot', 'vr'] = -vt / r
        partials['vt_dot', 'vt'] = -vr / r
        partials['vt_dot', 'accel'] = cu1
        partials['vt_dot', 'u1'] = -at * su1

        partials['at_dot', 'accel'] = 2 * at / c
        partials['at_dot', 'c'] = -at**2 / c**2

        partials['pos_x', 'r'] = np.cos(theta)
        partials['pos_x', 'theta'] = -r * np.sin(theta)

        partials['pos_y', 'r'] = np.sin(theta)
        partials['pos_y', 'theta'] = r * np.cos(theta)
import numpy as np
import openmdao.api as om
import dymos as dm
import matplotlib.pyplot as plt
from dymos.examples.finite_burn_orbit_raise.finite_burn_eom import FiniteBurnODE

p = om.Problem(model=om.Group())

p.driver = om.pyOptSparseDriver()
p.driver.options['optimizer'] = 'IPOPT'
p.driver.declare_coloring()

traj = dm.Trajectory()

traj.add_parameter('c', opt=False, val=1.5, units='DU/TU',
                   targets={'burn1': ['c'], 'coast': ['c'], 'burn2': ['c']})

# First Phase (burn)

burn1 = dm.Phase(ode_class=FiniteBurnODE,
                 transcription=dm.GaussLobatto(num_segments=5, order=3, compressed=False))

burn1 = traj.add_phase('burn1', burn1)

burn1.set_time_options(fix_initial=True, duration_bounds=(.5, 10), units='TU')
burn1.add_state('r', fix_initial=True, fix_final=False, defect_scaler=100.0,
                rate_source='r_dot', units='DU')
burn1.add_state('theta', fix_initial=True, fix_final=False, defect_scaler=100.0,
                rate_source='theta_dot', units='rad')
burn1.add_state('vr', fix_initial=True, fix_final=False, defect_scaler=100.0,
                rate_source='vr_dot', units='DU/TU')
burn1.add_state('vt', fix_initial=True, fix_final=False, defect_scaler=100.0,
                rate_source='vt_dot', units='DU/TU')
burn1.add_state('accel', fix_initial=True, fix_final=False,
                rate_source='at_dot', units='DU/TU**2')
burn1.add_state('deltav', fix_initial=True, fix_final=False,
                rate_source='deltav_dot', units='DU/TU')
burn1.add_control('u1', rate_continuity=True, rate2_continuity=True, units='deg',
                  scaler=0.01, rate_continuity_scaler=0.001, rate2_continuity_scaler=0.001,
                  lower=-30, upper=30)
# Second Phase (Coast)
coast = dm.Phase(ode_class=FiniteBurnODE,
                 transcription=dm.GaussLobatto(num_segments=5, order=3, compressed=False))

coast.set_time_options(initial_bounds=(0.5, 20), duration_bounds=(.5, 50), duration_ref=50,
                       units='TU')
coast.add_state('r', fix_initial=False, fix_final=False, defect_scaler=100.0,
                rate_source='r_dot', targets=['r'], units='DU')
coast.add_state('theta', fix_initial=False, fix_final=False, defect_scaler=100.0,
                rate_source='theta_dot', targets=['theta'], units='rad')
coast.add_state('vr', fix_initial=False, fix_final=False, defect_scaler=100.0,
                rate_source='vr_dot', targets=['vr'], units='DU/TU')
coast.add_state('vt', fix_initial=False, fix_final=False, defect_scaler=100.0,
                rate_source='vt_dot', targets=['vt'], units='DU/TU')
coast.add_state('accel', fix_initial=True, fix_final=True,
                rate_source='at_dot', targets=['accel'], units='DU/TU**2')
coast.add_state('deltav', fix_initial=False, fix_final=False,
                rate_source='deltav_dot', units='DU/TU')

coast.add_parameter('u1', opt=False, val=0.0, units='deg', targets=['u1'])

# Third Phase (burn)
burn2 = dm.Phase(ode_class=FiniteBurnODE,
                 transcription=dm.GaussLobatto(num_segments=5, order=3, compressed=False))

traj.add_phase('coast', coast)
traj.add_phase('burn2', burn2)

burn2.set_time_options(initial_bounds=(0.5, 50), duration_bounds=(.5, 10), initial_ref=10,
                       units='TU')
burn2.add_state('r', fix_initial=False, fix_final=True, defect_scaler=100.0,
                rate_source='r_dot', units='DU')
burn2.add_state('theta', fix_initial=False, fix_final=False, defect_scaler=100.0,
                rate_source='theta_dot', units='rad')
burn2.add_state('vr', fix_initial=False, fix_final=True, defect_scaler=1000.0,
                rate_source='vr_dot', units='DU/TU')
burn2.add_state('vt', fix_initial=False, fix_final=True, defect_scaler=1000.0,
                rate_source='vt_dot', units='DU/TU')
burn2.add_state('accel', fix_initial=False, fix_final=False, defect_scaler=1.0,
                rate_source='at_dot', units='DU/TU**2')
burn2.add_state('deltav', fix_initial=False, fix_final=False, defect_scaler=1.0,
                rate_source='deltav_dot', units='DU/TU')

burn2.add_objective('deltav', loc='final', scaler=100.0)

burn2.add_control('u1', rate_continuity=True, rate2_continuity=True, units='deg',
                  scaler=0.01, lower=-90, upper=90)

burn1.add_timeseries_output('pos_x')
coast.add_timeseries_output('pos_x')
burn2.add_timeseries_output('pos_x')

burn1.add_timeseries_output('pos_y')
coast.add_timeseries_output('pos_y')
burn2.add_timeseries_output('pos_y')

# Link Phases
traj.link_phases(phases=['burn1', 'coast', 'burn2'],
                 vars=['time', 'r', 'theta', 'vr', 'vt', 'deltav'])

traj.link_phases(phases=['burn1', 'burn2'], vars=['accel'])

p.model.add_subsystem('traj', subsys=traj)

# Finish Problem Setup

p.setup(check=True)

# Set Initial Guesses
p.set_val('traj.parameters:c', val=1.5, units='DU/TU')

burn1 = p.model.traj.phases.burn1
burn2 = p.model.traj.phases.burn2
coast = p.model.traj.phases.coast

burn1.set_time_val(initial=0.0, duration=2.25)
burn1.set_state_val('r', [1, 1.5])
burn1.set_state_val('theta', [0, 1.7])
burn1.set_state_val('vr', [0, 0])
burn1.set_state_val('vt', [1, 1])
burn1.set_state_val('accel', [0.1, 0.0])
burn1.set_state_val('deltav', [0, 0.1])
burn1.set_control_val('u1', [-3.5, 13.0])

coast.set_time_val(initial=2.25, duration=3.0)
coast.set_state_val('r', [1.3, 1.5])
coast.set_state_val('theta', [2.1767, 1.7])
coast.set_state_val('vr', [0.3285, 0])
coast.set_state_val('vt', [0.97, 1])
coast.set_state_val('accel', [0, 0])

burn2.set_time_val(initial=5.25, duration=1.75)
burn2.set_state_val('r', [1, 3])
burn2.set_state_val('theta', [0, 4])
burn2.set_state_val('vr', [0, 0])
burn2.set_state_val('vt', [1, np.sqrt(1 / 3)])
burn2.set_state_val('accel', [0.1, 0.0])
burn2.set_state_val('deltav', [0.1, 0.2])
burn2.set_control_val('u1', [0, 0])

dm.run_problem(p, simulate=True)
INFO: checking out_of_order...
INFO:     out_of_order check complete (0.001500 sec).
INFO: checking system...
INFO:     system check complete (0.000042 sec).
INFO: checking solvers...
INFO:     solvers check complete (0.000544 sec).
INFO: checking dup_inputs...
INFO:     dup_inputs check complete (0.000255 sec).
INFO: checking missing_recorders...
INFO:     missing_recorders check complete (0.000002 sec).
INFO: checking unserializable_options...
INFO:     unserializable_options check complete (0.003989 sec).
INFO: checking comp_has_no_outputs...
INFO:     comp_has_no_outputs check complete (0.000085 sec).
INFO: checking auto_ivc_warnings...
INFO:     auto_ivc_warnings check complete (0.000003 sec).
INFO: checking out_of_order...
INFO:     out_of_order check complete (0.000637 sec).
INFO: checking system...
INFO:     system check complete (0.000037 sec).
INFO: checking solvers...
INFO:     solvers check complete (0.000236 sec).
INFO: checking dup_inputs...
INFO:     dup_inputs check complete (0.000268 sec).
INFO: checking missing_recorders...
INFO:     missing_recorders check complete (0.000002 sec).
INFO: checking unserializable_options...
INFO:     unserializable_options check complete (0.004094 sec).
INFO: checking comp_has_no_outputs...
INFO:     comp_has_no_outputs check complete (0.000113 sec).
INFO: checking auto_ivc_warnings...
INFO:     auto_ivc_warnings check complete (0.000004 sec).
Jacobian shape: (112, 204)  (3.64% nonzero)
FWD solves: 13   REV solves: 0
Total colors vs. total size: 13 vs 204  (93.63% improvement)

Sparsity computed using tolerance: 1e-25.
Dense total jacobian for Problem 'problem' was computed 3 times.
Time to compute sparsity:   0.4589 sec
Time to compute coloring:   0.1195 sec
Memory to compute coloring:   0.1250 MB
Coloring created on: 2025-07-16 18:51:52
Optimization Problem -- Optimization using pyOpt_sparse
================================================================================
    Objective Function: _objfunc

    Solution: 
--------------------------------------------------------------------------------
    Total Time:                    3.0118
       User Objective Time :       0.1325
       User Sensitivity Time :     2.4690
       Interface Time :            0.2123
       Opt Solver Time:            0.1980
    Calls to Objective Function :      28
    Calls to Sens Function :           28


   Objectives
      Index  Name                                Value
          0  traj.burn2.states:deltav     3.989839E+01

   Variables (c - continuous, i - integer, d - discrete)
      Index  Name                         Type      Lower Bound            Value      Upper Bound     Status
          0  traj.burn1.t_duration_0         c     5.000000E-01     2.228030E+00     1.000000E+01           
          1  traj.burn1.states:r_0           c    -1.000000E+21     1.002411E+00     1.000000E+21           
          2  traj.burn1.states:r_1           c    -1.000000E+21     1.002411E+00     1.000000E+21           
          3  traj.burn1.states:r_2           c    -1.000000E+21     1.021674E+00     1.000000E+21           
          4  traj.burn1.states:r_3           c    -1.000000E+21     1.021674E+00     1.000000E+21           
          5  traj.burn1.states:r_4           c    -1.000000E+21     1.072668E+00     1.000000E+21           
          6  traj.burn1.states:r_5           c    -1.000000E+21     1.072668E+00     1.000000E+21           
          7  traj.burn1.states:r_6           c    -1.000000E+21     1.162426E+00     1.000000E+21           
          8  traj.burn1.states:r_7           c    -1.000000E+21     1.162426E+00     1.000000E+21           
          9  traj.burn1.states:r_8           c    -1.000000E+21     1.289870E+00     1.000000E+21           
         10  traj.burn1.states:theta_0       c    -1.000000E+21     4.551154E-01     1.000000E+21           
         11  traj.burn1.states:theta_1       c    -1.000000E+21     4.551154E-01     1.000000E+21           
         12  traj.burn1.states:theta_2       c    -1.000000E+21     9.219251E-01     1.000000E+21           
         13  traj.burn1.states:theta_3       c    -1.000000E+21     9.219251E-01     1.000000E+21           
         14  traj.burn1.states:theta_4       c    -1.000000E+21     1.378635E+00     1.000000E+21           
         15  traj.burn1.states:theta_5       c    -1.000000E+21     1.378635E+00     1.000000E+21           
         16  traj.burn1.states:theta_6       c    -1.000000E+21     1.798766E+00     1.000000E+21           
         17  traj.burn1.states:theta_7       c    -1.000000E+21     1.798766E+00     1.000000E+21           
         18  traj.burn1.states:theta_8       c    -1.000000E+21     2.165052E+00     1.000000E+21           
         19  traj.burn1.states:vr_0          c    -1.000000E+21     1.772243E-02     1.000000E+21           
         20  traj.burn1.states:vr_1          c    -1.000000E+21     1.772243E-02     1.000000E+21           
         21  traj.burn1.states:vr_2          c    -1.000000E+21     7.447792E-02     1.000000E+21           
         22  traj.burn1.states:vr_3          c    -1.000000E+21     7.447792E-02     1.000000E+21           
         23  traj.burn1.states:vr_4          c    -1.000000E+21     1.570336E-01     1.000000E+21           
         24  traj.burn1.states:vr_5          c    -1.000000E+21     1.570336E-01     1.000000E+21           
         25  traj.burn1.states:vr_6          c    -1.000000E+21     2.452608E-01     1.000000E+21           
         26  traj.burn1.states:vr_7          c    -1.000000E+21     2.452608E-01     1.000000E+21           
         27  traj.burn1.states:vr_8          c    -1.000000E+21     3.247035E-01     1.000000E+21           
         28  traj.burn1.states:vt_0          c    -1.000000E+21     1.042686E+00     1.000000E+21           
         29  traj.burn1.states:vt_1          c    -1.000000E+21     1.042686E+00     1.000000E+21           
         30  traj.burn1.states:vt_2          c    -1.000000E+21     1.069132E+00     1.000000E+21           
         31  traj.burn1.states:vt_3          c    -1.000000E+21     1.069132E+00     1.000000E+21           
         32  traj.burn1.states:vt_4          c    -1.000000E+21     1.065074E+00     1.000000E+21           
         33  traj.burn1.states:vt_5          c    -1.000000E+21     1.065074E+00     1.000000E+21           
         34  traj.burn1.states:vt_6          c    -1.000000E+21     1.030094E+00     1.000000E+21           
         35  traj.burn1.states:vt_7          c    -1.000000E+21     1.030094E+00     1.000000E+21           
         36  traj.burn1.states:vt_8          c    -1.000000E+21     9.761629E-01     1.000000E+21           
         37  traj.burn1.states:accel_0       c    -1.000000E+21     1.030617E-01     1.000000E+21           
         38  traj.burn1.states:accel_1       c    -1.000000E+21     1.030617E-01     1.000000E+21           
         39  traj.burn1.states:accel_2       c    -1.000000E+21     1.063167E-01     1.000000E+21           
         40  traj.burn1.states:accel_3       c    -1.000000E+21     1.063167E-01     1.000000E+21           
         41  traj.burn1.states:accel_4       c    -1.000000E+21     1.097841E-01     1.000000E+21           
         42  traj.burn1.states:accel_5       c    -1.000000E+21     1.097841E-01     1.000000E+21           
         43  traj.burn1.states:accel_6       c    -1.000000E+21     1.134853E-01     1.000000E+21           
         44  traj.burn1.states:accel_7       c    -1.000000E+21     1.134853E-01     1.000000E+21           
         45  traj.burn1.states:accel_8       c    -1.000000E+21     1.174447E-01     1.000000E+21           
         46  traj.burn1.states:deltav_0      c    -1.000000E+21     4.523589E-02     1.000000E+21           
         47  traj.burn1.states:deltav_1      c    -1.000000E+21     4.523589E-02     1.000000E+21           
         48  traj.burn1.states:deltav_2      c    -1.000000E+21     9.187850E-02     1.000000E+21           
         49  traj.burn1.states:deltav_3      c    -1.000000E+21     9.187850E-02     1.000000E+21           
         50  traj.burn1.states:deltav_4      c    -1.000000E+21     1.400181E-01     1.000000E+21           
         51  traj.burn1.states:deltav_5      c    -1.000000E+21     1.400181E-01     1.000000E+21           
         52  traj.burn1.states:deltav_6      c    -1.000000E+21     1.897541E-01     1.000000E+21           
         53  traj.burn1.states:deltav_7      c    -1.000000E+21     1.897541E-01     1.000000E+21           
         54  traj.burn1.states:deltav_8      c    -1.000000E+21     2.411959E-01     1.000000E+21           
         55  traj.burn1.controls:u1_0        c    -3.000000E-01    -3.871082E-02     3.000000E-01           
         56  traj.burn1.controls:u1_1        c    -3.000000E-01    -2.977418E-02     3.000000E-01           
         57  traj.burn1.controls:u1_2        c    -3.000000E-01    -1.798095E-02     3.000000E-01           
         58  traj.burn1.controls:u1_3        c    -3.000000E-01    -1.798095E-02     3.000000E-01           
         59  traj.burn1.controls:u1_4        c    -3.000000E-01    -3.205161E-03     3.000000E-01           
         60  traj.burn1.controls:u1_5        c    -3.000000E-01     1.467911E-02     3.000000E-01           
         61  traj.burn1.controls:u1_6        c    -3.000000E-01     1.467911E-02     3.000000E-01           
         62  traj.burn1.controls:u1_7        c    -3.000000E-01     3.450564E-02     3.000000E-01           
         63  traj.burn1.controls:u1_8        c    -3.000000E-01     5.510823E-02     3.000000E-01           
         64  traj.burn1.controls:u1_9        c    -3.000000E-01     5.510823E-02     3.000000E-01           
         65  traj.burn1.controls:u1_10       c    -3.000000E-01     7.549970E-02     3.000000E-01           
         66  traj.burn1.controls:u1_11       c    -3.000000E-01     9.469292E-02     3.000000E-01           
         67  traj.burn1.controls:u1_12       c    -3.000000E-01     9.469292E-02     3.000000E-01           
         68  traj.burn1.controls:u1_13       c    -3.000000E-01     1.125798E-01     3.000000E-01           
         69  traj.burn1.controls:u1_14       c    -3.000000E-01     1.290522E-01     3.000000E-01           
         70  traj.burn2.t_initial_0          c     5.000000E-02     9.614472E-01     5.000000E+00           
         71  traj.burn2.t_duration_0         c     5.000000E-01     1.275260E+00     1.000000E+01           
         72  traj.burn2.states:r_0           c    -1.000000E+21     2.985662E+00     1.000000E+21           
         73  traj.burn2.states:r_1           c    -1.000000E+21     2.992648E+00     1.000000E+21           
         74  traj.burn2.states:r_2           c    -1.000000E+21     2.992648E+00     1.000000E+21           
         75  traj.burn2.states:r_3           c    -1.000000E+21     2.996948E+00     1.000000E+21           
         76  traj.burn2.states:r_4           c    -1.000000E+21     2.996948E+00     1.000000E+21           
         77  traj.burn2.states:r_5           c    -1.000000E+21     2.999153E+00     1.000000E+21           
         78  traj.burn2.states:r_6           c    -1.000000E+21     2.999153E+00     1.000000E+21           
         79  traj.burn2.states:r_7           c    -1.000000E+21     2.999922E+00     1.000000E+21           
         80  traj.burn2.states:r_8           c    -1.000000E+21     2.999922E+00     1.000000E+21           
         81  traj.burn2.states:theta_0       c    -1.000000E+21     4.156692E+00     1.000000E+21           
         82  traj.burn2.states:theta_1       c    -1.000000E+21     4.193917E+00     1.000000E+21           
         83  traj.burn2.states:theta_2       c    -1.000000E+21     4.193917E+00     1.000000E+21           
         84  traj.burn2.states:theta_3       c    -1.000000E+21     4.233604E+00     1.000000E+21           
         85  traj.burn2.states:theta_4       c    -1.000000E+21     4.233604E+00     1.000000E+21           
         86  traj.burn2.states:theta_5       c    -1.000000E+21     4.275859E+00     1.000000E+21           
         87  traj.burn2.states:theta_6       c    -1.000000E+21     4.275859E+00     1.000000E+21           
         88  traj.burn2.states:theta_7       c    -1.000000E+21     4.320784E+00     1.000000E+21           
         89  traj.burn2.states:theta_8       c    -1.000000E+21     4.320784E+00     1.000000E+21           
         90  traj.burn2.states:theta_9       c    -1.000000E+21     4.368465E+00     1.000000E+21           
         91  traj.burn2.states:vr_0          c    -1.000000E+21     3.335965E-02     1.000000E+21           
         92  traj.burn2.states:vr_1          c    -1.000000E+21     2.176356E-02     1.000000E+21           
         93  traj.burn2.states:vr_2          c    -1.000000E+21     2.176356E-02     1.000000E+21           
         94  traj.burn2.states:vr_3          c    -1.000000E+21     1.234448E-02     1.000000E+21           
         95  traj.burn2.states:vr_4          c    -1.000000E+21     1.234448E-02     1.000000E+21           
         96  traj.burn2.states:vr_5          c    -1.000000E+21     5.372873E-03     1.000000E+21           
         97  traj.burn2.states:vr_6          c    -1.000000E+21     5.372873E-03     1.000000E+21           
         98  traj.burn2.states:vr_7          c    -1.000000E+21     1.148444E-03     1.000000E+21           
         99  traj.burn2.states:vr_8          c    -1.000000E+21     1.148444E-03     1.000000E+21           
        100  traj.burn2.states:vt_0          c    -1.000000E+21     4.217795E-01     1.000000E+21           
        101  traj.burn2.states:vt_1          c    -1.000000E+21     4.510118E-01     1.000000E+21           
        102  traj.burn2.states:vt_2          c    -1.000000E+21     4.510118E-01     1.000000E+21           
        103  traj.burn2.states:vt_3          c    -1.000000E+21     4.812208E-01     1.000000E+21           
        104  traj.burn2.states:vt_4          c    -1.000000E+21     4.812208E-01     1.000000E+21           
        105  traj.burn2.states:vt_5          c    -1.000000E+21     5.123842E-01     1.000000E+21           
        106  traj.burn2.states:vt_6          c    -1.000000E+21     5.123842E-01     1.000000E+21           
        107  traj.burn2.states:vt_7          c    -1.000000E+21     5.444541E-01     1.000000E+21           
        108  traj.burn2.states:vt_8          c    -1.000000E+21     5.444541E-01     1.000000E+21           
        109  traj.burn2.states:accel_0       c    -1.000000E+21     1.174447E-01     1.000000E+21           
        110  traj.burn2.states:accel_1       c    -1.000000E+21     1.198378E-01     1.000000E+21           
        111  traj.burn2.states:accel_2       c    -1.000000E+21     1.198378E-01     1.000000E+21           
        112  traj.burn2.states:accel_3       c    -1.000000E+21     1.223305E-01     1.000000E+21           
        113  traj.burn2.states:accel_4       c    -1.000000E+21     1.223305E-01     1.000000E+21           
        114  traj.burn2.states:accel_5       c    -1.000000E+21     1.249291E-01     1.000000E+21           
        115  traj.burn2.states:accel_6       c    -1.000000E+21     1.249291E-01     1.000000E+21           
        116  traj.burn2.states:accel_7       c    -1.000000E+21     1.276404E-01     1.000000E+21           
        117  traj.burn2.states:accel_8       c    -1.000000E+21     1.276404E-01     1.000000E+21           
        118  traj.burn2.states:accel_9       c    -1.000000E+21     1.304721E-01     1.000000E+21           
        119  traj.burn2.states:deltav_0      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        120  traj.burn2.states:deltav_1      c    -1.000000E+21     2.714535E-01     1.000000E+21           
        121  traj.burn2.states:deltav_2      c    -1.000000E+21     2.714535E-01     1.000000E+21           
        122  traj.burn2.states:deltav_3      c    -1.000000E+21     3.023341E-01     1.000000E+21           
        123  traj.burn2.states:deltav_4      c    -1.000000E+21     3.023341E-01     1.000000E+21           
        124  traj.burn2.states:deltav_5      c    -1.000000E+21     3.338638E-01     1.000000E+21           
        125  traj.burn2.states:deltav_6      c    -1.000000E+21     3.338638E-01     1.000000E+21           
        126  traj.burn2.states:deltav_7      c    -1.000000E+21     3.660705E-01     1.000000E+21           
        127  traj.burn2.states:deltav_8      c    -1.000000E+21     3.660705E-01     1.000000E+21           
        128  traj.burn2.states:deltav_9      c    -1.000000E+21     3.989839E-01     1.000000E+21           
        129  traj.burn2.controls:u1_0        c    -9.000000E-01     1.545347E-02     9.000000E-01           
        130  traj.burn2.controls:u1_1        c    -9.000000E-01     1.315257E-02     9.000000E-01           
        131  traj.burn2.controls:u1_2        c    -9.000000E-01     1.113035E-02     9.000000E-01           
        132  traj.burn2.controls:u1_3        c    -9.000000E-01     1.113035E-02     9.000000E-01           
        133  traj.burn2.controls:u1_4        c    -9.000000E-01     9.453512E-03     9.000000E-01           
        134  traj.burn2.controls:u1_5        c    -9.000000E-01     8.188743E-03     9.000000E-01           
        135  traj.burn2.controls:u1_6        c    -9.000000E-01     8.188743E-03     9.000000E-01           
        136  traj.burn2.controls:u1_7        c    -9.000000E-01     7.310470E-03     9.000000E-01           
        137  traj.burn2.controls:u1_8        c    -9.000000E-01     6.793120E-03     9.000000E-01           
        138  traj.burn2.controls:u1_9        c    -9.000000E-01     6.793120E-03     9.000000E-01           
        139  traj.burn2.controls:u1_10       c    -9.000000E-01     6.670239E-03     9.000000E-01           
        140  traj.burn2.controls:u1_11       c    -9.000000E-01     6.975374E-03     9.000000E-01           
        141  traj.burn2.controls:u1_12       c    -9.000000E-01     6.975374E-03     9.000000E-01           
        142  traj.burn2.controls:u1_13       c    -9.000000E-01     7.640932E-03     9.000000E-01           
        143  traj.burn2.controls:u1_14       c    -9.000000E-01     8.599319E-03     9.000000E-01           
        144  traj.coast.t_initial_0          c     5.000000E-01     2.228030E+00     2.000000E+01           
        145  traj.coast.t_duration_0         c     1.000000E-02     1.477288E-01     1.000000E+00           
        146  traj.coast.states:r_0           c    -1.000000E+21     1.289870E+00     1.000000E+21           
        147  traj.coast.states:r_1           c    -1.000000E+21     1.826968E+00     1.000000E+21           
        148  traj.coast.states:r_2           c    -1.000000E+21     1.826968E+00     1.000000E+21           
        149  traj.coast.states:r_3           c    -1.000000E+21     2.302606E+00     1.000000E+21           
        150  traj.coast.states:r_4           c    -1.000000E+21     2.302606E+00     1.000000E+21           
        151  traj.coast.states:r_5           c    -1.000000E+21     2.652890E+00     1.000000E+21           
        152  traj.coast.states:r_6           c    -1.000000E+21     2.652890E+00     1.000000E+21           
        153  traj.coast.states:r_7           c    -1.000000E+21     2.878553E+00     1.000000E+21           
        154  traj.coast.states:r_8           c    -1.000000E+21     2.878553E+00     1.000000E+21           
        155  traj.coast.states:r_9           c    -1.000000E+21     2.985662E+00     1.000000E+21           
        156  traj.coast.states:theta_0       c    -1.000000E+21     2.165052E+00     1.000000E+21           
        157  traj.coast.states:theta_1       c    -1.000000E+21     2.959738E+00     1.000000E+21           
        158  traj.coast.states:theta_2       c    -1.000000E+21     2.959738E+00     1.000000E+21           
        159  traj.coast.states:theta_3       c    -1.000000E+21     3.397868E+00     1.000000E+21           
        160  traj.coast.states:theta_4       c    -1.000000E+21     3.397868E+00     1.000000E+21           
        161  traj.coast.states:theta_5       c    -1.000000E+21     3.699817E+00     1.000000E+21           
        162  traj.coast.states:theta_6       c    -1.000000E+21     3.699817E+00     1.000000E+21           
        163  traj.coast.states:theta_7       c    -1.000000E+21     3.941656E+00     1.000000E+21           
        164  traj.coast.states:theta_8       c    -1.000000E+21     3.941656E+00     1.000000E+21           
        165  traj.coast.states:theta_9       c    -1.000000E+21     4.156692E+00     1.000000E+21           
        166  traj.coast.states:vr_0          c    -1.000000E+21     3.247035E-01     1.000000E+21           
        167  traj.coast.states:vr_1          c    -1.000000E+21     3.587987E-01     1.000000E+21           
        168  traj.coast.states:vr_2          c    -1.000000E+21     3.587987E-01     1.000000E+21           
        169  traj.coast.states:vr_3          c    -1.000000E+21     2.804133E-01     1.000000E+21           
        170  traj.coast.states:vr_4          c    -1.000000E+21     2.804133E-01     1.000000E+21           
        171  traj.coast.states:vr_5          c    -1.000000E+21     1.941954E-01     1.000000E+21           
        172  traj.coast.states:vr_6          c    -1.000000E+21     1.941954E-01     1.000000E+21           
        173  traj.coast.states:vr_7          c    -1.000000E+21     1.120415E-01     1.000000E+21           
        174  traj.coast.states:vr_8          c    -1.000000E+21     1.120415E-01     1.000000E+21           
        175  traj.coast.states:vr_9          c    -1.000000E+21     3.335965E-02     1.000000E+21           
        176  traj.coast.states:vt_0          c    -1.000000E+21     9.761629E-01     1.000000E+21           
        177  traj.coast.states:vt_1          c    -1.000000E+21     6.893012E-01     1.000000E+21           
        178  traj.coast.states:vt_2          c    -1.000000E+21     6.893012E-01     1.000000E+21           
        179  traj.coast.states:vt_3          c    -1.000000E+21     5.469078E-01     1.000000E+21           
        180  traj.coast.states:vt_4          c    -1.000000E+21     5.469078E-01     1.000000E+21           
        181  traj.coast.states:vt_5          c    -1.000000E+21     4.746893E-01     1.000000E+21           
        182  traj.coast.states:vt_6          c    -1.000000E+21     4.746893E-01     1.000000E+21           
        183  traj.coast.states:vt_7          c    -1.000000E+21     4.374743E-01     1.000000E+21           
        184  traj.coast.states:vt_8          c    -1.000000E+21     4.374743E-01     1.000000E+21           
        185  traj.coast.states:vt_9          c    -1.000000E+21     4.217795E-01     1.000000E+21           
        186  traj.coast.states:accel_0       c    -1.000000E+21    -1.997352E-34     1.000000E+21           
        187  traj.coast.states:accel_1       c    -1.000000E+21    -2.275651E-34     1.000000E+21           
        188  traj.coast.states:accel_2       c    -1.000000E+21    -4.502437E-34     1.000000E+21           
        189  traj.coast.states:accel_3       c    -1.000000E+21    -4.176829E-34     1.000000E+21           
        190  traj.coast.states:accel_4       c    -1.000000E+21    -3.593210E-34     1.000000E+21           
        191  traj.coast.states:accel_5       c    -1.000000E+21    -6.149545E-34     1.000000E+21           
        192  traj.coast.states:accel_6       c    -1.000000E+21    -3.785084E-34     1.000000E+21           
        193  traj.coast.states:accel_7       c    -1.000000E+21    -2.970169E-34     1.000000E+21           
        194  traj.coast.states:deltav_0      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        195  traj.coast.states:deltav_1      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        196  traj.coast.states:deltav_2      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        197  traj.coast.states:deltav_3      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        198  traj.coast.states:deltav_4      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        199  traj.coast.states:deltav_5      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        200  traj.coast.states:deltav_6      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        201  traj.coast.states:deltav_7      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        202  traj.coast.states:deltav_8      c    -1.000000E+21     2.411959E-01     1.000000E+21           
        203  traj.coast.states:deltav_9      c    -1.000000E+21     2.411959E-01     1.000000E+21           

   Constraints (i - inequality, e - equality)
      Index  Name                                                    Type          Lower           Value           Upper    Status  Lagrange Multiplier
          0  traj.linkages.burn1:time_final|coast:time_initial          e   0.000000E+00    0.000000E+00    0.000000E+00               3.29178E-11
          1  traj.linkages.burn1:r_final|coast:r_initial                e   0.000000E+00    0.000000E+00    0.000000E+00              -6.46260E+01
          2  traj.linkages.burn1:theta_final|coast:theta_initial        e   0.000000E+00    0.000000E+00    0.000000E+00              -1.38544E-09
          3  traj.linkages.burn1:vr_final|coast:vr_initial              e   0.000000E+00    0.000000E+00    0.000000E+00              -2.24803E+01
          4  traj.linkages.burn1:vt_final|coast:vt_initial              e   0.000000E+00    0.000000E+00    0.000000E+00              -9.84946E+01
          5  traj.linkages.burn1:deltav_final|coast:deltav_initial      e   0.000000E+00    0.000000E+00    0.000000E+00               1.00000E+02
          6  traj.linkages.coast:time_final|burn2:time_initial          e   0.000000E+00    1.776357E-15    0.000000E+00              -6.19767E-12
          7  traj.linkages.coast:r_final|burn2:r_initial                e   0.000000E+00    0.000000E+00    0.000000E+00              -1.76856E+01
          8  traj.linkages.coast:theta_final|burn2:theta_initial        e   0.000000E+00    0.000000E+00    0.000000E+00              -7.74646E-10
          9  traj.linkages.coast:vr_final|burn2:vr_initial              e   0.000000E+00    0.000000E+00    0.000000E+00              -2.71580E+00
         10  traj.linkages.coast:vt_final|burn2:vt_initial              e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00155E+02
         11  traj.linkages.coast:deltav_final|burn2:deltav_initial      e   0.000000E+00    0.000000E+00    0.000000E+00               1.00000E+02
         12  traj.linkages.burn1:accel_final|burn2:accel_initial        e   0.000000E+00    0.000000E+00    0.000000E+00              -2.53581E-01
         13  traj.burn1.collocation_constraint.defects:r                e   0.000000E+00   -1.694810E-14    0.000000E+00               1.28817E+00
         14  traj.burn1.collocation_constraint.defects:r                e   0.000000E+00    7.111630E-15    0.000000E+00               1.29152E+00
         15  traj.burn1.collocation_constraint.defects:r                e   0.000000E+00    1.515086E-14    0.000000E+00               1.23041E+00
         16  traj.burn1.collocation_constraint.defects:r                e   0.000000E+00   -1.360486E-14    0.000000E+00               1.10376E+00
         17  traj.burn1.collocation_constraint.defects:r                e   0.000000E+00    3.710415E-15    0.000000E+00               9.43352E-01
         18  traj.burn1.collocation_constraint.defects:theta            e   0.000000E+00    4.947221E-15    0.000000E+00               2.17462E-11
         19  traj.burn1.collocation_constraint.defects:theta            e   0.000000E+00   -4.947221E-15    0.000000E+00               2.18368E-11
         20  traj.burn1.collocation_constraint.defects:theta            e   0.000000E+00   -4.947221E-15    0.000000E+00               2.13391E-11
         21  traj.burn1.collocation_constraint.defects:theta            e   0.000000E+00   -1.731527E-14    0.000000E+00               2.03210E-11
         22  traj.burn1.collocation_constraint.defects:theta            e   0.000000E+00    1.484166E-14    0.000000E+00               1.90093E-11
         23  traj.burn1.collocation_constraint.defects:vr               e   0.000000E+00    8.039234E-15    0.000000E+00              -6.92120E-02
         24  traj.burn1.collocation_constraint.defects:vr               e   0.000000E+00    1.051284E-14    0.000000E+00              -6.34585E-03
         25  traj.burn1.collocation_constraint.defects:vr               e   0.000000E+00    1.113125E-14    0.000000E+00               8.57711E-02
         26  traj.burn1.collocation_constraint.defects:vr               e   0.000000E+00    6.802428E-15    0.000000E+00               1.83634E-01
         27  traj.burn1.collocation_constraint.defects:vr               e   0.000000E+00    6.184026E-15    0.000000E+00               2.66192E-01
         28  traj.burn1.collocation_constraint.defects:vt               e   0.000000E+00    3.092013E-16    0.000000E+00               1.35529E+00
         29  traj.burn1.collocation_constraint.defects:vt               e   0.000000E+00    3.246614E-15    0.000000E+00               1.40601E+00
         30  traj.burn1.collocation_constraint.defects:vt               e   0.000000E+00    6.454577E-15    0.000000E+00               1.41796E+00
         31  traj.burn1.collocation_constraint.defects:vt               e   0.000000E+00   -3.092013E-15    0.000000E+00               1.39112E+00
         32  traj.burn1.collocation_constraint.defects:vt               e   0.000000E+00    2.473610E-15    0.000000E+00               1.34093E+00
         33  traj.burn1.collocation_constraint.defects:accel            e   0.000000E+00    6.570527E-18    0.000000E+00               1.48289E+01
         34  traj.burn1.collocation_constraint.defects:accel            e   0.000000E+00   -1.256130E-17    0.000000E+00               1.17352E+01
         35  traj.burn1.collocation_constraint.defects:accel            e   0.000000E+00   -6.763778E-18    0.000000E+00               7.42535E+00
         36  traj.burn1.collocation_constraint.defects:accel            e   0.000000E+00    2.705511E-18    0.000000E+00               3.46704E+00
         37  traj.burn1.collocation_constraint.defects:accel            e   0.000000E+00    8.116534E-18    0.000000E+00               9.70278E-01
         38  traj.burn1.collocation_constraint.defects:deltav           e   0.000000E+00   -3.092013E-18    0.000000E+00              -1.33333E+02
         39  traj.burn1.collocation_constraint.defects:deltav           e   0.000000E+00    0.000000E+00    0.000000E+00              -1.33333E+02
         40  traj.burn1.collocation_constraint.defects:deltav           e   0.000000E+00   -1.236805E-17    0.000000E+00              -1.33333E+02
         41  traj.burn1.collocation_constraint.defects:deltav           e   0.000000E+00    3.092013E-18    0.000000E+00              -1.33333E+02
         42  traj.burn1.collocation_constraint.defects:deltav           e   0.000000E+00    2.782812E-17    0.000000E+00              -1.33333E+02
         43  traj.burn1.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               9.73892E+01
         44  traj.burn1.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               9.54877E+01
         45  traj.burn1.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               8.82063E+01
         46  traj.burn1.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               7.69316E+01
         47  traj.burn1.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.63436E-09
         48  traj.burn1.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.61910E-09
         49  traj.burn1.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.56225E-09
         50  traj.burn1.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.47489E-09
         51  traj.burn1.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00              -3.32087E+00
         52  traj.burn1.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               2.74187E+00
         53  traj.burn1.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.01921E+01
         54  traj.burn1.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.71505E+01
         55  traj.burn1.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.03967E+02
         56  traj.burn1.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.06421E+02
         57  traj.burn1.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.05753E+02
         58  traj.burn1.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.02612E+02
         59  traj.burn1.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               1.02191E+01
         60  traj.burn1.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               7.23618E+00
         61  traj.burn1.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               3.95428E+00
         62  traj.burn1.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               1.43810E+00
         63  traj.burn1.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
         64  traj.burn1.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
         65  traj.burn1.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
         66  traj.burn1.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
         67  traj.burn1.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    9.894441E-19    0.000000E+00               5.04690E-03
         68  traj.burn1.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    0.000000E+00    0.000000E+00               1.13756E-03
         69  traj.burn1.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    0.000000E+00    0.000000E+00               6.27088E-06
         70  traj.burn1.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    2.572555E-17    0.000000E+00              -3.21095E-03
         71  traj.burn1.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00               2.73331E-06
         72  traj.burn1.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00              -3.57484E-06
         73  traj.burn1.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00              -1.98447E-06
         74  traj.burn1.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00               2.87365E-06
         75  traj.burn2.collocation_constraint.defects:r                e   0.000000E+00    1.424672E-14    0.000000E+00               2.35342E-01
         76  traj.burn2.collocation_constraint.defects:r                e   0.000000E+00    1.738807E-14    0.000000E+00               2.34619E-01
         77  traj.burn2.collocation_constraint.defects:r                e   0.000000E+00   -2.165766E-14    0.000000E+00               2.34151E-01
         78  traj.burn2.collocation_constraint.defects:r                e   0.000000E+00    4.184973E-14    0.000000E+00               2.33858E-01
         79  traj.burn2.collocation_constraint.defects:r                e   0.000000E+00   -3.649961E-14    0.000000E+00               2.33656E-01
         80  traj.burn2.collocation_constraint.defects:theta            e   0.000000E+00    2.300712E-14    0.000000E+00               9.32591E-12
         81  traj.burn2.collocation_constraint.defects:theta            e   0.000000E+00   -3.044019E-14    0.000000E+00               7.30781E-12
         82  traj.burn2.collocation_constraint.defects:theta            e   0.000000E+00   -2.265317E-14    0.000000E+00               5.26321E-12
         83  traj.burn2.collocation_constraint.defects:theta            e   0.000000E+00   -3.185601E-15    0.000000E+00               3.18509E-12
         84  traj.burn2.collocation_constraint.defects:theta            e   0.000000E+00    4.813798E-14    0.000000E+00               1.06945E-12
         85  traj.burn2.collocation_constraint.defects:vr               e   0.000000E+00    8.848893E-16    0.000000E+00               3.07736E-03
         86  traj.burn2.collocation_constraint.defects:vr               e   0.000000E+00   -8.848893E-16    0.000000E+00               2.22200E-03
         87  traj.burn2.collocation_constraint.defects:vr               e   0.000000E+00    0.000000E+00    0.000000E+00               1.71840E-03
         88  traj.burn2.collocation_constraint.defects:vr               e   0.000000E+00    4.866891E-15    0.000000E+00               1.57232E-03
         89  traj.burn2.collocation_constraint.defects:vr               e   0.000000E+00   -2.212223E-15    0.000000E+00               1.78995E-03
         90  traj.burn2.collocation_constraint.defects:vt               e   0.000000E+00   -5.132358E-14    0.000000E+00               1.33588E-01
         91  traj.burn2.collocation_constraint.defects:vt               e   0.000000E+00   -5.309336E-15    0.000000E+00               1.33637E-01
         92  traj.burn2.collocation_constraint.defects:vt               e   0.000000E+00   -4.070491E-14    0.000000E+00               1.33621E-01
         93  traj.burn2.collocation_constraint.defects:vt               e   0.000000E+00    5.309336E-14    0.000000E+00               1.33544E-01
         94  traj.burn2.collocation_constraint.defects:vt               e   0.000000E+00   -3.539557E-15    0.000000E+00               1.33407E-01
         95  traj.burn2.collocation_constraint.defects:accel            e   0.000000E+00   -1.327334E-18    0.000000E+00               2.96116E-01
         96  traj.burn2.collocation_constraint.defects:accel            e   0.000000E+00    1.305212E-17    0.000000E+00               2.06628E-01
         97  traj.burn2.collocation_constraint.defects:accel            e   0.000000E+00   -1.172478E-17    0.000000E+00               1.19542E-01
         98  traj.burn2.collocation_constraint.defects:accel            e   0.000000E+00    1.216723E-17    0.000000E+00               4.87446E-02
         99  traj.burn2.collocation_constraint.defects:accel            e   0.000000E+00   -6.857892E-18    0.000000E+00               7.52728E-03
        100  traj.burn2.collocation_constraint.defects:deltav           e   0.000000E+00   -2.477690E-17    0.000000E+00              -1.33333E+02
        101  traj.burn2.collocation_constraint.defects:deltav           e   0.000000E+00   -1.769779E-18    0.000000E+00              -1.33333E+02
        102  traj.burn2.collocation_constraint.defects:deltav           e   0.000000E+00    1.946756E-17    0.000000E+00              -1.33333E+02
        103  traj.burn2.collocation_constraint.defects:deltav           e   0.000000E+00   -3.893513E-17    0.000000E+00              -1.33333E+02
        104  traj.burn2.collocation_constraint.defects:deltav           e   0.000000E+00    4.601424E-17    0.000000E+00              -1.33333E+02
        105  traj.burn2.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               1.76199E+01
        106  traj.burn2.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               1.75762E+01
        107  traj.burn2.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               1.75486E+01
        108  traj.burn2.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               1.75312E+01
        109  traj.burn2.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               6.23765E-10
        110  traj.burn2.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               4.71413E-10
        111  traj.burn2.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               3.16811E-10
        112  traj.burn2.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.59545E-10
        113  traj.burn2.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.94361E+00
        114  traj.burn2.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.43334E+00
        115  traj.burn2.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.18894E+00
        116  traj.burn2.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.21500E+00
        117  traj.burn2.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.00218E+02
        118  traj.burn2.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.00229E+02
        119  traj.burn2.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.00194E+02
        120  traj.burn2.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               1.00114E+02
        121  traj.burn2.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               1.89136E-01
        122  traj.burn2.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               1.21151E-01
        123  traj.burn2.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               6.02455E-02
        124  traj.burn2.continuity_comp.defect_states:accel             e   0.000000E+00    0.000000E+00    0.000000E+00               1.66198E-02
        125  traj.burn2.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        126  traj.burn2.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        127  traj.burn2.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        128  traj.burn2.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        129  traj.burn2.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    5.663291E-16    0.000000E+00               2.70338E-07
        130  traj.burn2.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    1.769779E-15    0.000000E+00               1.83827E-07
        131  traj.burn2.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00    1.875965E-15    0.000000E+00               1.85294E-07
        132  traj.burn2.continuity_comp.defect_control_rates:u1_rate    e   0.000000E+00   -5.309336E-16    0.000000E+00               3.08323E-07
        133  traj.burn2.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00               2.36681E-07
        134  traj.burn2.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00              -1.03649E-07
        135  traj.burn2.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00               1.54730E-07
        136  traj.burn2.continuity_comp.defect_controls:u1              e   0.000000E+00    0.000000E+00    0.000000E+00              -2.35150E-07
        137  traj.coast.collocation_constraint.defects:r                e   0.000000E+00    8.200598E-15    0.000000E+00               6.51946E-01
        138  traj.coast.collocation_constraint.defects:r                e   0.000000E+00    8.200598E-15    0.000000E+00               4.09769E-01
        139  traj.coast.collocation_constraint.defects:r                e   0.000000E+00   -1.845135E-14    0.000000E+00               3.09746E-01
        140  traj.coast.collocation_constraint.defects:r                e   0.000000E+00    0.000000E+00    0.000000E+00               2.62939E-01
        141  traj.coast.collocation_constraint.defects:r                e   0.000000E+00   -5.125374E-15    0.000000E+00               2.41149E-01
        142  traj.coast.collocation_constraint.defects:theta            e   0.000000E+00   -8.200598E-15    0.000000E+00               1.79371E-11
        143  traj.coast.collocation_constraint.defects:theta            e   0.000000E+00    2.870209E-14    0.000000E+00               1.62687E-11
        144  traj.coast.collocation_constraint.defects:theta            e   0.000000E+00    2.460179E-14    0.000000E+00               1.46611E-11
        145  traj.coast.collocation_constraint.defects:theta            e   0.000000E+00   -3.690269E-14    0.000000E+00               1.30546E-11
        146  traj.coast.collocation_constraint.defects:theta            e   0.000000E+00    6.150449E-15    0.000000E+00               1.13273E-11
        147  traj.coast.collocation_constraint.defects:vr               e   0.000000E+00   -1.691373E-14    0.000000E+00               3.33082E-01
        148  traj.coast.collocation_constraint.defects:vr               e   0.000000E+00   -4.612836E-15    0.000000E+00               2.96282E-01
        149  traj.coast.collocation_constraint.defects:vr               e   0.000000E+00   -3.075224E-15    0.000000E+00               2.19622E-01
        150  traj.coast.collocation_constraint.defects:vr               e   0.000000E+00    1.025075E-15    0.000000E+00               1.43539E-01
        151  traj.coast.collocation_constraint.defects:vr               e   0.000000E+00    4.100299E-15    0.000000E+00               7.13580E-02
        152  traj.coast.collocation_constraint.defects:vt               e   0.000000E+00   -2.460179E-14    0.000000E+00               1.24448E+00
        153  traj.coast.collocation_constraint.defects:vt               e   0.000000E+00    1.025075E-14    0.000000E+00               1.22184E+00
        154  traj.coast.collocation_constraint.defects:vt               e   0.000000E+00    5.125374E-16    0.000000E+00               1.25922E+00
        155  traj.coast.collocation_constraint.defects:vt               e   0.000000E+00   -2.818956E-15    0.000000E+00               1.30095E+00
        156  traj.coast.collocation_constraint.defects:vt               e   0.000000E+00    7.816195E-15    0.000000E+00               1.32831E+00
        157  traj.coast.collocation_constraint.defects:accel            e   0.000000E+00   -1.498014E-34    0.000000E+00              -1.86929E+01
        158  traj.coast.collocation_constraint.defects:accel            e   0.000000E+00   -1.670090E-34    0.000000E+00              -2.69840E+00
        159  traj.coast.collocation_constraint.defects:accel            e   0.000000E+00    4.377140E-35    0.000000E+00               1.12548E+01
        160  traj.coast.collocation_constraint.defects:accel            e   0.000000E+00    1.773346E-34    0.000000E+00               1.90095E+01
        161  traj.coast.collocation_constraint.defects:accel            e   0.000000E+00    2.227627E-34    0.000000E+00               2.15411E+01
        162  traj.coast.collocation_constraint.defects:deltav           e   0.000000E+00   -2.775558E-17    0.000000E+00              -1.33333E+02
        163  traj.coast.collocation_constraint.defects:deltav           e   0.000000E+00    3.754946E-34    0.000000E+00              -1.33333E+02
        164  traj.coast.collocation_constraint.defects:deltav           e   0.000000E+00    4.304471E-34    0.000000E+00              -1.33333E+02
        165  traj.coast.collocation_constraint.defects:deltav           e   0.000000E+00    2.775558E-17    0.000000E+00              -1.33333E+02
        166  traj.coast.collocation_constraint.defects:deltav           e   0.000000E+00   -2.775558E-17    0.000000E+00              -1.33333E+02
        167  traj.coast.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               3.70881E+01
        168  traj.coast.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               2.60159E+01
        169  traj.coast.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               2.10638E+01
        170  traj.coast.continuity_comp.defect_states:r                 e   0.000000E+00    0.000000E+00    0.000000E+00               1.86759E+01
        171  traj.coast.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.28272E-09
        172  traj.coast.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.15987E-09
        173  traj.coast.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               1.03934E-09
        174  traj.coast.continuity_comp.defect_states:theta             e   0.000000E+00    0.000000E+00    0.000000E+00               9.14324E-10
        175  traj.coast.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               2.46701E+01
        176  traj.coast.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.93854E+01
        177  traj.coast.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               1.35586E+01
        178  traj.coast.continuity_comp.defect_states:vr                e   0.000000E+00    0.000000E+00    0.000000E+00               8.01335E+00
        179  traj.coast.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               9.12968E+01
        180  traj.coast.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               9.28067E+01
        181  traj.coast.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               9.61260E+01
        182  traj.coast.continuity_comp.defect_states:vt                e   0.000000E+00    0.000000E+00    0.000000E+00               9.88357E+01
        183  traj.coast.continuity_comp.defect_states:accel             e   0.000000E+00   -2.782983E-35    0.000000E+00              -8.43707E+00
        184  traj.coast.continuity_comp.defect_states:accel             e   0.000000E+00    3.256083E-35    0.000000E+00               3.91591E+00
        185  traj.coast.continuity_comp.defect_states:accel             e   0.000000E+00   -2.556335E-34    0.000000E+00               1.21274E+01
        186  traj.coast.continuity_comp.defect_states:accel             e   0.000000E+00    8.149142E-35    0.000000E+00               1.57149E+01
        187  traj.coast.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        188  traj.coast.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        189  traj.coast.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02
        190  traj.coast.continuity_comp.defect_states:deltav            e   0.000000E+00    0.000000E+00    0.000000E+00              -1.00000E+02


   Exit Status
      Inform  Description
           0  Solve Succeeded
--------------------------------------------------------------------------------
/usr/share/miniconda/envs/test/lib/python3.13/site-packages/openmdao/visualization/opt_report/opt_report.py:611: UserWarning: Attempting to set identical low and high ylims makes transformation singular; automatically expanding.
  ax.set_ylim([ymin_plot, ymax_plot])
Simulating trajectory traj
Done simulating trajectory traj
Problem: problem
Driver:  pyOptSparseDriver
  success     : True
  iterations  : 30
  runtime     : 3.7700E+00 s
  model_evals : 30
  model_time  : 1.2103E-01 s
  deriv_evals : 29
  deriv_time  : 2.0588E+00 s
  exit_status : SUCCESS

Plotting the results#

The following code cell reads the resulting state, time, and control histories from the solution and simulation record files and plots them. It is collapsed by default but can be viewed by expanding it with the button to the right.

Hide code cell source

sol = om.CaseReader(p.get_outputs_dir() / 'dymos_solution.db').get_case('final')
sim = om.CaseReader(traj.sim_prob.get_outputs_dir() / 'dymos_simulation.db').get_case('final')

fig = plt.figure(figsize=(12, 6))
fig.suptitle('Two Burn Orbit Raise Solution')
ax_u1 = plt.subplot2grid((2, 2), (0, 0))
ax_deltav = plt.subplot2grid((2, 2), (1, 0))
ax_xy = plt.subplot2grid((2, 2), (0, 1), rowspan=2)

span = np.linspace(0, 2 * np.pi, 100)
ax_xy.plot(np.cos(span), np.sin(span), 'k--', lw=1)
ax_xy.plot(3 * np.cos(span), 3 * np.sin(span), 'k--', lw=1)
ax_xy.set_xlim(-4.5, 4.5)
ax_xy.set_ylim(-4.5, 4.5)

ax_xy.set_xlabel('x ($R_e$)')
ax_xy.set_ylabel('y ($R_e$)')
ax_xy.set_aspect('equal')
ax_xy.plot([0], [0], '*', color='gold')

ax_u1.set_ylabel('$u_1$ ($deg$)')
ax_u1.grid(True)

ax_deltav.set_xlabel('time ($TU$)')
ax_deltav.set_ylabel('${\Delta}v$ ($DU/TU$)')
ax_deltav.grid(True)

t_sol = dict((phs, sol.get_val(f'traj.{phs}.timeseries.time'.format(phs)))
             for phs in ['burn1', 'coast', 'burn2'])
x_sol = dict((phs, sol.get_val(f'traj.{phs}.timeseries.pos_x'.format(phs)))
             for phs in ['burn1', 'coast', 'burn2'])
y_sol = dict((phs, sol.get_val(f'traj.{phs}.timeseries.pos_y'.format(phs)))
             for phs in ['burn1', 'coast', 'burn2'])
dv_sol = dict((phs, sol.get_val(f'traj.{phs}.timeseries.deltav'.format(phs)))
              for phs in ['burn1', 'coast', 'burn2'])
u1_sol = dict((phs, sol.get_val(f'traj.{phs}.timeseries.u1'.format(phs), units='deg'))
              for phs in ['burn1', 'burn2'])

t_exp = dict((phs, sim.get_val(f'traj.{phs}.timeseries.time'))
             for phs in ['burn1', 'coast', 'burn2'])
x_exp = dict((phs, sim.get_val(f'traj.{phs}.timeseries.pos_x'))
             for phs in ['burn1', 'coast', 'burn2'])
y_exp = dict((phs, sim.get_val(f'traj.{phs}.timeseries.pos_y'))
             for phs in ['burn1', 'coast', 'burn2'])
dv_exp = dict((phs, sim.get_val(f'traj.{phs}.timeseries.deltav'))
              for phs in ['burn1', 'coast', 'burn2'])
u1_exp = dict((phs, sim.get_val(f'traj.{phs}.timeseries.u1',
                                units='deg'))
              for phs in ['burn1', 'burn2'])

for phs in ['burn1', 'coast', 'burn2']:
    try:
        ax_u1.plot(t_exp[phs], u1_exp[phs], '-', marker=None, color='C0')
        ax_u1.plot(t_sol[phs], u1_sol[phs], 'o', mfc='C1', mec='C1', ms=3)
    except KeyError:
        pass

    ax_deltav.plot(t_exp[phs], dv_exp[phs], '-', marker=None, color='C0')
    ax_deltav.plot(t_sol[phs], dv_sol[phs], 'o', mfc='C1', mec='C1', ms=3)

    exp_plt, = ax_xy.plot(x_exp[phs], y_exp[phs], '-', marker=None, color='C0', label='explicit')
    imp_plt, = ax_xy.plot(x_sol[phs], y_sol[phs], 'o', mfc='C1', mec='C1', ms=3, label='implicit')

    
ax_xy.legend(handles=[imp_plt, exp_plt], labels=['solution', 'simulation'], loc='lower center', ncol=2)
    
plt.show()
<>:25: SyntaxWarning: invalid escape sequence '\D'
<>:25: SyntaxWarning: invalid escape sequence '\D'
/tmp/ipykernel_3829/2573435747.py:25: SyntaxWarning: invalid escape sequence '\D'
  ax_deltav.set_ylabel('${\Delta}v$ ($DU/TU$)')
../../_images/2e06b1769abf2680236415011f6077510e3d5ddad3c83b77cca69398a3650d29.png

References#

[EC91]

Paul J Enright and Brace A Conway. Optimal finite-thrust spacecraft trajectories using collocation and nonlinear programming. Journal of Guidance, Control, and Dynamics, 14(5):981–985, 1991.