Surrogate Subpackage

Inheritance Diagram

Inheritance diagram of latom.surrogate.om_metamodels, latom.surrogate.om_metamodels_llo2heo, latom.surrogate.smt_surrogates

Modules List

latom.surrogate.om_metamodels

@authors: Alberto FOSSA’ Giuliana Elena MICELI

latom.surrogate.om_metamodels_llo2heo

@authors: Alberto FOSSA’ Giuliana Elena MICELI

latom.surrogate.smt_surrogates

@authors: Alberto FOSSA’ Giuliana Elena MICELI

Documentation

@authors: Alberto FOSSA’ Giuliana Elena MICELI

class latom.surrogate.om_metamodels.MetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: object

MetaModel class sets up an OpenMDAO Problem object and a MetaModelStructuredComp subsystem to compute and exploit a surrogate model for different transfer trajectories.

The model inputs are the spacecraft specific impulse Isp and initial thrust/weight ratio twr while the model output is the propellant fraction m_prop.

Parameters
  • distributed (bool, optional) – True if the component has variables that are distributed across multiple processes, False otherwise. Default is False

  • extrapolate (bool, optional) – Sets whether extrapolation should be performed when an input is out of bounds. Default is False

  • method (str, optional) – Spline interpolation method to use for all outputs among cubic, slinear, lagrange2, lagrange3, akima, scipy_cubic, scipy_slinear, scipy_quintic. Default is scipy_cubic

  • training_data_gradients (bool, optional) – Sets whether gradients with respect to output training data should be computed. Default is True

  • vec_size (int, optional) – Number of points to evaluate at once. Default is 1

  • rec_file (str or None, optional) – Name of the file in latom.data.metamodels where the meta model is stored or None if a new model has to be built. Default is None

Variables
  • mm (MetaModelStructuredComp) – OpenMDAO MetaModelStructuredComp object

  • p (Problem) – OpenMDAO Problem object

  • twr (ndarray) – List of thrust/weight ratios in the sampling grid [-]

  • Isp (ndarray) – List of specific impulses in the sampling grid [s]

  • m_prop (ndarray) – Propellant fraction in all training points [-]

  • failures (ndarray) – Matrix of boolean to verify all the NLP solutions have properly converged

  • limits (ndarray) – Sampling grid limits in terms of minimum and maximum Isp and twr

  • d (dict) – Dictionary that contain all the information to reconstruct a meta model

static abs_path(rec_file)[source]

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

load(rec_file)[source]

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

save(rec_file)[source]

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

compute_grid(twr_lim, isp_lim, nb_samp)[source]

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

setup()[source]

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

plot(nb_lines=50, kind='prop', log_scale=False)[source]

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

class latom.surrogate.om_metamodels.TwoDimAscConstMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimAscConstMetaModel implements MetaModel for a two-dimensional ascent trajectory at constant thrust.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • theta (float) – Guessed spawn angle [rad]

  • tof (float) – Guessed time of flight [s]

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimAscVarMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimAscVarMetaModel implements MetaModel for a two-dimensional ascent trajectory with variable thrust.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimAscVToffMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimAscVToffMetaModel implements MetaModel for a two-dimensional ascent trajectory with variable thrust and constrained minimum safe altitude.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • alt_safe (float) – Asymptotic minimum safe altitude [m]

  • slope (float) – Minimum safe altitude slope close to the launch site [-]

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimDescConstMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimDescConstMetaModel implements MetaModel for a two-dimensional descent trajectory at constant thrust.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • alt_p (float) – Periapsis altitude where the final powered descent is initiated [m]

  • theta (float) – Guessed spawn angle [rad]

  • tof (float) – Guessed time of flight [s]

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimDescVarMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimDescVarMetaModel implements MetaModel for a two-dimensional descent trajectory with variable thrust.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimDescVLandMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimDescVLandMetaModel implements MetaModel for a two-dimensional descent trajectory with variable thrust and constrained minimum safe altitude.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • alt_safe (float) – Asymptotic minimum safe altitude [m]

  • slope (float) – Minimum safe altitude slope close to the launch site [-]

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels.TwoDimDescTwoPhasesMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • alt_p (float) – Periapsis altitude where the powered descent is initiated [m]

  • alt_switch (float) – Altitude at which the final vertical descent is triggered [m]

  • theta (float) – Guessed spawn angle [rad]

  • tof (float) – Guessed time of flight [s]

  • fix (str) – alt if the vertical phase is triggered at a fixed altitude, time for a fixed time-to-go

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

