Class AbstractFixedInitialCartesianSingleShooting
- java.lang.Object
-
- org.orekit.control.indirect.shooting.AbstractIndirectShooting
-
- org.orekit.control.indirect.shooting.AbstractFixedInitialCartesianSingleShooting
-
- Direct Known Subclasses:
AbstractFixedBoundaryCartesianSingleShooting
public abstract class AbstractFixedInitialCartesianSingleShooting extends AbstractIndirectShooting
Abstract class for indirect single shooting methods with fixed initial Cartesian state. Inheritors must implement the iteration update, assuming derivatives are needed.- Since:
- 13.0
- Author:
- Romain Serra
- See Also:
CartesianAdjointDerivativesProvider,FieldCartesianAdjointDerivativesProvider
-
-
Field Summary
-
Fields inherited from class org.orekit.control.indirect.shooting.AbstractIndirectShooting
DEFAULT_TOLERANCE_MASS_ADJOINT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFixedInitialCartesianSingleShooting(ShootingPropagationSettings propagationSettings, SpacecraftState initialSpacecraftStateTemplate)Constructor with boundary conditions as orbits.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T extends CalculusFieldElement<T>>
FieldOrdinaryDifferentialEquation<T>buildFieldODE(FieldAbsoluteDate<T> referenceDate)Build Ordinary Differential Equation for Field.protected NumericalPropagatorbuildPropagator(SpacecraftState initialState)Create numerical propagator.abstract ShootingBoundaryOutputcomputeCandidateSolution(SpacecraftState initialState, int iterationCount)Form solution container with input initial state.protected FieldSpacecraftState<Gradient>createFieldInitialStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)Create initial Gradient state with input mass and adjoint vector, the latter being the independent variables.protected <T extends CalculusFieldElement<T>>
FieldSpacecraftState<T>createFieldState(FieldAbsoluteDate<T> date, T[] cartesian, T mass, T[] adjoint)Create state.protected SpacecraftStatecreateInitialStateWithMass(double initialMass)Create initial state with input mass.abstract intgetMaximumIterationCount()Returns the maximum number of iterations.protected double[]getScales()Protected getter for the differentiation scales.ShootingBoundaryOutputsolve(double initialMass, double[] initialGuess)Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables.ShootingBoundaryOutputsolve(double initialMass, double[] initialGuess, double[] userScales)Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables.protected abstract double[]updateShootingVariables(double[] originalShootingVariables, FieldSpacecraftState<Gradient> fieldTerminalState)Update shooting variables.-
Methods inherited from class org.orekit.control.indirect.shooting.AbstractIndirectShooting
buildFieldIntegrator, getPropagationSettings
-
-
-
-
Constructor Detail
-
AbstractFixedInitialCartesianSingleShooting
protected AbstractFixedInitialCartesianSingleShooting(ShootingPropagationSettings propagationSettings, SpacecraftState initialSpacecraftStateTemplate)
Constructor with boundary conditions as orbits.- Parameters:
propagationSettings- propagation settingsinitialSpacecraftStateTemplate- template for initial propagation state
-
-
Method Detail
-
getScales
protected double[] getScales()
Protected getter for the differentiation scales.- Returns:
- scales for variable scales
-
getMaximumIterationCount
public abstract int getMaximumIterationCount()
Returns the maximum number of iterations.- Returns:
- maximum iterations
-
solve
public ShootingBoundaryOutput solve(double initialMass, double[] initialGuess)
Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables.- Specified by:
solvein classAbstractIndirectShooting- Parameters:
initialMass- initial massinitialGuess- initial guess- Returns:
- boundary problem solution
-
solve
public ShootingBoundaryOutput solve(double initialMass, double[] initialGuess, double[] userScales)
Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables. Uses scales for automatic differentiation.- Parameters:
initialMass- initial massinitialGuess- initial guessuserScales- scales- Returns:
- boundary problem solution
-
buildPropagator
protected NumericalPropagator buildPropagator(SpacecraftState initialState)
Create numerical propagator.- Overrides:
buildPropagatorin classAbstractIndirectShooting- Parameters:
initialState- initial state- Returns:
- numerical propagator
-
computeCandidateSolution
public abstract ShootingBoundaryOutput computeCandidateSolution(SpacecraftState initialState, int iterationCount)
Form solution container with input initial state.- Parameters:
initialState- initial stateiterationCount- iteration count- Returns:
- candidate solution
-
createInitialStateWithMass
protected SpacecraftState createInitialStateWithMass(double initialMass)
Create initial state with input mass.- Parameters:
initialMass- initial mass- Returns:
- state
-
createFieldInitialStateWithMassAndAdjoint
protected FieldSpacecraftState<Gradient> createFieldInitialStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)
Create initial Gradient state with input mass and adjoint vector, the latter being the independent variables.- Parameters:
initialMass- initial massinitialAdjoint- initial adjoint variables- Returns:
- state
-
createFieldState
protected <T extends CalculusFieldElement<T>> FieldSpacecraftState<T> createFieldState(FieldAbsoluteDate<T> date, T[] cartesian, T mass, T[] adjoint)
Create state.- Type Parameters:
T- field type- Parameters:
date- epochcartesian- Cartesian variablesmass- massadjoint- adjoint variables- Returns:
- state
-
updateShootingVariables
protected abstract double[] updateShootingVariables(double[] originalShootingVariables, FieldSpacecraftState<Gradient> fieldTerminalState)Update shooting variables.- Parameters:
originalShootingVariables- original shooting variables (before update)fieldTerminalState- final state of gradient propagation- Returns:
- updated shooting variables
-
buildFieldODE
protected <T extends CalculusFieldElement<T>> FieldOrdinaryDifferentialEquation<T> buildFieldODE(FieldAbsoluteDate<T> referenceDate)
Build Ordinary Differential Equation for Field.- Type Parameters:
T- field type- Parameters:
referenceDate- date defining the origin of times- Returns:
- Field ODE
- Since:
- 13.0
-
-