Skip to content

Continuous variables in GeneralizedAssignment demo #669

@rrsadykov

Description

@rrsadykov

Describe the bug

The solution is not correct when using continuous variables x instead of binary variables in the Generalized Assignment demo.

To Reproduce

using Coluna, ColunaDemos, GLPK, JuMP, BlockDecomposition

data = ColunaDemos.GeneralizedAssignment.data("play2.txt")

coluna = JuMP.optimizer_with_attributes(
    Coluna.Optimizer,
    "params" => Coluna.Params(solver = Coluna.Algorithm.BranchCutAndPriceAlgorithm()),
    "default_optimizer" => GLPK.Optimizer
)

model = BlockModel(coluna, direct_model = true)

@axis(M, data.machines)

@variable(model, x[m in M, j in data.jobs])

@constraint(model, cov[j in data.jobs], sum(x[m,j] for m in M) >= 1)

@constraint(model, knp[m in M], sum(data.weight[j,m]*x[m,j] for j in data.jobs) <= data.capacity[m])

@objective(model, Min, sum(data.cost[j,m]*x[m,j] for m in M, j in data.jobs))

@dantzig_wolfe_decomposition(model, dec, M)
subproblems = BlockDecomposition.getsubproblems(dec)
specify!.(subproblems, lower_multiplicity = 0)

BlockDecomposition.objectiveprimalbound!(model, 100)
BlockDecomposition.objectivedualbound!(model, 0)

JuMP.optimize!(model)

for m in data.machines
    w = 0.0
    for j in data.jobs
        if JuMP.value(x[m,j]) > 0.9999
            println("x[$m,$j] = ", JuMP.value(x[m,j]))
        end
    end
end

in GeneralizedAssignment demo and run the first Coluna test ("toy instance" inside "GeneralizedAssignment")

Expected behavior
Terminates with dual bound = primal bound = 100, which not normal as the optimal solution with binary variables x is 75.

Environment (please complete the following information):

  • Julia version 1.6.2
  • master branch of Coluna
  • OS: MacOs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions