Skip to content

Different results depending the MIP solver used #122

@xgandibleux

Description

@xgandibleux

Here a tiny GAP with 3 objectives.
It is solved with the 3 algorithms (KirlikSayin, TambyVanderpooten, DominguezRios) x the 4 MIP solvers (HiGHS, GLPK, CPLEX, Gurobi).
In checking only result_count(GAP) I collected 42 points except:

  • 0 point for KirlikSayin with CPLEX and Gurobi
  • 43 points for TambyVanderpooten with HiGHS

All packages used are the latest versions.

3-GAP model

m=3; n=10
p1 = [5 1 10 8 3 5 3 3 7 2; 10 6 1 6 8 3 2 10 6 1; 2 3 1 6 9 7 1 5 4 8]
p2 = [4 6 4 3 1 6 8 2 9 7; 8 8 8 2 4 8 8 1 10 1; 8 7 8 5 9 2 2 7 10 10]
p3 = [4 3 6 4 7 5 9 5 8 4; 8 6 2 2 6 8 5 2 2 3; 2 8 10 3 5 7 5 9 5 5]
w = [5 9 3 5 10 5 7 10 7 8; 4 8 8 6 10 8 10 7 5 1; 10 7 5 8 8 2 8 1 10 3]
b = [34, 33, 31]

using JuMP
using GLPK
import MultiObjectiveAlgorithms as MOA

GAP = Model()
@variable(GAP, x[1:m, 1:n], Bin)
@expression(GAP, objective1, sum(p1[i,j]*x[i,j] for i = 1:m, j = 1:n) )
@expression(GAP, objective2, sum(p2[i,j]*x[i,j] for i = 1:m, j = 1:n) )
@expression(GAP, objective3, sum(p3[i,j]*x[i,j] for i = 1:m, j = 1:n) )
@objective(GAP, Max, [objective1,objective2,objective3])
@constraint(GAP, [i=1:m], sum(w[i,j]*x[i,j] for j = 1:n) <= b[i])
@constraint(GAP, [j=1:n], sum(x[i,j] for i = 1:m) == 1)

set_optimizer(GAP, () -> MOA.Optimizer(GLPK.Optimizer))
#set_attribute(GAP, MOA.Algorithm(), MOA.KirlikSayin())
#set_attribute(GAP, MOA.Algorithm(), MOA.DominguezRios())
set_attribute(GAP, MOA.Algorithm(), MOA.TambyVanderpooten())
set_silent(GAP)
optimize!(GAP)

YN = []
for i in 1:result_count(GAP)
    y = round.(Int, objective_value(GAP; result = i))
    push!(YN,y)
    println(i, ": z = ", y)
end

results

using CPLEX. or using Gurobi
set_attribute(GAP, MOA.Algorithm(), MOA.TambyVanderpooten())
result_count(GAP) = 42
set_attribute(GAP, MOA.Algorithm(), MOA.DominguezRios())
result_count(GAP) = 42
set_attribute(GAP, MOA.Algorithm(), MOA.KirlikSayin())
result_count(GAP) = 0

using HiGHS
set_attribute(GAP, MOA.Algorithm(), MOA.TambyVanderpooten())
result_count(GAP) = 43
set_attribute(GAP, MOA.Algorithm(), MOA.DominguezRios())
result_count(GAP) = 42
set_attribute(GAP, MOA.Algorithm(), MOA.KirlikSayin())
result_count(GAP) = 42

using GLPK.
set_attribute(GAP, MOA.Algorithm(), MOA.TambyVanderpooten())
result_count(GAP) = 42
set_attribute(GAP, MOA.Algorithm(), MOA.DominguezRios())
result_count(GAP) = 42
set_attribute(GAP, MOA.Algorithm(), MOA.KirlikSayin())
result_count(GAP) = 42

config

[a076750e] CPLEX v1.1.1
[60bf3e95] GLPK v1.2.1
[2e9cd046] Gurobi v1.7.4
[87dc4568] HiGHS v1.18.1
[4076af6c] JuMP v1.26.0
[0327d340] MultiObjectiveAlgorithms v1.4.3

Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (mac64[arm] - Darwin 23.6.0 23G93)
CPLEX Version identifier: 22.1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions