Class 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 Detail

      • AbstractMultipleShooting

        @Deprecated
        protected AbstractMultipleShooting​(List<SpacecraftState> initialGuessList,
                                           List<NumericalPropagator> propagatorList,
                                           List<AdditionalEquations> additionalEquations,
                                           double arcDuration,
                                           double tolerance,
                                           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.
        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 iterations
        additionalName - 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 constraint
        componentIndex - 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 constraint
        componentIndex - 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 point
        isFree - 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 interface MultipleShooting
        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 index
        fxAdditional - 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 by getAugmentedInitialState(int)
        Compute the additional state from the additionalEquations.
        Parameters:
        initialState - SpacecraftState without the additional state
        additionalEquations2 - 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