@authors: Alberto FOSSA’ Giuliana Elena MICELI

class latom.surrogate.om_metamodels_llo2heo.TwoDimLLO2ApoMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimLLO2ApoMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • rp (float) – HEO periapsis radius [m]

  • t (float) – HEO period [s]

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

class latom.surrogate.om_metamodels_llo2heo.TwoDimLLO2ApoContinuationMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDimLLO2ApoContinuationMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius.

For each Isp value in the sampling grid, the training data are computed using a continuation method for decreasing twr values.

Parameters
  • distributed (bool, optional) – True if the component has variables that are distributed across multiple processes, False otherwise. Default is False

  • extrapolate (bool, optional) – Sets whether extrapolation should be performed when an input is out of bounds. Default is False

  • method (str, optional) – Spline interpolation method to use for all outputs among cubic, slinear, lagrange2, lagrange3, akima, scipy_cubic, scipy_slinear, scipy_quintic. Default is scipy_cubic

  • training_data_gradients (bool, optional) – Sets whether gradients with respect to output training data should be computed. Default is True

  • vec_size (int, optional) – Number of points to evaluate at once. Default is 1

  • rec_file (str or None, optional) – Name of the file in latom.data.metamodels where the meta model is stored or None if a new model has to be built. Default is None

Variables

energy (ndarray) – Spacecraft specific energy at the end of the transfer on all training points [m^2/s^2]

load(rec_file)[source]

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

save(rec_file)[source]

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

compute_grid(twr_lim, isp_lim, nb_samp)[source]

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

Other Parameters
  • rp (float) – HEO periapsis radius [m]

  • t (float) – HEO period [s]

  • log_scale (bool) – True if twr values are given in logarithmic scale as log(twr)

plot(nb_lines=50, kind='prop', log_scale=False)[source]

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

class latom.surrogate.om_metamodels_llo2heo.TwoDim3PhasesLLO2HEOMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]

Bases: latom.surrogate.om_metamodels.MetaModel

TwoDim3PhasesLLO2HEOMetaModel implements MetaModel for a two-dimensional transfer from an LLO to an HEO modeled as a three-phases trajectory.

static solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]

Solve the NLP for the i-th twr and k-th Isp values.

Parameters
  • body (Primary) – Central attracting body

  • sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int) – Number of segments in which the phase is discretized

  • order (int) – Transcription order within the phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

Other Parameters
  • rp (float) – HEO periapsis radius [m]

  • t (float) – HEO period [s]

  • phase_name (iterable) – Names for the three phases within OpenMDAO

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

static abs_path(rec_file)

Returns the absolute path of the file where the meta model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

Returns

fid – Full path where the meta model is stored

Return type

str

compute_grid(twr_lim, isp_lim, nb_samp)

Computes a regular sampling grid in the input space twr, Isp.

Parameters
  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

load(rec_file)

Loads stored data to instantiate a meta model.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

plot(nb_lines=50, kind='prop', log_scale=False)

Plot the response surface corresponding to the loaded meta model.

Parameters
  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

  • log_scale (bool, optional) – Set to True if the twr values are in logarithmic scale. Default is False

sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Number of samples along the twr and Isp axes

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is None

  • rec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is None

save(rec_file)

Saves data corresponding to a meta model instance.

Parameters

rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored

setup()

Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.

@authors: Alberto FOSSA’ Giuliana Elena MICELI

