System Services

Services for system objects in the Hiten framework.

System Persistence Service

_SystemPersistenceService()

Handle persistence for system objects.

class hiten.algorithms.types.services.system._SystemPersistenceService[source]

Bases: _PersistenceServiceBase

Thin adapter around system IO helpers for testability and indirection.

Parameters:
  • save_fn (Callable[..., Any]) – The function to save the object.

  • load_fn (Callable[..., Any]) – The function to load the object.

  • load_inplace_fn (Optional[Callable[..., Any]] = None) – The function to load the object in place.

System Dynamics Service

_SystemsDynamicsService()

Provide dynamics services for system objects.

class hiten.algorithms.types.services.system._SystemsDynamicsService(domain_obj)[source]

Bases: _DynamicsServiceBase

Lazily construct and cache dynamical system backends for a CR3BP system.

Parameters:

domain_obj (System) – The domain object.

primary

The primary body.

Type:

Body

secondary

The secondary body.

Type:

Body

distance

The distance between the primary and secondary bodies.

Type:

float

property mu: float

Mass parameter mu.

property libration_points: Dict[int, 'LibrationPoint']

Libration points.

property primary: Body

Primary body.

property secondary: Body

Secondary body.

property distance: float

Distance between the primary and secondary bodies.

property dynsys: _DynamicalSystem

Dynamical system.

property var_dynsys: _DynamicalSystem

Variational dynamical system.

property jacobian_dynsys: _DynamicalSystem

Jacobi dynamical system.

get_point(index)[source]

Get a libration point.

Parameters:

index (int)

Return type:

LibrationPoint

propagate(state0, *, tf, steps, method, order, forward, extra_kwargs=None)[source]

Delegate propagation to the shared CR3BP integrator.

Parameters:
  • state0 (Sequence[float]) – The initial state.

  • tf (float) – The final time.

  • steps (int) – The number of steps.

  • method (str) – The method to use for propagation.

  • order (int) – The order of the method to use for propagation.

  • forward (int) – The forward direction.

  • extra_kwargs (Optional[dict[str, Any]] = None) – The extra keyword arguments.

Returns:

The propagated trajectory.

Return type:

Trajectory

System Services

_SystemServices()

Encapsulate services for system objects.

class hiten.algorithms.types.services.system._SystemServices(domain_obj, dynamics, persistence)[source]

Bases: _ServiceBundleBase

Bundle all system services together.

Parameters:
dynamics

The dynamics service.

Type:

_SystemsDynamicsService

persistence

The persistence service.

Type:

_SystemPersistenceService

classmethod default(system)[source]

Create a default service bundle.

Parameters:

system (System) – The system.

Returns:

The service bundle.

Return type:

_SystemServices

classmethod with_shared_dynamics(dynamics)[source]

Create a service bundle with a shared dynamics service.

Parameters:

dynamics (_SystemsDynamicsService) – The dynamics service.

Returns:

The service bundle.

Return type:

_SystemServices