File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function solve_tamby_mokp(;
1414 instance:: Int ,
1515 optimizer:: Any ,
1616 algorithm:: MOA.AbstractAlgorithm ,
17- silent:: Bool = true ,
17+ silent:: Bool = false ,
1818 time_limit:: Float64 = 600.0 ,
1919)
2020 filename = joinpath (@__DIR__ , " MOKP" , " MOKP_p-$(p) _n-$(n) _$(instance) .dat" )
@@ -38,6 +38,7 @@ function solve_tamby_mokp(;
3838 return (;
3939 result_count = result_count (model),
4040 solve_time = solve_time (model),
41+ solve_time_inner = get_attribute (model, MOA. SolveTimeSecInner ()),
4142 subproblem_count = get_attribute (model, MOA. SubproblemCount ()),
4243 )
4344end
Original file line number Diff line number Diff line change 343343
344344# ## SolveTimeSec
345345
346- function MOI. get (model:: Optimizer , :: MOI.SolveTimeSec )
347- return model. solve_time
348- end
346+ MOI. get (model:: Optimizer , :: MOI.SolveTimeSec ) = model. solve_time
347+
348+ # ## SolveTimeSecInner
349+
350+ """
351+ SolveTimeSecInner <: AbstractModelAttribute -> Float64
352+
353+ A result attribute for querying the total solve time of subproblem solves by an
354+ algorithm.
355+ """
356+ struct SolveTimeSecInner <: MOI.AbstractModelAttribute end
357+
358+ MOI. is_set_by_optimize (:: SolveTimeSecInner ) = true
359+
360+ MOI. get (model:: Optimizer , :: SolveTimeSecInner ) = model. solve_time_inner
349361
350362# ## ObjectiveFunction
351363
You can’t perform that action at this time.
0 commit comments