class latom.surrogate.smt_surrogates.SurrogateModel(train_method, rec_file=None)[source]

Bases: object

SurrogateModel class sets up a surrogate model object defined in the Surrogate Modelling Toolbox (SMT) 2 package to compute and exploit data for different transfer trajectories.

The model inputs are the spacecraft specific impulse Isp and initial thrust/weight ratio twr while the model output is the propellant fraction m_prop.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • rec_file (str or None, optional) – Name of the file in latom.data.smt where the surrogate model is stored or None if a new model has to be built. Default is None

Variables
  • limits (ndarray) – Sampling grid limits in terms of minimum and maximum Isp and twr

  • x_samp (ndarray) – Sampling points as Isp, twr tuples

  • m_prop (ndarray) – Propellant fraction on training points [-]

  • failures (ndarray) – Matrix of boolean to verify each NLP solution has converged

  • d (dict) – Dictionary that contain all the information to reconstruct a meta model

  • trained (IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB or RMTC) – Surrogate model object defined by SMT

References

2

M. A. Bouhlel and J. T. Hwang and N. Bartoli and R. Lafage and J. Morlier and J. R. R. A. Martins. A Python surrogate modeling framework with derivatives. Advances in Engineering Software, 2019.

static abs_path(rec_file)[source]

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

load(rec_file)[source]

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

save(rec_file)[source]

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')[source]

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

static solve(nlp, i)[source]

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)[source]

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

evaluate(isp, twr)[source]

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

compute_matrix(nb_eval=None)[source]

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

plot(nb_eval=None, nb_lines=50, kind='prop')[source]

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

class latom.surrogate.smt_surrogates.TwoDimAscConstSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimAscConstSurrogate implements SurrogateModel for a two-dimensional ascent trajectory at constant thrust.

sampling(body, isp_lim, twr_lim, alt, theta, tof, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='lower')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • theta (float) – Guessed spawn angle [rad]

  • tof (float) – Guessed time of flight [s]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is lower

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimAscVarSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimAscVarSurrogate implements SurrogateModel for a two-dimensional ascent trajectory with variable thrust.

sampling(body, isp_lim, twr_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='lower')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is lower

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimAscVToffSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimAscVToffSurrogate implements SurrogateModel for a two-dimensional ascent trajectory with variable thrust and minimum safe altitude.

sampling(body, isp_lim, twr_lim, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='lower')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • alt_safe (float) – Asymptotic minimum safe altitude [m]

  • slope (float) – Minimum safe altitude slope close to the launch site [-]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is lower

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimDescConstSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimDescConstSurrogate implements SurrogateModel for a two-dimensional descent trajectory at constant thrust.

sampling(body, isp_lim, twr_lim, alt, alt_p, theta, tof, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='upper')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • alt_p (float) – Periapsis altitude where the final powered descent is initiated [m]

  • theta (float) – Guessed spawn angle [rad]

  • tof (float) – Guessed time of flight [s]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is upper

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimDescVarSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimDescVarSurrogate implements SurrogateModel for a two-dimensional descent trajectory with variable thrust.

sampling(body, isp_lim, twr_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='upper')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is upper

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimDescVLandSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimDescVLandSurrogate implements SurrogateModel for a two-dimensional descent trajectory with variable thrust and constrained minimum altitude.

