Package gov.nasa.jpl.aerie.scheduler
Class EquationSolvingAlgorithms.SecantDurationAlgorithm<Metadata>
java.lang.Object
gov.nasa.jpl.aerie.scheduler.EquationSolvingAlgorithms.SecantDurationAlgorithm<Metadata>
- All Implemented Interfaces:
EquationSolvingAlgorithms.SecantAlgorithm<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,Metadata>
- Enclosing class:
EquationSolvingAlgorithms
public static class EquationSolvingAlgorithms.SecantDurationAlgorithm<Metadata>
extends Object
implements EquationSolvingAlgorithms.SecantAlgorithm<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,Metadata>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEquationSolvingAlgorithms.RootFindingResult<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> findRoot(EquationSolvingAlgorithms.Function<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> f, EquationSolvingAlgorithms.History<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> history, gov.nasa.jpl.aerie.merlin.protocol.types.Duration x0, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYHigh, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xHigh, int maxNbIterations) Solves x s.t.EquationSolvingAlgorithms.RootFindingResult<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> findRoot(EquationSolvingAlgorithms.Function<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> f, EquationSolvingAlgorithms.History<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> history, gov.nasa.jpl.aerie.merlin.protocol.types.Duration x0, gov.nasa.jpl.aerie.merlin.protocol.types.Duration y, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYHigh, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xHigh, int maxNbIterations) Solves x s.t.
-
Constructor Details
-
SecantDurationAlgorithm
public SecantDurationAlgorithm()
-
-
Method Details
-
findRoot
public EquationSolvingAlgorithms.RootFindingResult<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,Metadata> findRoot(EquationSolvingAlgorithms.Function<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> f, EquationSolvingAlgorithms.History<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, throws EquationSolvingAlgorithms.ZeroDerivativeException, EquationSolvingAlgorithms.NoSolutionException, EquationSolvingAlgorithms.ExceededMaxIterationException, EquationSolvingAlgorithms.DivergenceException, EquationSolvingAlgorithms.InfiniteDerivativeException, SchedulingInterruptedExceptionMetadata> history, gov.nasa.jpl.aerie.merlin.protocol.types.Duration x0, gov.nasa.jpl.aerie.merlin.protocol.types.Duration y, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYHigh, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xHigh, int maxNbIterations) Solves x s.t. f(x) = y by transforming it to the equivalent rootfinding problem x s.t. f(x) - y = 0- Specified by:
findRootin interfaceEquationSolvingAlgorithms.SecantAlgorithm<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,Metadata> - Parameters:
f- the functionhistory-x0- one of the initial x valuey- the objectivetoleranceYLow- absolute value of the tolerance below 0toleranceYHigh- absolute value of the tolerance above 0xLow- the lower bound for xxHigh- the upper bound for xmaxNbIterations- the maximum number of iterations possible- Returns:
- the solution to the equation, throws an exception otherwise
- Throws:
EquationSolvingAlgorithms.ZeroDerivativeExceptionEquationSolvingAlgorithms.NoSolutionExceptionEquationSolvingAlgorithms.ExceededMaxIterationExceptionEquationSolvingAlgorithms.DivergenceExceptionEquationSolvingAlgorithms.InfiniteDerivativeExceptionSchedulingInterruptedException
-
findRoot
public EquationSolvingAlgorithms.RootFindingResult<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,Metadata> findRoot(EquationSolvingAlgorithms.Function<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, Metadata> f, EquationSolvingAlgorithms.History<gov.nasa.jpl.aerie.merlin.protocol.types.Duration, throws EquationSolvingAlgorithms.ZeroDerivativeException, EquationSolvingAlgorithms.InfiniteDerivativeException, EquationSolvingAlgorithms.ExceededMaxIterationException, SchedulingInterruptedExceptionMetadata> history, gov.nasa.jpl.aerie.merlin.protocol.types.Duration x0, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration toleranceYHigh, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xLow, gov.nasa.jpl.aerie.merlin.protocol.types.Duration xHigh, int maxNbIterations) Solves x s.t. f(x) = 0
-