Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/MultiObjectiveAlgorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,8 @@ function _optimize!(model::Optimizer)
status, solutions = optimize_multiobjective!(algorithm, model)
model.termination_status = status
if solutions !== nothing
model.solutions = solutions
_sort!(model.solutions, MOI.get(model, MOI.ObjectiveSense()))
sense = MOI.get(model, MOI.ObjectiveSense())
model.solutions = filter_nondominated(sense, solutions)
end
if !model.silent
_print_footer(stdout, model)
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/EpsilonConstraint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ function minimize_multiobjective!(
bound = min(Y[1] - constant - ε, bound - ε)
end
MOI.delete(model, ci)
return status, filter_nondominated(MOI.MIN_SENSE, solutions)
return status, solutions
end
2 changes: 1 addition & 1 deletion src/algorithms/KirlikSayin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,5 @@ function minimize_multiobjective!(algorithm::KirlikSayin, model::Optimizer)
MOI.delete.(model, ε_constraints)
MOI.delete(model, zₖ_constraint)
end
return status, filter_nondominated(MOI.MIN_SENSE, solutions)
return status, solutions
end
3 changes: 1 addition & 2 deletions src/algorithms/Lexicographic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ function optimize_multiobjective!(algorithm::Lexicographic, model::Optimizer)
break
end
end
sense = MOI.get(model.inner, MOI.ObjectiveSense())
return status, filter_nondominated(sense, solutions)
return status, solutions
end

function _solve_in_sequence(
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/RandomWeighting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ function optimize_multiobjective!(algorithm::RandomWeighting, model::Optimizer)
end
solutions = filter_nondominated(sense, solutions)
end
return MOI.OPTIMAL, filter_nondominated(sense, solutions)
return MOI.OPTIMAL, solutions
end
5 changes: 2 additions & 3 deletions test/algorithms/Sandwiching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ function test_molp_2()
C = Float64[3 -2; -1 2]
A = Float64[-4 -8; 3 -6; 4 -2; 1 0; -1 3; -2 4; -6 3]
b = Float64[-8, 6, 14, 6, 15, 18, 9]
results = sort([
[1.0, 5.0] => [-7.0, 9.0], # not sure about this
results = [
[3.0, 6.0] => [-3.0, 9.0],
[4.0, 1.0] => [10.0, -2.0],
[6.0, 5.0] => [8.0, 4.0],
[6.0, 7.0] => [4.0, 8.0],
])
]
sense = MOI.MAX_SENSE
return _test_molp(C, A, b, results, sense)
end
Expand Down
Loading