Skip to content

Commit

Permalink
EmptyBlockModel always returns solutioin status MOI.Optimal
Browse files Browse the repository at this point in the history
  • Loading branch information
michel2323 committed Feb 3, 2023
1 parent e855ed2 commit 7eb1fe6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ function init!(block::EmptyBlockModel, algparams::AlgParams) end
function set_objective!(block::EmptyBlockModel, algparams::AlgParams,
primal::AbstractPrimalSolution, dual::AbstractDualSolution)
end
function get_solution(block::EmptyBlockModel) end
function get_solution(block::EmptyBlockModel)
# Empty block is always optimal
solution = (
status=MOI.OPTIMAL,
)
return solution
end

### Implementation of JuMPBlockBackend
struct JuMPBlockBackend <: AbstractBlockModel
Expand Down

0 comments on commit 7eb1fe6

Please sign in to comment.