sampling(body, isp_lim, twr_lim, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None, u_bound='upper')[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • alt_safe (float) – Asymptotic minimum safe altitude [m]

  • slope (float) – Minimum safe altitude slope close to the launch site [-]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

  • u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as lower, upper or None. Default is upper

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects

class latom.surrogate.smt_surrogates.TwoDimDescVertSurrogate(train_method, rec_file=None)[source]

Bases: latom.surrogate.smt_surrogates.SurrogateModel

TwoDimDescVertSurrogate implements SurrogateModel for a two-dimensional descent trajectory at constant thrust with final vertical descent phase.

sampling(body, isp_lim, twr_lim, alt, alt_p, alt_switch, theta, tof, t_bounds, method, nb_seg, order, solver, nb_samp, samp_method='lhs', criterion='m', snopt_opts=None)[source]

Compute a new set of training data starting from a given sampling grid.

Parameters
  • body (Primary) – Central attracting body

  • isp_lim (iterable) – Specific impulse lower and upper limits [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]

  • alt (float) – Orbit altitude [m]

  • alt_p (float) – Periapsis altitude where the final powered descent is initiated [m]

  • alt_switch (float) – Altitude at which the final vertical descent is triggered [m]

  • theta (float) – Guessed spawn angle [rad]

  • tof (iterable) – Guessed time of flight for the two phases [s]

  • t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof

  • method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed gauss-lobatto, radau-ps and runge-kutta

  • nb_seg (int or iterable) – Number of segments in which each phase is discretized

  • order (int or iterable) – Transcription order within each phase, must be odd

  • solver (str) – NLP solver, must be supported by OpenMDAO

  • nb_samp (iterable) – Total number of sampling points

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is lhs

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively. Default is m

  • snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None

static abs_path(rec_file)

Returns the absolute path of the file where the surrogate model is stored.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

Returns

fid – Full path where the surrogate model is stored

Return type

str

compute_grid(isp_lim, twr_lim, nb_samp, samp_method='full', criterion='m')

Compute the sampling grid fro given Isp and twr limits and sampling scheme.

Parameters
  • isp_lim (iterable) – Specific impulse lower and upper bounds [s]

  • twr_lim (iterable) – Thrust/weight ratio lower and upper bounds [-]

  • nb_samp (int) – Total number of samples. Must be a perfect square if full is chosen as samp_method

  • samp_method (str, optional) – Sampling scheme, lhs for Latin Hypercube Sampling or full for Full-Factorial Sampling. Default is full

  • criterion (str, optional) – Criterion used to construct the LHS design among center, maximin, centermaximin, correlation, c, m, cm, corr, ese. c, m, cm and corr are abbreviations of center, maximin, centermaximin and correlation, respectively Default is m

compute_matrix(nb_eval=None)

Compute structured matrices for Isp, twr and m_prop to display the training data on a response surface.

Parameters

nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

Returns

  • isp (ndarray) – Matrix of specific impulses [s]

  • twr (ndarray) – Matrix of thrust/weight ratios [-]

  • m_mat (ndarray) – Matrix of propellant fractions [-]

evaluate(isp, twr)

Evaluate the surrogate model in the given set of points.

Parameters
  • isp (float or iterable) – Specific impulse on evaluation points [s]

  • twr (float or iterable) – Thrust/weight ratio on evaluation points [-]

Returns

m_eval – Propellant fraction on evaluation points [-]

Return type

float or iterable

load(rec_file)

Loads stored data to instantiate a surrogate model.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

plot(nb_eval=None, nb_lines=50, kind='prop')

Plot the response surface corresponding to the loaded surrogate model.

Parameters
  • nb_eval (int or None) – Number of points included in the matrix if Latin Hypercube Sampling has been used or None. Default is None

  • nb_lines (int, optional) – Number of contour lines. Default is 50

  • kind (str) – prop to display the propellant fraction m_prop, final to display the final spacecraft mass 1 - m_prop

save(rec_file)

Saves data corresponding to a surrogate model instance.

Parameters

rec_file (str) – Name of the file in latom.data.smt where the surrogate model is stored

static solve(nlp, i)

Solve the i-th NLP problem.

Parameters
  • nlp (NLP) – NLP object

  • i (int) – Current iteration

Returns

  • m_prop (float) – Propellant fraction [-]

  • f (bool) – Failure status

train(train_method, **kwargs)

Trains the surrogate model with given training data.

Parameters
  • train_method (str) – Training method among IDW, KPLS, KPLSK, KRG, LS, QP, RBF, RMTB, RMTC

  • kwargs (dict) – Additional keyword arguments supported by SMT objects