Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Inherits from standalone instance
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Sep 29, 2017
1 parent 826c55f commit d54dc74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function _getloc{F, S}(constrs::Vector{C{F, S}})::Vector{Tuple{DataType, DataTyp
end

# Implementation of MOI for AbstractInstance
abstract type AbstractInstance{T} end
abstract type AbstractInstance{T} <: MOI.AbstractStandaloneInstance end

getconstrloc(m::AbstractInstance, cr::CR) = m.constrmap[cr.value]

Expand Down Expand Up @@ -137,7 +137,7 @@ MOI.cangetattribute(m::AbstractInstance, ::Union{MOI.NumberOfVariables,
MOI.ObjectiveSense}) = true

MOI.cangetattribute(m::AbstractInstance, ::Union{MOI.ConstraintFunction,
MOI.ConstraintSet}, ref) = true
MOI.ConstraintSet}, ref::MOI.AnyReference) = true

function MOI.getattribute(m::AbstractInstance, ::MOI.ConstraintFunction, cr::CR)
_getfunction(m, cr, getconstrloc(m, cr))
Expand Down

0 comments on commit d54dc74

Please sign in to comment.