This repository is an independent fork of Telecominfraproject/oopt-gnpy, branched from upstream tag
v2.13and released here asv3.0.0+thesis. It is maintained for the doctoral research of Matheus Lôbo dos Santos (Federal University of Pernambuco, Brazil) and is not endorsed by the Telecom Infra Project. For production use, go upstream.Three CPU-bound routines of the nonlinear-interference (NLI) computation in
gnpy.core.science_utilswere reimplemented with Numba just-in-time compilation. The mathematical expressions and the physical models are untouched — the changes are to memory traffic and loop structure only. The compiled kernels live in the new modulegnpy.core.numba_optimizations:
Kernel Change _approx_psi_leff_computation_numbaeffective length reorganized algebraically from O(N²)toO(N), which also removes the intermediate matrices that only held partial resultsscalar_raised_cosine,raised_cosine_numbaraised-cosine pulse shaping evaluated as a compiled scalar inside the integration loop, instead of rebuilding NumPy temporaries at every step _generalized_psi_inner_loop_numbageneralized Ψ kernel restructured to reuse preallocated buffers, with an explicit trapezoidal rule for non-uniform frequency spacing replacing the general-purpose quadrature Two upstream failure modes are also removed: a division by zero for ideal filters (roll-off equal to zero) and silent NaN propagation in the limiting cases of vanishing attenuation or dispersion. In both limits this fork converges to the correct analytical limit of the GGN approximation.
Verified against the upstream implementation over 30,606 independent scenarios spanning WDM and EON transmission in the L, C and S bands, under a pre-emphasis profile with central launch powers of −1, 0 and +1 dBm:
- maximum relative error 2.23 × 10⁻¹⁵
- maximum absolute GSNR difference 1.07 × 10⁻¹⁴ dB
Both are at the level of floating-point rounding. Measured speedups: 2.58× to 2.82× for the multiband EON scenarios and 5.32× for the reference WDM case.
pip install .[performance]enables the acceleration. Without Numba the code falls back automatically to the pure NumPy path, so results are unchanged and only the runtime differs.
examples/numba_performance_demo.py,examples/test_numba_integration.pyandexamples/test_generalized_psi_optimization.pyare demonstration scripts, not part of the official test suite — run them manually.This release is archived on Zenodo as doi:10.5281/zenodo.21774610. Cite that DOI — it is the version DOI and always resolves to this exact snapshot, which is what a reproducibility claim needs. See
CITATION.cfffor the full entry and for the paper to cite alongside it.Please also cite upstream GNPy — doi:10.5281/zenodo.3458319 — since everything here is a derivative work of it.
GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks. We are a consortium of operators, vendors, and academic researchers sponsored via the Telecom Infra Project's OOPT/PSE working group. Together, we are building this tool for rapid development of production-grade route planning tools which is easily extensible to include custom network elements and performant to the scale of real-world mesh optical networks.
Install either via Docker, or as a Python package. Read our documentation, learn from the demos, and get in touch with us.
This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power:
GNPy can do much more, including acting as a Path Computation Engine, tracking bandwidth requests, or advising the SDN controller about a best possible path through a large DWDM network.
Learn more about this in the documentation, or give it a try online at gnpy.app:
See upcoming meetings on the Project Calendar. The calendar is embedded from Google Calendar and updates automatically.

