33# Use of this source code is governed by an MIT-style license that can be found
44# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
55
6- import MathOptInterface as MOI
7-
86const MAX_MAJITER = 100_000
97const MAX_ITER = 10_000_000
108
@@ -84,6 +82,7 @@ function MOI.supports(::Optimizer, param::MOI.RawOptimizerAttribute)
8482 return haskey (PIECES_MAP, param. name) ||
8583 hasfield (Parameters, Symbol (param. name))
8684end
85+
8786function MOI. set (optimizer:: Optimizer , param:: MOI.RawOptimizerAttribute , value)
8887 if ! MOI. supports (optimizer, param)
8988 throw (MOI. UnsupportedAttribute (param))
@@ -107,6 +106,7 @@ function MOI.set(optimizer::Optimizer, param::MOI.RawOptimizerAttribute, value)
107106 end
108107 return
109108end
109+
110110function MOI. get (optimizer:: Optimizer , param:: MOI.RawOptimizerAttribute )
111111 if ! MOI. supports (optimizer, param)
112112 throw (MOI. UnsupportedAttribute (param))
@@ -124,6 +124,7 @@ function MOI.get(optimizer::Optimizer, param::MOI.RawOptimizerAttribute)
124124end
125125
126126MOI. supports (:: Optimizer , :: MOI.Silent ) = true
127+
127128function MOI. set (optimizer:: Optimizer , :: MOI.Silent , value:: Bool )
128129 optimizer. silent = value
129130 return
@@ -198,17 +199,6 @@ function MOI.supports_constraint(
198199 return true
199200end
200201
201- function _isless (t1:: MOI.VectorAffineTerm , t2:: MOI.VectorAffineTerm )
202- if t1. scalar_term. variable. value == t2. scalar_term. variable. value
203- return isless (t1. output_index, t2. output_index)
204- else
205- return isless (
206- t1. scalar_term. variable. value,
207- t2. scalar_term. variable. value,
208- )
209- end
210- end
211-
212202function _next (model:: Optimizer , i)
213203 for j in (i+ 1 ): length (model. Ainfo_entptr)
214204 if ! isempty (model. Ainfo_entptr[j])
@@ -354,6 +344,7 @@ function MOI.get(optimizer::Optimizer, ::MOI.RawStatusString)
354344 optimizer. pieces
355345 return " majiter = $majiter , iter = $iter , λupdate = $λupdate , CG = $CG , curr_CG = $curr_CG , totaltime = $totaltime , σ = $σ , overallsc = $overallsc "
356346end
347+
357348function MOI. get (optimizer:: Optimizer , :: MOI.SolveTimeSec )
358349 return MOI. get (optimizer, MOI. RawOptimizerAttribute (" totaltime" ))
359350end
@@ -477,6 +468,7 @@ function MOI.get(model::Optimizer, ::MOI.ResultCount)
477468end
478469
479470struct Factor <: MOI.AbstractConstraintAttribute end
471+
480472MOI. is_set_by_optimize (:: Factor ) = true
481473
482474function MOI. get (
0 commit comments