ostk.astrodynamics.solver.TemporalConditionSolver

class TemporalConditionSolver(
self: ostk.astrodynamics.solver.TemporalConditionSolver,
time_step: ostk.physics.time.Duration,
tolerance: ostk.physics.time.Duration,
maximum_iteration_count: int = 500,
)

Bases: pybind11_object

Given a set of conditions and a time interval, the solver computes all sub-intervals over which conditions are met.

Constructor.

Note

Be careful When selecting the time_step. A very small step can lead to higher precision, but increased runtime and memory consumption. On the other hand, a step that is too large, can result in missing event windows that are shorter than the time_step. For example: 5 min -> 1----1----0----0----0----1----0 => 2 windows 1 min -> 110011100011000000000111100 => 4 windows

Parameters:
  • time_step (Duration) -- The time step used to generate the temporal grid, within which condition switching instants are searched. This must be set to be smaller than the smallest expected interval over which the condition changes state in order to avoid missing any switching instants.

  • tolerance (Duration) -- The tolerance of the solver.

  • maximum_iteration_count (int) -- The maximum number of iterations allowed.

Methods

get_maximum_iteration_count

Get the maximum number of iterations allowed.

get_time_step

Get the time step.

get_tolerance

Get the tolerance.

solve

Overloaded function.

get_maximum_iteration_count(
self: ostk.astrodynamics.solver.TemporalConditionSolver,
) int

Get the maximum number of iterations allowed.

Returns:

The maximum number of iterations allowed.

Return type:

int

get_time_step(
self: ostk.astrodynamics.solver.TemporalConditionSolver,
) ostk.physics.time.Duration

Get the time step.

Returns:

The time step.

Return type:

Duration

get_tolerance(
self: ostk.astrodynamics.solver.TemporalConditionSolver,
) ostk.physics.time.Duration

Get the tolerance.

Returns:

The tolerance.

Return type:

Duration

solve(*args, **kwargs)

Overloaded function.

  1. solve(self: ostk.astrodynamics.solver.TemporalConditionSolver, condition: Callable[[ostk.physics.time.Instant], bool], interval: ostk.physics.time.Interval) -> list[ostk.physics.time.Interval]

    Solve a temporal condition.

    Args:

    condition (function): The condition to solve. interval (Interval): The interval to solve the condition over.

    Returns:

    Duration: The time at which the condition is satisfied.

  2. solve(self: ostk.astrodynamics.solver.TemporalConditionSolver, conditions: list[Callable[[ostk.physics.time.Instant], bool]], interval: ostk.physics.time.Interval) -> list[ostk.physics.time.Interval]

    Solve an array of temporal conditions.

    Args:

    conditions (list): The conditions to solve. interval (Interval): The interval to solve the conditions over.

    Returns:

    list: The times at which the conditions are satisfied.