parameters: (self, x)
docstring: pretty(x)
  
          Args:
              - x (``list``, ``tuple``, ``numpy.ndarray``): Decision chromosome, e.g. (``pygmo.population.champion_x``).
  
          Prints human readable information on the trajectory represented by the decision vector x
docstring_summary: pretty(x)
docstring_tokens: pretty ( x )
function: def pretty(self, x):
          """pretty(x)
  
          Args:
              - x (``list``, ``tuple``, ``numpy.ndarray``): Decision chromosome, e.g. (``pygmo.population.champion_x``).
  
          Prints human readable information on the trajectory represented by the decision vector x
          """
          DV, lambert_legs, T, b_legs, b_ep = self._compute_dvs(x)
          ep = np.insert(T, 0, x[0])  # [t0, T1, T2 ...]
          ep = np.cumsum(ep)  # [t0, t1, t2, ...]
          b_i = 0
          Vinfx, Vinfy, Vinfz = [
              a - b for a, b in zip(b_legs[b_i][1], self._seq[0].eph(ep[0])[1])
          ]
        
          # we assume that the lambert_problem_multirev class is used
          lambert_indices = [lam.best_i for lam in lambert_legs]
          assert len(lambert_indices) == self.n_legs
  
          print("Multiple Gravity Assist (MGA) problem: ")
          print("Planet sequence: ", [pl.name for pl in self._seq])
  
          print("Departure: ", self._seq[0].name)
          print("\tEpoch: ", ep[0], " [mjd2000]")
          print("\tSpacecraft velocity: ", b_legs[0][1], "[m/s]")
          print("\tLaunch velocity: ", [Vinfx, Vinfy, Vinfz], "[m/s]")
          _, _, transfer_i, _, _, _ = ic2par(*(b_legs[0]), self._common_mu)
          print("\tOutgoing Inclination:", transfer_i * RAD2DEG, "[deg]")
          print("\tNumber of Revolutions:", int((lambert_indices[0] + 1) / 2))
          print("\tLambert Index:", int(lambert_indices[0]))
          b_i += 2
  
          assert len(DV) == len(self._seq)
          for i in range(1, len(self._seq) - 1):
              pl = self._seq[i]
              e = ep[i]
              dv = DV[i - 1]
              leg = b_legs[b_i]
              print("Fly-by: ", pl.name)
              print("\tEpoch: ", e, " [mjd2000]")
              print("\tDSM at ", b_ep[b_i + 1])
              print("\tDV: ", dv, "[m/s]")
              eph = pl.eph(e)
              assert np.linalg.norm([a - b for a, b in zip(leg[0], eph[0])]) < 0.1
              _, _, transfer_i, _, _, _ = ic2par(eph[0], leg[1], self._common_mu)
              print("\tOutgoing Inclination:", transfer_i * RAD2DEG, "[deg]")
              print("\tNumber of Revolutions:", int((lambert_indices[i] + 1) / 2))
              print("\tLambert Index:", int(lambert_indices[i]))
              b_i += 2
  
          print("Final Fly-by: ", self._seq[-1].name)
          print("\tEpoch: ", ep[-1], " [mjd2000]")
          print("\tSpacecraft velocity: ", lambert_legs[-1].get_v2()[0], "[m/s]")
          print("\tBeta: ", x[-2])
          print("\tr_p: ", x[-1])
  
          print("Resulting Solar orbit:")
          r_rot = b_legs[-1][0]
          v_rot = b_legs[-1][1]
  
          a, e, i, W, w, E = ic2par(r_rot, v_rot, self._common_mu)
          print("Perihelion: ", (a * (1 - e)) / AU, " AU")
          print("Aphelion: ", (a * (1 + e)) / AU, " AU")
          print("Inclination: ", i * RAD2DEG, " degrees")
  
          print("Time of flights: ", T, "[days]")
function_tokens: def pretty ( self , x ) : DV , lambert_legs , T , b_legs , b_ep = self . _compute_dvs ( x ) ep = np . insert ( T , 0 , x [ 0 ] ) # [t0, T1, T2 ...] ep = np . cumsum ( ep ) # [t0, t1, t2, ...] b_i = 0 Vinfx , Vinfy , Vinfz = [ a - b for a , b in zip ( b_legs [ b_i ] [ 1 ] , self . _seq [ 0 ] . eph ( ep [ 0 ] ) [ 1 ] ) ] # we assume that the lambert_problem_multirev class is used lambert_indices = [ lam . best_i for lam in lambert_legs ] assert len ( lambert_indices ) == self . n_legs print ( "Multiple Gravity Assist (MGA) problem: " ) print ( "Planet sequence: " , [ pl . name for pl in self . _seq ] ) print ( "Departure: " , self . _seq [ 0 ] . name ) print ( "\tEpoch: " , ep [ 0 ] , " [mjd2000]" ) print ( "\tSpacecraft velocity: " , b_legs [ 0 ] [ 1 ] , "[m/s]" ) print ( "\tLaunch velocity: " , [ Vinfx , Vinfy , Vinfz ] , "[m/s]" ) _ , _ , transfer_i , _ , _ , _ = ic2par ( * ( b_legs [ 0 ] ) , self . _common_mu ) print ( "\tOutgoing Inclination:" , transfer_i * RAD2DEG , "[deg]" ) print ( "\tNumber of Revolutions:" , int ( ( lambert_indices [ 0 ] + 1 ) / 2 ) ) print ( "\tLambert Index:" , int ( lambert_indices [ 0 ] ) ) b_i += 2 assert len ( DV ) == len ( self . _seq ) for i in range ( 1 , len ( self . _seq ) - 1 ) : pl = self . _seq [ i ] e = ep [ i ] dv = DV [ i - 1 ] leg = b_legs [ b_i ] print ( "Fly-by: " , pl . name ) print ( "\tEpoch: " , e , " [mjd2000]" ) print ( "\tDSM at " , b_ep [ b_i + 1 ] ) print ( "\tDV: " , dv , "[m/s]" ) eph = pl . eph ( e ) assert np . linalg . norm ( [ a - b for a , b in zip ( leg [ 0 ] , eph [ 0 ] ) ] ) < 0.1 _ , _ , transfer_i , _ , _ , _ = ic2par ( eph [ 0 ] , leg [ 1 ] , self . _common_mu ) print ( "\tOutgoing Inclination:" , transfer_i * RAD2DEG , "[deg]" ) print ( "\tNumber of Revolutions:" , int ( ( lambert_indices [ i ] + 1 ) / 2 ) ) print ( "\tLambert Index:" , int ( lambert_indices [ i ] ) ) b_i += 2 print ( "Final Fly-by: " , self . _seq [ - 1 ] . name ) print ( "\tEpoch: " , ep [ - 1 ] , " [mjd2000]" ) print ( "\tSpacecraft velocity: " , lambert_legs [ - 1 ] . get_v2 ( ) [ 0 ] , "[m/s]" ) print ( "\tBeta: " , x [ - 2 ] ) print ( "\tr_p: " , x [ - 1 ] ) print ( "Resulting Solar orbit:" ) r_rot = b_legs [ - 1 ] [ 0 ] v_rot = b_legs [ - 1 ] [ 1 ] a , e , i , W , w , E = ic2par ( r_rot , v_rot , self . _common_mu ) print ( "Perihelion: " , ( a * ( 1 - e ) ) / AU , " AU" ) print ( "Aphelion: " , ( a * ( 1 + e ) ) / AU , " AU" ) print ( "Inclination: " , i * RAD2DEG , " degrees" ) print ( "Time of flights: " , T , "[days]" )