PyKEP: Open-Source Toolkit for Interplanetary Design
- PyKEP is an open-source software environment that integrates fast astrodynamics primitives such as Lambert solvers, Taylor propagators, and Sims–Flanagan low-thrust methods.
- It enables rapid assembly and evaluation of trajectory building blocks through methods like beam search, tree search, and porkchop grid generation for preliminary mission planning.
- The toolkit supports complex applications including multi-asteroid rendezvous, phasing value computations using orbital indicators, and efficient node ranking for global trajectory exploration.
Searching arXiv for the specified paper to ground the response. PyKEP is an open-source library focused on preliminary interplanetary mission design. In the treatment centered on "Designing Complex Interplanetary Trajectories for the Global Trajectory Optimization Competitions" (Izzo et al., 2015), it is presented as a software environment that wraps fast, well-tested astrodynamics primitives and transcriptions to quickly assemble trajectory building blocks, evaluate feasibility, and feed optimization or tree-search algorithms. The chapter uses PyKEP both to introduce fundamental problems of space flight mechanics and to formulate a multiple asteroid rendezvous strategy related to the 7th edition of the Global Trajectory Optimization Competition, with particular emphasis on Lambert transfers, low-thrust transcriptions, phasing indicators, clustering, and beam-search-based global exploration (Izzo et al., 2015).
1. Position within preliminary interplanetary design
PyKEP is used for a typical preliminary-design workflow in which bodies, ephemerides, and epochs are first defined; transfer legs are then computed via Lambert methods under impulsive assumptions or via transcribed low-thrust arcs; , mass, and time budgets are sized; coarse grids such as porkchops are generated to identify windows; and a global search is performed using beam search, tree search, or heuristics guided by surrogate metrics, after which promising sequences are refined (Izzo et al., 2015).
Within that workflow, the chapter employs PyKEP to query ephemerides and simple planet models, including JPL low-precision models for Earth and Mars; solve the Kepler initial value problem with Lagrange coefficients through propagate_lagrangian; solve Lambert’s boundary value problem through lambert_problem, including multi-revolution branches when desired; numerically propagate constant-thrust arcs with a Taylor-series integrator through propagate_taylor; transcribe and evaluate low-thrust optimal control problems with the Sims–Flanagan method through sims_flanagan spacecraft and leg objects; compute and use phasing indicators and clustering; and orchestrate tree searches, including beam search and MOBS, to generate, rank, and prune trajectory candidates (Izzo et al., 2015).
The chapter also notes that PyKEP ships tools for gravity-assist sequence exploration, such as MGA and MGA-1DS, and that porkchop-style grid generation can be built by sweeping Lambert solves across departure and arrival grids. These are described as typical preliminary-design tools even though they are not the main focus of the chapter. A plausible implication is that the library is intended less as a monolithic mission optimizer than as a composable toolkit for rapid assembly of trajectory-analysis pipelines.
2. Core astrodynamics primitives and transcriptions
A central building block is Lambert’s problem, formulated as a two-body boundary-value problem,
The inputs are , , , , the transfer geometry, and the multi-revolution index; the outputs are the departure and arrival velocities and , with possibly multiple branches, including $0$-rev and higher-revolution solutions, and prograde or retrograde cases. PyKEP exposes this through the pattern 24 and uses Izzo’s solver. For zero-revolution transfers, the chapter reports near-constant runtime across geometries; in the chapter’s measurements, a $0$-rev Lambert problem took approximately 0 on a single thread of an Intel i7-4600U, corresponding to roughly 1k Lambert problems per second (Izzo et al., 2015).
For unperturbed two-body propagation, PyKEP wraps the Lagrange 2–3 formulation,
4
via propagate_lagrangian(rs, vs, dt, mu). The coefficients depend on 5, the universal variable 6, the Stumpff functions 7 and 8, and the geometry, allowing propagation without explicit numerical integration for the unperturbed two-body motion.
For constant-thrust propagation, the chapter uses propagate_taylor, described as a Taylor-series integrator for perturbed Keplerian motion with constant thrust and mass flow. For low-thrust optimal control problems, the principal transcription is the Sims–Flanagan method. The chapter’s representative pattern constructs a sims_flanagan.spacecraft, defines initial and final spacecraft states through sims_flanagan.sc_state, and builds a sims_flanagan.leg; mismatch constraints and throttle constraints are then evaluated through leg.mismatch_constraints() and leg.throttles_constraints(). This makes the transcription directly usable as a feasibility filter or as a component in broader search strategies (Izzo et al., 2015).
These components are used as interoperable primitives rather than as isolated solvers. Lambert arcs support impulsive screening and seeding, while Sims–Flanagan legs support low-thrust feasibility analysis and resource accounting. This suggests that PyKEP’s design emphasizes high-throughput evaluation of candidate transfers under preliminary-design assumptions.
3. Mechanical relations and trajectory evaluation
The chapter places PyKEP’s software abstractions within standard space-flight mechanics. In addition to Lambert’s boundary-value problem and the Kepler initial value problem,
9
it recalls elliptic Kepler’s equation,
0
and the vis-viva relation,
1
These are described as relations used internally by lambert_problem and ephemerides routines and as underpinning analytics in two-body propagation and orbital energy checks (Izzo et al., 2015).
Mass and velocity budgeting are organized around the Tsiolkovsky rocket equation,
2
and, for constant thrust,
3
For impulsive Lambert legs, 4 accounting is performed by matching encounter relative velocities:
5
For low-thrust legs, mass flow enters the Sims–Flanagan and Taylor propagators directly.
The chapter also describes porkchop data generation as a grid over departure times 6 and arrival times 7, with metrics such as 8, 9, and time of flight. PyKEP facilitates these grids by looping ephemerides queries and Lambert solves. The concrete examples use planet.jpl_lp('earth'), planet.jpl_lp('mars'), and epochs in mjd2000, with explicit conversion of time of flight to seconds before calling lambert_problem. The text explicitly warns that misaligned units, for example mixing days and seconds, will corrupt time of flight and 0; it also notes that the chapter’s examples often use non-dimensional units inside PyKEP and therefore require consistent unit handling when mixing m/s, AU/day, and related conventions (Izzo et al., 2015).
A common misconception in preliminary mission design is that coarse dynamical models are intrinsically inappropriate for algorithmic search. The chapter instead adopts heliocentric two-body dynamics, Keplerian asteroid ephemerides, and constant-thrust arcs for the preliminary phase. This does not assert sufficiency for final flight design; rather, it identifies a deliberate trade between dynamical fidelity and tractable global exploration.
4. GTOC7-inspired multiple-asteroid rendezvous formulation
The chapter’s principal case study is a multiple asteroid rendezvous problem related to GTOC7. The target set contains 1 main-belt asteroids with Keplerian ephemerides. The spacecraft parameters are 2, propellant mass 3, 4, and 5. The mission duration is limited to 6 years, with a minimum stay time per asteroid of 7 days. The start date lies in 8 MJD2000, and the spacecraft can be placed on a chosen starting asteroid at a chosen date. Rendezvous requires perfect position and velocity match; the dynamics are heliocentric two-body; and low-thrust propulsion is used for transfers, evaluated through Sims–Flanagan and Taylor propagation. The stated objective is to maximize the number of asteroid rendezvous under the remaining time and remaining mass resources (Izzo et al., 2015).
The global-search strategy is MOBS, a multi-objective beam search. A node is defined by the sequence of visited asteroids together with the non-dimensional remaining resources
9
At each node, the branch procedure first selects up to 0 candidate next asteroids through 1-nearest neighbors in the orbital-indicator metric 2; for each candidate, it then solves an earliest-arrival low-thrust optimal control problem to obtain the earliest feasible arrival time 3; if such a solution exists, it solves a set of fixed-arrival minimum-mass optimal control problems with
4
to capture feasible variants; and each feasible solution yields updated 5 and 6 and therefore an extended node (Izzo et al., 2015).
Nodes at the same depth are ranked through a node value 7. The options tested in the chapter are best mass 8, best time 9, the soft minimum
0
and Pareto dominance 1. The beam keeps the best 2 nodes for further expansion. The compact pseudocode in the chapter is:
25
The constraints handled in this formulation include departure and arrival windows 3 when computing phasing, mission-horizon tracking through 4 across legs, and enforcement of the minimum stay time 5 between rendezvous events. Maximum time of flight per leg is enforced implicitly by the earliest-arrival and fixed-arrival checks. The chapter also notes that launch 6 limits are not central to this belt-mission setup because the spacecraft is delivered to the starting asteroid (Izzo et al., 2015).
5. Phasing value, surrogates, and clustering
The chapter introduces the phasing value as a multi-objective measure of the transfer quality between asteroids. With the spacecraft 7 at asteroid 8 at time 9, Lambert problems are considered to a target asteroid 0 over 1, with thrust feasibility constrained by
2
The associated objectives are
3
subject to 4. The phasing value is the hypervolume of the Pareto front for 5, using the reference point
6
A larger hypervolume corresponds to better phasing, meaning more and deeper feasible trade-offs between lower 7 and earlier arrival (Izzo et al., 2015).
Because direct phasing-value computation is expensive, the chapter introduces two fast surrogates. The Euclidean indicator is
8
which captures proximity in phase space but cannot distinguish converging from diverging relative motion. The orbital indicator is based on a linearized transfer model:
9
with
0
If asteroid 1 at epoch 2 is mapped to
3
then 4, i.e. Euclidean distance in 5D (Izzo et al., 2015).
This representation enables 6-d-tree acceleration. The chapter gives complexity figures of 7 to build the tree and 8 to query 9 nearest neighbors. In the reported tests, one $0$0-NN computation, including tree construction, took approximately $0$1 s, whereas computing all phasing values $0$2 took about $0$3 minutes; Kendall-$0$4 correlations confirmed that $0$5 performed better than $0$6 as a ranking surrogate (Izzo et al., 2015). The practical implication is direct: a computationally expensive multi-objective transfer-quality calculation can be replaced by an inexpensive metric that preserves the search order sufficiently well for large-scale branching.
The same orbital-indicator vectors support clustering. A cluster is defined as a subset of asteroids at a given epoch $0$7 whose pairwise $0$8 distances are small, specifically within $0$9. The chapter proposes DBSCAN with Euclidean metric on the orbital-indicator vectors, using parameters $0$0 and $0$1, where $0$2 is interpretable as a $0$3 budget under the linear model and $0$4 is the minimum number of neighbors for a core point. The stated procedure is to compute the $0$5D vectors, run DBSCAN, identify core and border points, discard outliers, and then choose the start epoch by scanning for epochs with large clusters, selecting the initial asteroid from the core of the largest cluster. Runtime is described as scaling well for $0$6–$0$7 because the index build is $0$8 and region queries are fast (Izzo et al., 2015).
6. Reported performance, limitations, and comparative context
Under the parameter set $0$9, 00, 01, 02, 03 years, and 04 days, the chapter reports that MOBS consistently found sequences of length 05, occasionally found 06, and did not reach 07 in the reported runs; the best sequence length reported in the competition was 08 (Izzo et al., 2015). For node ranking, best time 09 was the most effective node value, while best mass 10 performed poorly; soft-min and Pareto-based ranking were intermediate. The chapter interprets this as evidence that time is the scarcer resource in the stated setup.
Clustering materially affected success rates. Starting inside a large cluster with 11 and 12 significantly improved outcomes, and epochs near approximately 13 MJD2000 exhibited notably large clusters, identified as good-phasing epochs (Izzo et al., 2015). This suggests that start-state selection is not merely an initialization detail but a dominant determinant of reachable sequence length.
The computational campaign was substantial. The chapter reports approximately 14 million optimal control problem evaluations across 15 MOBS runs; one MOBS run required approximately 16 hour on a 17 GHz multi-core machine; and the overall campaign ran in about 18 days on 19 cores with 20 hyperthreads (Izzo et al., 2015). Several practical guidelines are stated explicitly: keep mr=0 for most Lambert calls unless multi-revolution branches are needed; use 21-d trees for nearest-neighbor selection and DBSCAN neighborhood operations; use the Taylor integrator for constant-thrust propagation because its runtime scales roughly linearly with integration time; enforce throttle constraints in Sims–Flanagan legs; and drive mismatch constraints near zero for feasibility.
The limitations are also explicit. Full phasing-value computation through a multi-objective Lambert search with hypervolume is expensive at scale, whereas the orbital indicator 22 provides an effective surrogate with strong rank correlation. Global search trees grow rapidly, so beam search with cluster-guided starts is used to provide predictable runtime per depth, approximately 23 cost per branch, and thereby budget control (Izzo et al., 2015).
In comparative terms, PyKEP is described as providing fast, open-source implementations of Lambert solvers, ephemerides, low-thrust transcriptions such as Sims–Flanagan, and numerical propagators, making rapid prototyping of global search strategies tractable and allowing integration with external optimizers including IPOPT, SNOPT, and WORHP without vendor lock-in. Tree-search strategies such as beam search and Monte Carlo Tree Search are characterized as algorithmic layers on top of these building blocks. Compared with dedicated flight-dynamics environments, PyKEP is said to trade high-fidelity perturbations for speed and simplicity in preliminary design, precisely the regime exploited in the chapter through Keplerian asteroids, a heliocentric two-body baseline, and constant-thrust arcs (Izzo et al., 2015).