@cvanaret @amontoison It seems to me that this is not completely ok:
|
function _status_code_mapping(uno_termination_status::Cint, uno_solution_status::Cint) |
|
if uno_termination_status == UnoSolver.UNO_ITERATION_LIMIT |
|
return (MOI.ITERATION_LIMIT, MOI.UNKNOWN_RESULT_STATUS) # here we could test feasibility |
|
elseif uno_termination_status == UnoSolver.UNO_TIME_LIMIT |
|
return (MOI.TIME_LIMIT, MOI.UNKNOWN_RESULT_STATUS) # here we could test feasibility |
|
elseif uno_termination_status == UnoSolver.UNO_EVALUATION_ERROR |
|
return (MOI.INVALID_MODEL, MOI.UNKNOWN_RESULT_STATUS) |
|
elseif uno_termination_status == UnoSolver.UNO_ALGORITHMIC_ERROR |
|
return (MOI.OTHER_ERROR, MOI.UNKNOWN_RESULT_STATUS) |
|
else # UNO_SUCCESS |
|
if uno_solution_status == UnoSolver.UNO_FEASIBLE_KKT_POINT |
|
return (MOI.LOCALLY_SOLVED, MOI.FEASIBLE_POINT) |
|
elseif uno_solution_status == UnoSolver.UNO_FEASIBLE_FJ_POINT |
|
return (MOI.LOCALLY_SOLVED, MOI.FEASIBLE_POINT) |
|
elseif uno_solution_status == UnoSolver.UNO_INFEASIBLE_STATIONARY_POINT |
|
return (MOI.LOCALLY_INFEASIBLE, MOI.INFEASIBLE_POINT) |
|
elseif uno_solution_status == UnoSolver.UNO_FEASIBLE_SMALL_STEP |
|
return (MOI.SLOW_PROGRESS, MOI.FEASIBLE_POINT) |
|
elseif uno_solution_status == UnoSolver.UNO_INFEASIBLE_SMALL_STEP |
|
return (MOI.SLOW_PROGRESS, MOI.INFEASIBLE_POINT) |
|
else # UNO_UNBOUNDED |
|
return (MOI.DUAL_INFEASIBLE, MOI.FEASIBLE_POINT) |
|
end |
|
end |
|
end |
According to
|
const UNO_SUCCESS = Cint(0) |
|
const UNO_ITERATION_LIMIT = Cint(1) |
|
const UNO_TIME_LIMIT = Cint(2) |
|
const UNO_EVALUATION_ERROR = Cint(3) |
|
const UNO_ALGORITHMIC_ERROR = Cint(4) |
|
const UNO_USER_TERMINATION = Cint(5) |
|
|
|
const UNO_NOT_OPTIMAL = Cint(0) |
|
const UNO_FEASIBLE_KKT_POINT = Cint(1) |
|
const UNO_FEASIBLE_FJ_POINT = Cint(2) |
|
const UNO_INFEASIBLE_STATIONARY_POINT = Cint(3) |
|
const UNO_FEASIBLE_SMALL_STEP = Cint(4) |
|
const UNO_INFEASIBLE_SMALL_STEP = Cint(5) |
|
const UNO_UNBOUNDED = Cint(6) |
I would write
function _status_code_mapping(uno_termination_status::Cint, uno_solution_status::Cint)
if uno_termination_status == UnoSolver.UNO_ITERATION_LIMIT
return (MOI.ITERATION_LIMIT, MOI.UNKNOWN_RESULT_STATUS) # here we could test feasibility
elseif uno_termination_status == UnoSolver.UNO_TIME_LIMIT
return (MOI.TIME_LIMIT, MOI.UNKNOWN_RESULT_STATUS) # here we could test feasibility
elseif uno_termination_status == UnoSolver.UNO_EVALUATION_ERROR
return (MOI.INVALID_MODEL, MOI.UNKNOWN_RESULT_STATUS)
elseif uno_termination_status == UnoSolver.UNO_ALGORITHMIC_ERROR
return (MOI.OTHER_ERROR, MOI.UNKNOWN_RESULT_STATUS)
elseif uno_optimization_status == UnoSolver.UNO_USER_TERMINATION
return (MOI.INTERRUPTED, MOI.UNKNOWN_RESULT_STATUS) # THIS IS NEW
else # UNO_SUCCESS
if uno_solution_status == UnoSolver.UNO_FEASIBLE_KKT_POINT
return (MOI.LOCALLY_SOLVED, MOI.FEASIBLE_POINT)
elseif uno_solution_status == UnoSolver.UNO_FEASIBLE_FJ_POINT
return (MOI.LOCALLY_SOLVED, MOI.FEASIBLE_POINT)
elseif uno_solution_status == UnoSolver.UNO_INFEASIBLE_STATIONARY_POINT
return (MOI.LOCALLY_INFEASIBLE, MOI.INFEASIBLE_POINT)
elseif uno_solution_status == UnoSolver.UNO_FEASIBLE_SMALL_STEP
return (MOI.SLOW_PROGRESS, MOI.FEASIBLE_POINT)
elseif uno_solution_status == UnoSolver.UNO_INFEASIBLE_SMALL_STEP
return (MOI.SLOW_PROGRESS, MOI.INFEASIBLE_POINT)
elseif uno_solution_status == UnoSolver.UNO_UNBOUNDED
return (MOI.DUAL_INFEASIBLE, MOI.FEASIBLE_POINT)
else # UNO_NOT_OPTIMAL
return .... # TO BE COMPLETED
end
end
end
@cvanaret @amontoison What do you think?
When you set max_iterations to 0, then you get optimization_status = UNO_SUCCESS, solution_status = UNO_NOT_OPTIMAL which falls in
|
else # UNO_UNBOUNDED |
|
return (MOI.DUAL_INFEASIBLE, MOI.FEASIBLE_POINT) |
@cvanaret @amontoison It seems to me that this is not completely ok:
Uno/interfaces/Julia/ext/UnoSolverMathOptInterfaceExt/MOI_wrapper.jl
Lines 1465 to 1489 in b7dbdfb
According to
Uno/interfaces/Julia/src/libuno.jl
Lines 26 to 39 in b7dbdfb
I would write
@cvanaret @amontoison What do you think?
When you set
max_iterationsto 0, then you getoptimization_status = UNO_SUCCESS, solution_status = UNO_NOT_OPTIMALwhich falls inUno/interfaces/Julia/ext/UnoSolverMathOptInterfaceExt/MOI_wrapper.jl
Lines 1485 to 1486 in b7dbdfb