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(),
)

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:

Methods

conditional

Return a conditional numerical solver.

default

Return the default numerical solver.

default_conditional

Return the default conditional numerical solver.

fixed_step_size

Return a Numerical Solver using a fixed stepper.

get_absolute_tolerance

get_log_type

get_observed_state_vectors

get_observed_states

Get the observed states.

get_relative_tolerance

get_root_solver

Get the root solver.

get_stepper_type

get_time_step

integrate_duration

Overloaded function.

integrate_time

Overloaded function.

is_defined

Check if the numerical solver is defined.

string_from_log_type

string_from_stepper_type

undefined

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],
) ostk.astrodynamics.trajectory.state.NumericalSolver

Return a conditional numerical solver.

Returns:

The conditional numerical solver.

Return type:

NumericalSolver

static default() ostk.astrodynamics.trajectory.state.NumericalSolver

Return the default numerical solver.

Returns:

The default numerical solver.

Return type:

NumericalSolver

static default_conditional(
state_logger: Callable[[ostk.astrodynamics.trajectory.State], None] = None,
) ostk.astrodynamics.trajectory.state.NumericalSolver

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:

NumericalSolver

static fixed_step_size(
stepper_type: ostk.mathematics.solver.NumericalSolver.StepperType,
time_step: ostk.core.type.Real,
) ostk.astrodynamics.trajectory.state.NumericalSolver

Return a Numerical Solver using a fixed stepper.

Returns:

The numerical solver.

Return type:

NumericalSolver

get_absolute_tolerance(
self: ostk.mathematics.solver.NumericalSolver,
) ostk.core.type.Real
get_log_type(
self: ostk.mathematics.solver.NumericalSolver,
) ostk::mathematics::solver::NumericalSolver::LogType
get_observed_state_vectors(
self: ostk.mathematics.solver.NumericalSolver,
) list[tuple[numpy.ndarray[numpy.float64[m, 1]], float]]
get_observed_states(
self: ostk.astrodynamics.trajectory.state.NumericalSolver,
) list[ostk.astrodynamics.trajectory.State]

Get the observed states.

Returns:

The observed states.

Return type:

list[State]

get_relative_tolerance(
self: ostk.mathematics.solver.NumericalSolver,
) ostk.core.type.Real
get_root_solver(
self: ostk.astrodynamics.trajectory.state.NumericalSolver,
) ostk.astrodynamics.RootSolver

Get the root solver.

Returns:

The root solver.

Return type:

RootSolver

get_stepper_type(
self: ostk.mathematics.solver.NumericalSolver,
) ostk::mathematics::solver::NumericalSolver::StepperType
get_time_step(
self: ostk.mathematics.solver.NumericalSolver,
) ostk.core.type.Real
integrate_duration(*args, **kwargs)

Overloaded function.

  1. 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]

  2. 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.

  1. 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.

  2. 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.

  3. 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(
self: ostk.astrodynamics.trajectory.state.NumericalSolver,
) bool

Check if the numerical solver is defined.

Returns:

True if the numerical solver is defined, False otherwise.

Return type:

bool

static string_from_log_type(
log_type: ostk::mathematics::solver::NumericalSolver::LogType,
) ostk.core.type.String
static string_from_stepper_type(
stepper_type: ostk::mathematics::solver::NumericalSolver::StepperType,
) ostk.core.type.String
static undefined() ostk.astrodynamics.trajectory.state.NumericalSolver

Return an undefined numerical solver.

Returns:

The undefined numerical solver.

Return type:

NumericalSolver