File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ Return a dictionary mapping constraint indices in the destination model back to
7575constraint indices in the source model.
7676"""
7777function _reverse_index_map (index_map:: MOI.IndexMap )
78- ret = Dict {MOI.ConstraintIndex,MOI.ConstraintIndex} ()
78+ return Dict {MOI.ConstraintIndex,MOI.ConstraintIndex} (
79+ v => k for (k, v) in index_map. con_map
80+ )
7981 for (k, v) in index_map. con_map
8082 ret[v] = k
8183 end
8890Return `true` if the constraint index is a variable-level constraint
8991(i.e., `F == MOI.VariableIndex`).
9092"""
91- function _is_variable_constraint (:: MOI.ConstraintIndex{MOI.VariableIndex} )
93+ _is_variable_constraint (:: MOI.ConstraintIndex{MOI.VariableIndex} ) = true
9294 return true
9395end
94- function _is_variable_constraint (:: MOI.ConstraintIndex )
96+
97+ _is_variable_constraint (:: MOI.ConstraintIndex ) = false
9598 return false
9699end
97100
@@ -103,8 +106,8 @@ constraint.
103106"""
104107function _is_integrality_constraint (
105108 :: MOI.ConstraintIndex{MOI.VariableIndex,S} ,
106- ) where {S}
107- return S <: Union{MOI.Integer,MOI.ZeroOne}
109+ ) where {S<: Union{MOI.Integer,MOI.ZeroOne} }
110+ return true
108111end
109112function _is_integrality_constraint (:: MOI.ConstraintIndex )
110113 return false
You can’t perform that action at this time.
0 commit comments