Skip to content

Default the IAS15 integrator to the modern (mode 2) adaptive step controller - #438

Merged
matthewholman merged 2 commits into
mainfrom
feat/ias15-adaptive-mode-2-default
Jul 14, 2026
Merged

Default the IAS15 integrator to the modern (mode 2) adaptive step controller#438
matthewholman merged 2 commits into
mainfrom
feat/ias15-adaptive-mode-2-default

Conversation

@matthewholman

Copy link
Copy Markdown
Collaborator

Summary

Change the default of the IAS15 adaptive step-size controller from the legacy controller (mode 1) to the newer controller of Pham, Rein & Spiegel (2024) (mode 2). Concretely this flips a single global default in orbit_fit.cpp (g_ias15_adaptive_mode, -1 -> 2) and updates its comment. The knob itself and its per-simulation application were added in #324 and are unchanged.

Motivation

assist_attach() sets IAS15 to the legacy adaptive controller, which drives the integration timestep toward zero during close encounters with the Earth. A single such integration can then fail to return, hanging the orbit fit and consuming the wall-clock budget. This was the entire "timeout / hang" class encountered while re-fitting the full Minor Planet Center (MPC) catalog: close-approaching near-Earth objects (NEOs) that never completed under the legacy controller.

The mode-2 controller steps through these encounters efficiently. Crucially, correctness is independent of the controller -- the step controller only decides whether and how quickly an integration completes, never the resulting orbit. In the full-catalog run, the 40 hardest close-NEO cases (perihelion 0.24-1.02 AU) that hung under the legacy controller all completed in under 0.5 s under mode 2, with fitted states identical (to numerical tolerance) across controllers. Hanno Rein suggested this controller in the #324 review as a cleaner alternative to the minimum-timestep floor.

Change

  • src/lib/orbit_fit/orbit_fit.cpp: g_ias15_adaptive_mode default -1 -> 2 (+ comment).
  • No API change. set_ias15_adaptive_mode() / get_ias15_adaptive_mode() still let a caller override (e.g. -1 to restore the legacy behavior, 1 to force it explicitly).
  • The fit path, both predict paths, and the IOD picker already call apply_ias15_adaptive_mode() after assist_attach, so all of them pick up the new default.

Tests

  • test_ias15_settings.py: updated the default-value test to assert the new default (2).
  • Added test_fit_is_mode_independent (guarded by requires_ephem): a well-behaved object fit under the legacy controller (mode 1) and the modern controller (mode 2) returns the same state -- verified locally that the two fits agree bit-for-bit.

Scope / caveats

  • This addresses the integrator hang class only. It does not fix the separate 2020 CD3 case, whose fit fails from a numerical breakdown in the observation model / variational partials during a sub-0.0003 AU topocentric pass -- a distinct, lower-priority item.

Related

matthewholman and others added 2 commits July 13, 2026 22:04
Flip the g_ias15_adaptive_mode default from -1 (leave ASSIST's legacy mode 1)
to 2, the Pham, Rein & Spiegel (2024) controller. The knob and its per-sim
application (added in #324) are unchanged; this only changes the default, so
the fit path, both predict paths, and the IOD picker all use the modern
controller by default.

The legacy controller drives the timestep toward zero at close-Earth
approaches, so a single integration can hang and burn the wall clock -- the
entire timeout/hang class in the MPC full-catalog run. Mode 2 steps through
those encounters efficiently; correctness is mode-independent (the controller
only decides whether/how fast a fit completes, not the resulting orbit). In
the full-catalog run the 40 hardest close-NEO cases all completed in <0.5 s.
Callers can still override via set_ias15_adaptive_mode().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the default-value test to assert the new default (2), and add
test_fit_is_mode_independent (requires_ephem): a well-behaved object fit
under the legacy controller (mode 1) and the modern controller (mode 2)
returns the same state, so correctness is controller-independent. Verified
against a built layup (the two fits agree bit-for-bit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@matthewholman
matthewholman requested a review from kjnapier July 14, 2026 02:20

@kjnapier kjnapier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@matthewholman
matthewholman merged commit 60b5b75 into main Jul 14, 2026
10 of 11 checks passed
@matthewholman
matthewholman deleted the feat/ias15-adaptive-mode-2-default branch July 14, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants