ostk.astrodynamics.trajectory.state.NumericalSolver¶
- class NumericalSolver(
- self: ostk.astrodynamics.trajectory.state.NumericalSolver,
- log_type: ostk.mathematics.solver.NumericalSolver.LogType,
- stepper_type: ostk.mathematics.solver.NumericalSolver.StepperType,
- time_step: ostk.core.type.Real,
- relative_tolerance: ostk.core.type.Real,
- absolute_tolerance: ostk.core.type.Real,
- root_solver: ostk.astrodynamics.RootSolver = RootSolver.default(),
- log_type: ostk.mathematics.solver.NumericalSolver.LogType,
Bases:
NumericalSolver
A numerical solver is used to integrate the trajectory of a dynamical system.
The numerical solver can be used to integrate the trajectory of a dynamical system to a given instant, or to a set of instants, or until an Event Condition is met.
Constructor.
- Parameters:
log_type (NumericalSolver.LogType) -- The type of logging.
stepper_type (NumericalSolver.StepperType) -- The type of stepper.
time_step (float) -- The time step.
relative_tolerance (float) -- The relative tolerance.
absolute_tolerance (float) -- The absolute tolerance.
root_solver (RootSolver, optional) -- The root solver. Defaults to RootSolver.Default().
Methods
Return a conditional numerical solver.
Return the default numerical solver.
Return the default conditional numerical solver.
Return a Numerical Solver using a fixed stepper.
Get the observed states.
Get the root solver.
Overloaded function.
Overloaded function.
Check if the numerical solver is defined.
Return an undefined numerical solver.
- class ConditionSolution¶
Bases:
pybind11_object
The solution to an event condition.
- property condition_is_satisfied¶
Whether the event condition is satisfied.
- Type:
bool
- property iteration_count¶
The number of iterations required to find the solution.
- Type:
int
- property root_solver_has_converged¶
Whether the root solver has converged.
- Type:
bool
- property state¶
The state of the trajectory.
- Type:
State
- class LogType(
- self: ostk.mathematics.solver.NumericalSolver.LogType,
- value: int,
Bases:
pybind11_object
Members:
NoLog
LogConstant
LogAdaptive
- property name¶
- class StepperType(
- self: ostk.mathematics.solver.NumericalSolver.StepperType,
- value: int,
Bases:
pybind11_object
Members:
RungeKutta4
RungeKuttaCashKarp54
RungeKuttaFehlberg78
RungeKuttaDopri5
- property name¶
- static conditional(
- arg0: ostk.core.type.Real,
- arg1: ostk.core.type.Real,
- arg2: ostk.core.type.Real,
- arg3: Callable[[ostk.astrodynamics.trajectory.State], None],
- arg1: ostk.core.type.Real,
Return a conditional numerical solver.
- Returns:
The conditional numerical solver.
- Return type:
- static default() ostk.astrodynamics.trajectory.state.NumericalSolver ¶
Return the default numerical solver.
- Returns:
The default numerical solver.
- Return type:
- static default_conditional(
- state_logger: Callable[[ostk.astrodynamics.trajectory.State], None] = None,
Return the default conditional numerical solver.
- Parameters:
state_logger (StateLogger, optional) -- The state logger. Defaults to None.
- Returns:
The default conditional numerical solver.
- Return type:
- static fixed_step_size(
- stepper_type: ostk.mathematics.solver.NumericalSolver.StepperType,
- time_step: ostk.core.type.Real,
Return a Numerical Solver using a fixed stepper.
- Returns:
The numerical solver.
- Return type:
- get_absolute_tolerance( ) ostk.core.type.Real ¶
- get_log_type( ) ostk::mathematics::solver::NumericalSolver::LogType ¶
- get_observed_state_vectors( ) list[tuple[numpy.ndarray[numpy.float64[m, 1]], float]] ¶
- get_observed_states( ) list[ostk.astrodynamics.trajectory.State] ¶
Get the observed states.
- get_relative_tolerance( ) ostk.core.type.Real ¶
- get_root_solver( ) ostk.astrodynamics.RootSolver ¶
Get the root solver.
- Returns:
The root solver.
- Return type:
- get_stepper_type( ) ostk::mathematics::solver::NumericalSolver::StepperType ¶
- get_time_step( ) ostk.core.type.Real ¶
- integrate_duration(*args, **kwargs)¶
Overloaded function.
integrate_duration(self: ostk.mathematics.solver.NumericalSolver, arg0: numpy.ndarray[numpy.float64[m, 1]], arg1: ostk.core.type.Real, arg2: object) -> tuple[numpy.ndarray[numpy.float64[m, 1]], float]
integrate_duration(self: ostk.mathematics.solver.NumericalSolver, arg0: numpy.ndarray[numpy.float64[m, 1]], arg1: list[ostk.core.type.Real], arg2: object) -> list[tuple[numpy.ndarray[numpy.float64[m, 1]], float]]
- integrate_time(*args, **kwargs)¶
Overloaded function.
integrate_time(self: ostk.astrodynamics.trajectory.state.NumericalSolver, state: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, system_of_equations: object) -> ostk.astrodynamics.trajectory.State
Integrate the trajectory to a given instant.
- Args:
state (State): The initial state of the trajectory. instant (Instant): The instant to integrate to. system_of_equations (callable): The system of equations.
- Returns:
State: The state at the requested time.
integrate_time(self: ostk.astrodynamics.trajectory.state.NumericalSolver, state: ostk.astrodynamics.trajectory.State, instants: list[ostk.physics.time.Instant], system_of_equations: object) -> list[ostk.astrodynamics.trajectory.State]
Integrate the trajectory to a set of instants.
- Args:
state (State): The initial state of the trajectory. instants (list[Instant]): The instants to integrate to. system_of_equations (callable): The system of equations.
- Returns:
list[State]: The states at the requested times.
integrate_time(self: ostk.astrodynamics.trajectory.state.NumericalSolver, state: ostk.astrodynamics.trajectory.State, instant: ostk.physics.time.Instant, system_of_equations: object, event_condition: ostk::astrodynamics::EventCondition) -> ostk.astrodynamics.trajectory.state.NumericalSolver.ConditionSolution
Integrate the trajectory to a given instant, with an event condition.
- Args:
state (State): The initial state of the trajectory. instant (Instant): The instant to integrate to. system_of_equations (callable): The system of equations. event_condition (EventCondition): The event condition.
- Returns:
ConditionSolution: The solution to the event condition.
- is_defined( ) bool ¶
Check if the numerical solver is defined.
- Returns:
True if the numerical solver is defined, False otherwise.
- Return type:
- static string_from_log_type(
- log_type: ostk::mathematics::solver::NumericalSolver::LogType,
- static string_from_stepper_type(
- stepper_type: ostk::mathematics::solver::NumericalSolver::StepperType,
- static undefined() ostk.astrodynamics.trajectory.state.NumericalSolver ¶
Return an undefined numerical solver.
- Returns:
The undefined numerical solver.
- Return type: