Skip to content

Add option to make MOIU.@model and AbstractOptimizer #1030

@odow

Description

@odow

Currently, @model makes an AbstractModel subtype
https://github.com/JuliaOpt/MathOptInterface.jl/blob/fb303dceaa85dfff8f97e7fe13542c70fdef7754/src/Utilities/model.jl#L927
where AbstractModel is
https://github.com/JuliaOpt/MathOptInterface.jl/blob/fb303dceaa85dfff8f97e7fe13542c70fdef7754/src/Utilities/model.jl#L85

However, solvers like PATH.jl and AmplNLWriter use @model as an AbstractOptimizer. We should add a flag to let the super type be chosen by the constructor.

Alternatively, is there any reason not to make AbstractMode{T} <: MOI.AbstractOptimizer?

Re-reading, #203, it's not obvious why we have the ModelLike/AbstractOptimizer distinction.

This feels like it's a legacy of the MPB solver/instance distinction.

cc @chkwon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions