parameters: (self, t0, x0, l0, tf, xf)
docstring: Sets the departure and arrival boundary conditions of the trajectory.
  
          This instance method sets the departure time `t0`, departure state `x0`,
          departure costate `l0`, arrival time `tf`, arrival state `xf`.
  
          Args:
              - t0 (``pykep.epoch``): Departure time [mjd2000].
              - x0 (``pykep.sims_flanagan.sc_state``): Cartesian departure state [m, m, m, m/s, m/s, m/s, kg].
              - l0 (``numpy.ndarray``, ``list``, ``tuple``): Costate variables [ND, ND, ND, ND, ND, ND, ND].
              - tf (``pykep.epoch``): Arrival time [mjd2000].
              - xf (``pykep.epoch``): Cartesian arrival state [m, m, m, m/s, m/s, m/s, kg].
  
          Raises:
              - TypeError: If either ``t0`` or ``tf`` is not supplied as an instance of ``pykep.epoch``.
              - TypeError: If either ``x0`` or ``xf`` is not supllied as an instance of ``pykep.sims_flanagan.sc_state``.
              - TypeError: If ``l0`` is neither supllied as a ``numpy.ndarray``, ``list``, nor ``tuple``.
  
          .. note::
              If ``args`` were not supplied in ``__init__``, ``set`` must be called before calling ``mismatch_constraints``.
  
          Examples:
              >>> l = leg() # t0, x0, l0, tf, xf not set yet
              >>> l.set(t0, x0, l0, tf, xf) # now they're set
docstring_summary: Sets the departure and arrival boundary conditions of the trajectory.
docstring_tokens: Sets the departure and arrival boundary conditions of the trajectory .
function: def set(self, t0, x0, l0, tf, xf):
          """Sets the departure and arrival boundary conditions of the trajectory.
  
          This instance method sets the departure time `t0`, departure state `x0`,
          departure costate `l0`, arrival time `tf`, arrival state `xf`.
  
          Args:
              - t0 (``pykep.epoch``): Departure time [mjd2000].
              - x0 (``pykep.sims_flanagan.sc_state``): Cartesian departure state [m, m, m, m/s, m/s, m/s, kg].
              - l0 (``numpy.ndarray``, ``list``, ``tuple``): Costate variables [ND, ND, ND, ND, ND, ND, ND].
              - tf (``pykep.epoch``): Arrival time [mjd2000].
              - xf (``pykep.epoch``): Cartesian arrival state [m, m, m, m/s, m/s, m/s, kg].
  
          Raises:
              - TypeError: If either ``t0`` or ``tf`` is not supplied as an instance of ``pykep.epoch``.
              - TypeError: If either ``x0`` or ``xf`` is not supllied as an instance of ``pykep.sims_flanagan.sc_state``.
              - TypeError: If ``l0`` is neither supllied as a ``numpy.ndarray``, ``list``, nor ``tuple``.
  
          .. note::
              If ``args`` were not supplied in ``__init__``, ``set`` must be called before calling ``mismatch_constraints``.
  
          Examples:
              >>> l = leg() # t0, x0, l0, tf, xf not set yet
              >>> l.set(t0, x0, l0, tf, xf) # now they're set
          """
  
          # check inputs
          if not all([isinstance(t, epoch) for t in [t0, tf]]):
              raise TypeError("t0 and tf must be instances of pykep.epoch.")
          elif not t0.mjd2000 < tf.mjd2000:
              raise ValueError("t0 must be less than tf.")
          elif not all([isinstance(state, sc_state) for state in [x0, xf]]):
              raise TypeError(
                  "x0 and xf must be instances of pykep.sims_flanagan.sc_state.")
          elif not (isinstance(l0, tuple) or isinstance(l0, list) or isinstance(l0, np.ndarray)):
              raise TypeError(
                  "l0 must be either a tuple, list, or numpy.ndarray.")
          elif len(l0) != 7:
              raise TypeError("Costate vector must be 7-dimensional.")
          else:
  
              # departure
              self.t0 = float(t0.mjd2000)
              self.x0 = np.asarray(x0.get(), np.float64)
              self.l0 = np.asarray(l0, np.float64)
  
              # arrival
              self.tf = float(tf.mjd2000)
              self.xf = np.asarray(xf.get(), np.float64)
function_tokens: def set ( self , t0 , x0 , l0 , tf , xf ) : # check inputs if not all ( [ isinstance ( t , epoch ) for t in [ t0 , tf ] ] ) : raise TypeError ( "t0 and tf must be instances of pykep.epoch." ) elif not t0 . mjd2000 < tf . mjd2000 : raise ValueError ( "t0 must be less than tf." ) elif not all ( [ isinstance ( state , sc_state ) for state in [ x0 , xf ] ] ) : raise TypeError ( "x0 and xf must be instances of pykep.sims_flanagan.sc_state." ) elif not ( isinstance ( l0 , tuple ) or isinstance ( l0 , list ) or isinstance ( l0 , np . ndarray ) ) : raise TypeError ( "l0 must be either a tuple, list, or numpy.ndarray." ) elif len ( l0 ) != 7 : raise TypeError ( "Costate vector must be 7-dimensional." ) else : # departure self . t0 = float ( t0 . mjd2000 ) self . x0 = np . asarray ( x0 . get ( ) , np . float64 ) self . l0 = np . asarray ( l0 , np . float64 ) # arrival self . tf = float ( tf . mjd2000 ) self . xf = np . asarray ( xf . get ( ) , np . float64 )