Package org.orekit.utils
Class AbstractMultipleShooting
- java.lang.Object
-
- org.orekit.utils.AbstractMultipleShooting
-
- All Implemented Interfaces:
MultipleShooting
- Direct Known Subclasses:
CR3BPMultipleShooter
,MultipleShooter
,PythonAbstractMultipleShooting
public abstract class AbstractMultipleShooting extends Object implements MultipleShooting
Multiple shooting method using only constraints on state vectors of patch points (and possibly on epoch and integration time).- Since:
- 10.2
- Author:
- William Desprats
- See Also:
- "TRAJECTORY DESIGN AND ORBIT MAINTENANCE STRATEGIES IN MULTI-BODY DYNAMICAL REGIMES by Thomas A. Pavlak, Purdue University"
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMultipleShooting(List<SpacecraftState> initialGuessList, List<NumericalPropagator> propagatorList, double arcDuration, double tolerance, int maxIter, String additionalName)
Simple Constructor.protected
AbstractMultipleShooting(List<SpacecraftState> initialGuessList, List<NumericalPropagator> propagatorList, List<AdditionalEquations> additionalEquations, double arcDuration, double tolerance, String additionalName)
Deprecated.as of 11.1, replaced byAbstractMultipleShooting(List, List, double, double, int, String)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addConstraint(int patchNumber, int componentIndex, double constraintValue)
Add a constraint on one component of one patch point.List<SpacecraftState>
compute()
Return the list of corrected patch points.protected abstract double[]
computeAdditionalConstraints(List<SpacecraftState> propagatedSP)
Compute the additional constraints.protected abstract double[][]
computeAdditionalJacobianMatrix(List<SpacecraftState> propagatedSP)
Compute a part of the Jacobian matrix from additional constraints.protected double[][]
computeEpochJacobianMatrix(List<SpacecraftState> propagatedSP)
Compute a part of the Jacobian matrix with derivatives from epoch.protected SpacecraftState
getAugmentedInitialState(int i)
Compute the additional state from the additionalEquations.protected SpacecraftState
getAugmentedInitialState(SpacecraftState initialState, AdditionalEquations additionalEquations2)
Deprecated.as of 11.1, replaced bygetAugmentedInitialState(int)
protected Map<Integer,Double>
getConstraintsMap()
Get the map of patch points components which are constrained.protected boolean[]
getFreeEpochMap()
Get the flags representing the free epoch of patch points.protected boolean[]
getFreePatchPointMap()
Get the flags representing the free components of patch points.protected int
getNumberOfConstraints()
Get the number of constraints.protected int
getNumberOfFreeEpoch()
Get the number of free epoch.protected int
getNumberOfFreeVariables()
Get the number of free variables.protected List<SpacecraftState>
getPatchedSpacecraftState()
Get the list of patched spacecraft states.protected SpacecraftState
getPatchPoint(int i)
Get a patch point.protected List<NumericalPropagator>
getPropagatorList()
Get the list of propagators.protected boolean
isClosedOrbit()
Get he flag representing if the orbit is closed.void
setClosedOrbitConstraint(boolean isClosed)
Set the constraint of a closed orbit or not.void
setEpochFreedom(int patchNumber, boolean isFree)
Set the epoch a patch point to free or not.void
setPatchPointComponentFreedom(int patchNumber, int componentIndex, boolean isFree)
Set a component of a patch point to free or not.protected void
updateAdditionalConstraints(int startIndex, double[] fxAdditional)
Update the array of additional constraints.
-
-
-
Constructor Detail
-
AbstractMultipleShooting
@Deprecated protected AbstractMultipleShooting(List<SpacecraftState> initialGuessList, List<NumericalPropagator> propagatorList, List<AdditionalEquations> additionalEquations, double arcDuration, double tolerance, String additionalName)
Deprecated.as of 11.1, replaced byAbstractMultipleShooting(List, List, double, double, int, String)
Simple Constructor.Standard constructor for multiple shooting
- Parameters:
initialGuessList
- initial patch points to be corrected.propagatorList
- list of propagators associated to each patch point.additionalEquations
- list of additional equations linked to propagatorList.arcDuration
- initial guess of the duration of each arc.tolerance
- convergence tolerance on the constraint vector.additionalName
- name of the additional equations
-
AbstractMultipleShooting
protected AbstractMultipleShooting(List<SpacecraftState> initialGuessList, List<NumericalPropagator> propagatorList, double arcDuration, double tolerance, int maxIter, String additionalName)
Simple Constructor.Standard constructor for multiple shooting
- Parameters:
initialGuessList
- initial patch points to be corrected.propagatorList
- list of propagators associated to each patch point.arcDuration
- initial guess of the duration of each arc.tolerance
- convergence tolerance on the constraint vector.maxIter
- maximum number of iterationsadditionalName
- name of the additional equations- Since:
- 11.1
-
-
Method Detail
-
getPatchPoint
protected SpacecraftState getPatchPoint(int i)
Get a patch point.- Parameters:
i
- index of the patch point- Returns:
- state of the patch point
- Since:
- 11.1
-
setPatchPointComponentFreedom
public void setPatchPointComponentFreedom(int patchNumber, int componentIndex, boolean isFree)
Set a component of a patch point to free or not.- Parameters:
patchNumber
- Patch point with constraintcomponentIndex
- Component of the patch points which are constrained.isFree
- constraint value
-
addConstraint
public void addConstraint(int patchNumber, int componentIndex, double constraintValue)
Add a constraint on one component of one patch point.- Parameters:
patchNumber
- Patch point with constraintcomponentIndex
- Component of the patch points which are constrained.constraintValue
- constraint value
-
setEpochFreedom
public void setEpochFreedom(int patchNumber, boolean isFree)
Set the epoch a patch point to free or not.- Parameters:
patchNumber
- Patch pointisFree
- constraint value
-
compute
public List<SpacecraftState> compute()
Return the list of corrected patch points. An optimizer is better suited for this problem- Specified by:
compute
in interfaceMultipleShooting
- Returns:
- patchedSpacecraftStates patchedSpacecraftStates
-
computeEpochJacobianMatrix
protected double[][] computeEpochJacobianMatrix(List<SpacecraftState> propagatedSP)
Compute a part of the Jacobian matrix with derivatives from epoch. The CR3BP is a time invariant problem. The derivatives w.r.t. epoch are zero.- Parameters:
propagatedSP
- propagatedSP- Returns:
- jacobianMatrix Jacobian sub-matrix
-
updateAdditionalConstraints
protected void updateAdditionalConstraints(int startIndex, double[] fxAdditional)
Update the array of additional constraints.- Parameters:
startIndex
- start indexfxAdditional
- array of additional constraints
-
computeAdditionalConstraints
protected abstract double[] computeAdditionalConstraints(List<SpacecraftState> propagatedSP)
Compute the additional constraints.- Parameters:
propagatedSP
- propagated SpacecraftState- Returns:
- fxAdditionnal additional constraints
-
computeAdditionalJacobianMatrix
protected abstract double[][] computeAdditionalJacobianMatrix(List<SpacecraftState> propagatedSP)
Compute a part of the Jacobian matrix from additional constraints.- Parameters:
propagatedSP
- propagatedSP- Returns:
- jacobianMatrix Jacobian sub-matrix
-
getAugmentedInitialState
@Deprecated protected SpacecraftState getAugmentedInitialState(SpacecraftState initialState, AdditionalEquations additionalEquations2)
Deprecated.as of 11.1, replaced bygetAugmentedInitialState(int)
Compute the additional state from the additionalEquations.- Parameters:
initialState
- SpacecraftState without the additional stateadditionalEquations2
- Additional Equations.- Returns:
- augmentedSP SpacecraftState with the additional state within.
-
getAugmentedInitialState
protected SpacecraftState getAugmentedInitialState(int i)
Compute the additional state from the additionalEquations.- Parameters:
i
- index of the state- Returns:
- augmentedSP SpacecraftState with the additional state within.
- Since:
- 11.1
-
setClosedOrbitConstraint
public void setClosedOrbitConstraint(boolean isClosed)
Set the constraint of a closed orbit or not.- Parameters:
isClosed
- true if orbit should be closed
-
getNumberOfFreeVariables
protected int getNumberOfFreeVariables()
Get the number of free variables.- Returns:
- the number of free variables
-
getNumberOfFreeEpoch
protected int getNumberOfFreeEpoch()
Get the number of free epoch.- Returns:
- the number of free epoch
-
getNumberOfConstraints
protected int getNumberOfConstraints()
Get the number of constraints.- Returns:
- the number of constraints
-
getFreePatchPointMap
protected boolean[] getFreePatchPointMap()
Get the flags representing the free components of patch points.- Returns:
- an array of flags representing the free components of patch points
-
getFreeEpochMap
protected boolean[] getFreeEpochMap()
Get the flags representing the free epoch of patch points.- Returns:
- an array of flags representing the free epoch of patch points
-
getConstraintsMap
protected Map<Integer,Double> getConstraintsMap()
Get the map of patch points components which are constrained.- Returns:
- a map of patch points components which are constrained
-
getPatchedSpacecraftState
protected List<SpacecraftState> getPatchedSpacecraftState()
Get the list of patched spacecraft states.- Returns:
- a list of patched spacecraft states
-
getPropagatorList
protected List<NumericalPropagator> getPropagatorList()
Get the list of propagators.- Returns:
- a list of propagators
-
isClosedOrbit
protected boolean isClosedOrbit()
Get he flag representing if the orbit is closed.- Returns:
- true if orbit is closed
-
-