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.
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 theVariableInfo
struct. Instead of copy-pasting this VariableInfo struct implementation in all these wrappers, we could create aModelLike
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.