Changelog#
3.1.0 (unreleased)#
Features#
Added generic zero-order-hold multiple-shooting trajectory legs, available as
zoh_msin C++ andzoh_ms_pyin pure Python. They accept user-provided dynamics and controls, propagate each segment independently in the forward or backward direction, and expose segment defects for enforcing trajectory continuity.
Build system#
Added CMake option
kep3_BUILD_CPP_LIBRARY(defaultON). When set toOFF, the C++ library is not built from source and CMake will instead locate an existing installation viafind_package. A descriptiveFATAL_ERRORis emitted if the library cannot be found. This makes it possible to build only the Python bindings, tests, or benchmarks against an already-installedkep3.
Bug fixes#
Fixed
knnnearest-neighbour queries. Results are now normalised to arrays and the unreachable entries dropped, so a query that matches nothing returns three empty lists. Both theorbitaland theeuclideanmetrics were affected.Fixed pickling of TOPS gym classes. The lambdas passed as
state2cartand equivalent callbacks to the internal UDP prevented serialization. They were replaced withfunctools.partial()wrapping small module-level helper functions (_cart_scale,_mee_to_cart,_cfunc_call), which are picklable by name.Fixed pickling of
zoh. The C++ class is bound as_zoh_cppinpykep.core, so pickle looked forpykep.leg._zoh_cppwhen reconstructing objects. The alias was missing frompykep/leg/__init__.py(only_zohwas defined). Added_zoh_cpp = _core._zoh_cppto make the lookup succeed, consistent with the existing_sims_flanaganand_sims_flanagan_alphaaliases.Fixed several bugs in
pl2pl_N_impulses: a crash whenphase_free=Falseandt0_bounds=None(t0was assigned instead oft0_bounds); a dead/unreachableN_max < 2guard;plot_primer_vectorusingMU_SUNinstead ofself._common_mu; alpha lower bounds of0.0in phase-free mode (now1e-3, consistent with the non-phase-free path, to avoidlog(0)inalpha2direct). Theprettymethod was also corrected to print times-of-flight in days (the internaldecodestores durations in seconds, and the conversion was missing).
3.0.0 (23-05-2026)#
pykep 3 is a complete reimagination of the library: a new C++23 core, a clean
pybind11 Python interface, type-erased user-defined abstractions (udpla,
udp, uda), native integration with pagmo and heyoka, and an expanded
set of low-thrust transcriptions and benchmark problems.