jump-dev / Clp.jl

A Julia interface to the Coin-OR Linear Programming solver (CLP)
https://projects.coin-or.org/Clp
Other
54 stars 25 forks source link

VariableConstraints #118

Closed blegat closed 3 years ago

blegat commented 3 years ago

The following four fields: https://github.com/jump-dev/MathOptInterface.jl/blob/a1d3ed961176f65ec9f74afad455ecedbb1ce8d3/src/Utilities/model.jl#L993-L1001 are quite independent from the rest and constitute a representation of SingleVariable constraints. Many MOI wrapper reimplement that part with the VariableInfo struct. Instead of copy-pasting this VariableInfo struct implementation in all these wrappers, we could create a ModelLike in MOI.Utilities containing these 4 fields, replace these four fields by this struct in GenericModel, and use this struct as well in all wrappers. This will greatly simplify many wrappers and ensure that their behavior with SingleVariable constraint is consistent with GenericModel and as fast as GenericModel by design.

odow commented 3 years ago

Closed by #114