MAD-NG, a standalone multiplatform tool for linear and non-linear optics design and optimisation
Laurent Deniau
TL;DR
MAD-NG delivers a stand-alone, cross-platform framework for linear and nonlinear accelerator optics design and optimization, integrating a Lua-based scripting layer with the fast GTPSA core to enable high-order, parametric analysis. By supporting multiple lattice formats, multi-lattice workflows, and a rich command set (survey, track, twiss, match, taper, etc.), it accelerates both modeling and optimization tasks, including dynamic aperture studies, through parametric maps and nonlinear normal forms. Key contributions include a highly scalable differential-algebra engine, a parametric optimization workflow that reduces Jacobian evaluations, and significant speedups over MADX-PTC (roughly $50$–$80$×), enabling rapid exploration of large design spaces for complex accelerators like the LHC and FCC-ee. The practical impact is substantial: MAD-NG enables faster, more reliable design iterations, easier integration with external tools (e.g., Python via PyMAD-NG), and robust handling of advanced features (patches, radiation, tapering, backtracking, and reversed sequences) across diverse accelerator projects.
Abstract
The paper will provide an overview of the capabilities of the Methodical Accelerator Design Next Generation (MAD-NG) tool. MAD-NG is a standalone, all-in-one, multi-platform tool well-suited for linear and nonlinear optics design and optimization, and has already been used in large-scale studies such as HiLumi-LHC or FCC-ee. It embeds LuaJIT, an extremely fast tracing just-in-time compiler for the Lua programming language, delivering exceptional versatility and performance for the forefront of computational physics. The core of MAD-NG relies on the fast Generalized Truncated Power Series Algebra (GTPSA) library, which has been specially developed to handle many parameters and high-order differential algebra, including Lie map operators. This ecosystem offers powerful features for the analysis and optimization of linear and nonlinear optics, thanks to the fast parametric nonlinear normal forms and the polyvalent matching command. A few examples and results will complete this overview of the MAD-NG application.
