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.
- property dynsys: _DynamicalSystem
Dynamical system.
- property var_dynsys: _DynamicalSystem
Variational dynamical system.
- property jacobian_dynsys: _DynamicalSystem
Jacobi dynamical system.
- 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:
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:
domain_obj (
System
) – The domain object.dynamics (_SystemsDynamicsService)
persistence (_SystemPersistenceService)
- dynamics
The dynamics service.
- Type:
- persistence
The persistence service.
- classmethod default(system)[source]
Create a default service bundle.
- Parameters:
system (
System
) – The system.- Returns:
The service bundle.
- Return type:
Create a service bundle with a shared dynamics service.
- Parameters:
dynamics (
_SystemsDynamicsService
) – The dynamics service.- Returns:
The service bundle.
- Return type: