You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new modelling library, polar-high, was released recently by Juha Kiviluoma (Nodal-Tools Oy). It targets the same niche as linopy: an indexed LP/MIP eDSL on top of HiGHS, but uses a Polars-backed kernel instead of xarray.
The docs include a reproducible build / solve / memory comparison between polar-high, linopy, and Pyomo on indexed linear programs, all using HiGHS as the solver. The dense-LP test follows linopy's own benchmark, restricted to the linear case so polar-high can run it directly.
Dense LP — build-only headline (single-thread, HiGHS time-limited to ~1 µs to isolate modelling-layer cost)
Replication: linopy's original benchmark format (3-panel, full HiGHS solve included)
The replication is faithful: same dense LP, same closed-form optimum, HiGHS solves the same sparse matrix. linopy's published numbers reproduce within run-to-run noise.
Summary
Reported ~2.3-3.5x faster than linopy on the build path with ~30% lower peak memory. The Polars-backed lazy/columnar internals are the architectural source of the gap; linopy is xarray/dense-numpy by default.
Questions for the maintainers and community
Methodology — The linopy column uses io_api="lp" because the benchmark's time_limit short-circuit interacts cleanly with that path. Would io_api="direct" materially change the picture on the build column?
Cross-tool collaboration — Anyone here in contact with Juha / Nodal-Tools? A shared LP/MIP benchmark suite across linopy / polar-high / Pyomo (and ideally JuMP) would be useful for PyPSA-Eur-class workloads.
Not affiliated with Nodal-Tools, just a downstream PyPSA-Eur user who finds the numbers interesting.
A new modelling library, polar-high, was released recently by Juha Kiviluoma (Nodal-Tools Oy). It targets the same niche as linopy: an indexed LP/MIP eDSL on top of HiGHS, but uses a Polars-backed kernel instead of xarray.
The docs include a reproducible build / solve / memory comparison between polar-high, linopy, and Pyomo on indexed linear programs, all using HiGHS as the solver. The dense-LP test follows linopy's own benchmark, restricted to the linear case so polar-high can run it directly.
Dense LP — build-only headline (single-thread, HiGHS time-limited to ~1 µs to isolate modelling-layer cost)
At N=3000 (~18M variables):
io_api="lp")Network LP — irregular topology (N nodes, 5N edges, T=168, build-only, 1 thread)
At N=10000 (~8.4M variables):
io_api="lp")Replication: linopy's original benchmark format (3-panel, full HiGHS solve included)
The replication is faithful: same dense LP, same closed-form optimum, HiGHS solves the same sparse matrix. linopy's published numbers reproduce within run-to-run noise.
Summary
Reported ~2.3-3.5x faster than linopy on the build path with ~30% lower peak memory. The Polars-backed lazy/columnar internals are the architectural source of the gap; linopy is xarray/dense-numpy by default.
Questions for the maintainers and community
io_api="lp"because the benchmark'stime_limitshort-circuit interacts cleanly with that path. Wouldio_api="direct"materially change the picture on the build column?lp-polarsIO API writes different models tolpwhich are incorrect #484 (lp-polarsIO bugs) both touched a Polars path. Given the gap shown here, is a Polars-backed write path inside linopy worth revisiting? Or is the architectural distance from xarray too large?Not affiliated with Nodal-Tools, just a downstream PyPSA-Eur user who finds the numbers interesting.