latom.analyzer.analyzer_2d¶
@authors: Alberto FOSSA’ Giuliana Elena MICELI
Classes
|
Analyzer class defines the methods to analyze the results of a simulation. |
|
HohmannTransfer class implements a two-dimensional Hohmann transfer between two coplanar, circular orbits in the Keplerian two-body approximation. |
|
ImpulsiveBurn class describes an impulsive burn. |
|
TwoDimAnalyzer class defines the methods to analyze the results of a two dimensional simulation. |
|
TwoDimAscAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit. |
|
TwoDimAscConstAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at constant thrust. |
|
TwoDimAscConstNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimAscVToffAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust with vertical take-off. |
|
TwoDimAscVToffNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimAscVarAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust. |
|
TwoDimAscVarNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimDescAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface. |
|
TwoDimDescConstAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at constant thrust. |
|
TwoDimDescConstNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimDescTwoPhasesAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface composed by two subsequent phases. |
|
TwoDimDescTwoPhasesNLP transcribes a continuous-time optimal control problem for a two-dimensional descent trajectory into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
Plot the two-dimensional two-phases descent simulation’s states and controls in time and in the xy plane. |
|
TwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust with vertical landing. |
|
TwoDimAscVToffNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust. |
|
TwoDimDescVarNLP class transcribes a two-dimensional, continuous-time optimal control problem in trajectory optimization into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
Defines a two-dimensional orbit from its keplerian parameters. |
|
TwoDimSinglePhaseAnalyzer class defines the methods to analyze the results of a two dimensional single phase simulation. |
|
Plot the two-dimensional simulation’s states and controls in time and in the xy plane. |
-
class
latom.analyzer.analyzer_2d.TwoDimAnalyzer(body, sc)[source]¶ Bases:
latom.analyzer.analyzer.AnalyzerTwoDimAnalyzer class defines the methods to analyze the results of a two dimensional simulation.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [-] or [m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
-
get_time_series_phase(p, phase_name, scaled=False)[source]¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_discretization_phase(p, phase_name, scaled=False)[source]¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of the simulation.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzer(body, sc, alt)[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimAnalyzerTwoDimSinglePhaseAnalyzer class defines the methods to analyze the results of a two dimensional single phase simulation.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_time_series(p, scaled=False)[source]¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscAnalyzer(body, sc, alt)[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzerTwoDimAscAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscConstAnalyzer(body, sc, alt, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimAscConstAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at constant thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscVarAnalyzer(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimAscVarAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) –
of NLP object describing the type of Non Linear Problem solver used (Instance) –
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscVToffAnalyzer(body, sc, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimAscVarAnalyzerTwoDimAscVToffAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust with vertical take-off.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_safe (float) – Value of the minimun safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [-]
t_bounds (float) – Value for the time of flight bounds [s]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
r_safe (float) – Value of the minimum orbit radius to be compliant with the constraints [m]
-
get_solutions(explicit=True, scaled=False)[source]¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescAnalyzer(body, sc, alt)[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzerTwoDimDescAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
= ndarray (states_scalers) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescConstAnalyzer(body, sc, alt, alt_p, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimDescAnalyzerTwoDimDescConstAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at constant thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_p (float) – Value of the orbit periselene altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_p (float) – Value of the final orbit altitude [m]
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescVarAnalyzer(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimDescAnalyzerTwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescVLandAnalyzer(body, sc, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimDescVarAnalyzerTwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust with vertical landing.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
r_safe (float) – Value of the minimum orbit radius to be compliant with the constraints [m]
-
get_time_series(p, scaled=False)[source]¶ Access the time series of the simulation.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation [s]
t (ndarray) – Time of flight time series for the optimized simulation [s]
states (ndarray) – States time series for the optimized simulation
controls (ndarray) – Controls time series for the optimized simulation
-
get_solutions(explicit=True, scaled=False)[source]¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescTwoPhasesAnalyzer(body, sc, alt, alt_p, alt_switch, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, fix='alt')[source]¶ Bases:
latom.analyzer.analyzer_2d.TwoDimAnalyzerTwoDimDescTwoPhasesAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface composed by two subsequent phases.
Firstly, the spacecraft is injected in a ballistic arc (Hohmann transfer) to move from the initial Low Lunar Orbit to a lower altitude. Starting from the periselene of the Hohmann transfer, the spacecraft performs a powered descent at constant thrust and free attitude (first phase) until the final vertical descent (second phase) is triggered at a given altitude or time-to-go.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_switch (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falsefix (str) – Chooses to switch from the optimized phase to the vertical one at a specific altitude or time. Can be
altortime. Default isalt
- Variables
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
phase_name (str) – Describes the phase name in case of multi-phase trajectories
nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used
tof (float) – Value of the time of flight resulting by the simulation [s]
tof_exp (float) – Value of the time of flight of the explicit simulation [s]
err (float) – Value of the error between the optimized simulation results and the explicit simulation results
rm_res (float) – Value of the central body radius [- or m]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
alt_p (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
alt_switch (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
ht (Guess_2d) – Instance of Guess_2d class to define an Hohmann transfer trajectory
deorbit_burn (Guess_2d) – Instance of Guess_2d class to define an an impulsive burn
-
get_time_series(p, scaled=False)[source]¶ Access the time series of the simulation.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation [s]
t (ndarray) – Time of flight time series for the optimized simulation [s]
states (ndarray) – States time series for the optimized simulation
controls (ndarray) – Controls time series for the optimized simulation
-
plot()[source]¶ Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False)¶ Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False)¶ - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_solutions(explicit=True, scaled=False)¶ Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series_phase(p, phase_name, scaled=False)¶ Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver()¶ Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file)¶ Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized