Skip to content

Preserve coefficient types in LP export - #3152

Open
Kiril1Shevtsov wants to merge 1 commit into
jump-dev:masterfrom
Kiril1Shevtsov:fix/lp-export-abstract-float
Open

Kiril1Shevtsov wants to merge 1 commit into
jump-dev:masterfrom
Kiril1Shevtsov:fix/lp-export-abstract-float

Conversation

@Kiril1Shevtsov

@Kiril1Shevtsov Kiril1Shevtsov commented Nov 23, 2026 •

Copy link
Copy Markdown

Summary

Fix LP file writing to support coefficient types other than Float64.

Previously, the LP writer assumed that coefficients were Float64, which could cause problems when writing models using other floating-point types.

The change removes this assumption and allows coefficients to be written using different numeric precisions, including Float16, Float32, and BigFloat.

Motivation

LP file writing should not depend on coefficients being represented specifically as Float64. Models using other supported floating-point types should be handled correctly without requiring users to convert their coefficients beforehand.

This fix addresses that limitation while keeping the change focused on LP serialization.

Testing

The updated implementation was tested with Float16, Float32, and BigFloat coefficients.

Results:

  • 507/507 LP format tests passed, including 27 new tests.
  • 21 additional independent checks passed.

These results cover the tested coefficient types and LP-writing behavior, rather than establishing support for every possible numeric type.

Notes

ChatGPT was used to translate this PR description into English, review the code for potential issues, suggest fixes that I subsequently verified myself, assist with writing tests, and help assess their correctness.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant