Connections Types
The types module provides result classes and problem specifications for connection discovery data in CR3BP.
Result Classes
- class hiten.algorithms.connections.types._ConnectionResult[source]
Bases:
objectStore an individual connection result between two manifolds.
This dataclass stores all the information about a single discovered connection between source and target manifolds, including the transfer type, velocity change requirement, geometric location, and full state information at the connection point.
- Parameters:
kind ({"impulsive", "ballistic"}) – Type of transfer. “ballistic” for very low Delta-V transfers (typically ||Delta-V|| <= ballistic_tol), “impulsive” for transfers requiring finite velocity changes.
delta_v (float) – Magnitude of velocity change required for the transfer, in nondimensional CR3BP velocity units. ||v_source - v_target||.
point2d (tuple of float) – 2D coordinates (x, y) of the connection point on the synodic section plane, in nondimensional CR3BP distance units.
state_u (np.ndarray, shape (6,)) – 6D phase space state [x, y, z, vx, vy, vz] at the connection point on the source (typically unstable) manifold, in nondimensional CR3BP units.
state_s (np.ndarray, shape (6,)) – 6D phase space state [x, y, z, vx, vy, vz] at the connection point on the target (typically stable) manifold, in nondimensional CR3BP units.
index_u (int) – Index of the connection point within the source manifold’s section intersection data.
index_s (int) – Index of the connection point within the target manifold’s section intersection data.
trajectory_index_u (int) – Index of the trajectory within the source manifold that produced the connection point.
trajectory_index_s (int) – Index of the trajectory within the target manifold that produced the connection point.
Notes
ConnectionPipeline results are typically generated by the backend algorithms and sorted by increasing Delta-V requirement. The classification into “ballistic” vs “impulsive” is based on the ballistic_tol parameter in the search configuration.
The 2D point coordinates correspond to the intersection location on the synodic section plane, while the 6D states provide the full phase space information needed for trajectory propagation.
Examples
>>> # Accessing connection data >>> print(f"Transfer type: {result.kind}") >>> print(f"Delta-V: {result.delta_v:.6f}") >>> print(f"Section point: {result.point2d}") >>> print(f"Source state: {result.state_u}") >>> print(f"Target state: {result.state_s}")
See also
ConnectionsCollection class for multiple connection results.
_SearchConfigConfiguration that determines ballistic vs impulsive classification.
- class hiten.algorithms.connections.types.ConnectionResults[source]
Bases:
objectCarrier for engine-level connection results.
Encapsulates the backend-produced connection records so engines can return a standardized result object. Provides a helper to obtain the user-facing collection wrapper.
- Parameters:
connections (list of
_ConnectionResult) – The connection results.- Returns:
The connection results.
- Return type:
Connections
- connections: list[_ConnectionResult]
Problem Classes
- class hiten.algorithms.connections.types._ConnectionProblem[source]
Bases:
objectDefine a problem specification for connection discovery between two manifolds.
This dataclass encapsulates all the parameters needed to define a connection discovery problem, including the source and target manifolds, compile-time configuration (section structure), and runtime options (search tolerances).
- Parameters:
source (
Manifold|PeriodicOrbit) – Source manifold (typically unstable manifold).target (
Manifold|PeriodicOrbit) – Target manifold (typically stable manifold).section_axis (str) – Axis for the synodic section (e.g., “x”, “y”, “z”). From config.
section_offset (float) – Offset value for the synodic section. From config.
plane_coords (tuple of str) – Coordinate labels for the section plane projection. From config.
direction (int or None) – Direction for section crossings (1, -1, or None for both). From config.
delta_v_tol (float) – Maximum Delta-V tolerance for accepting a connection. From options.
ballistic_tol (float) – Threshold for classifying connections as ballistic vs impulsive. From options.
eps2d (float) – Radius for initial 2D pairing of points on the synodic section. From options.
n_workers (int or None) – Number of parallel workers for computation. From options.
Notes
This class serves as a data container that packages all the necessary information for the connection engine to process. It combines compile-time structure (config) and runtime tuning (options) into a single problem specification.
The problem specification is typically created by the high-level
ConnectionPipelineclass and passed to the engine for processing.Examples
>>> problem = _ConnectionProblem( ... source=unstable_manifold, ... target=stable_manifold, ... section_axis="x", ... section_offset=0.8, ... plane_coords=("y", "z"), ... direction=1, ... delta_v_tol=1e-3, ... ballistic_tol=1e-8, ... eps2d=1e-4, ... n_workers=1 ... )
See also
_ConnectionEngineEngine class that processes this problem specification.
ConnectionPipelineHigh-level class that creates these problem specifications.