Skip to content

fix documentation and subtype for optimizer - #40

Open
matbesancon wants to merge 1 commit into
JuliaOptimalTransport:mainfrom
matbesancon:fix-doc
Open

fix documentation and subtype for optimizer#40
matbesancon wants to merge 1 commit into
JuliaOptimalTransport:mainfrom
matbesancon:fix-doc

Conversation

@matbesancon

Copy link
Copy Markdown

There is a sentence probably left from older version implying that there are only two solvers, while any MOI-compatible LP solver will do

@devmotion

Copy link
Copy Markdown
Member

IIRC the formulation in the docstring is intentional as these are the only two optimisers that are tested.

@matbesancon

Copy link
Copy Markdown
Author

Given that MOI is a stable package that itself tests the contract of solvers, and that no internal feature of either solvers is used (EOT uses only standard MOI functions), I don't think the doc needs that level of caution

@devmotion

Copy link
Copy Markdown
Member

that no internal feature of either solvers is used (EOT uses only standard MOI functions), I don't think the doc needs that level of caution

I don't know, based on #39 my impression is that the code requires features that even Clp does not support anymore. When loosening the docstring, probably users might be inclined to try even more optimisers and expect them to be supported, so it might be good to at least check more explicitly for the required features in our code and throw more descriptive error messages (e.g. suggesting one of the tested optimisers).

@matbesancon

matbesancon commented Apr 28, 2026

Copy link
Copy Markdown
Author

The problem is not solver-dependent, it's about the conventions of the solver themselves. Clp does not support incremental changes, a bunch of solvers are like that, a solution would be to use the two-argument optimize!:
https://jump.dev/MathOptInterface.jl/stable/reference/models/#MathOptInterface.optimize!-Tuple%7BMathOptInterface.ModelLike,%20MathOptInterface.ModelLike%7D

or equivalently MOI.copyto!

I'll add a fix in this PR and rename it

@devmotion

Copy link
Copy Markdown
Member

It supported it in previous versions as it was working previously. There must have been an upstream change.

@matbesancon

Copy link
Copy Markdown
Author

yes essentially Clp does not support adding variables IIRC, and there was before an additional layer in the Clp wrapper that was compensating this. The whole JuMP ecosystem tried to make wrappers thinner by moving these additional layers out.

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