Skip to content

The strange behavior of the disjunction constraint #1240

Description

@abb-omidi

@Joao-Dionisio,

Hi,
I hope you are doing well. I tried to analyze the logical capability of the SCIP solver through the PySCIPOpt wrapper to solve a scheduling problem. Also, as an extension of question #1055. The logical constraint I was trying to run is of the form:

$$ (x_{i,m} \land x_{j,m}) \implies (start_{j} \geq finish_{i} \lor start_{i} \geq finish_{j}) $$

It says that if jobs $i$ and $j$ are being assigned to the same machine, they do not overlap. However, it is a series of $\lor$ clauses of the form:

$$ (\lnot x_{i,m}) \lor (\lnot x_{j,m}) \lor (start_{j} \geq finish_{i}) \lor (start_{i} \geq finish_{j}) $$

    for i, j in mapping:
        for m in nb_m:
            model.addConsDisjunction(
                [
                    z[i, m] == 0,
                    z[j, m] == 0,
                    finish[i] <= start[j],
                    finish[j] <= start[i],
                ],
                name=f"disj_{i}_{j}_{m}",
            )

As long as I was running the example with a few tasks/jobs, the model works well without throwing any error, while I extend the jobs, the model solves to optimality with the wrong solution!!!

# The optimal solution
SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 54.66
Solving Nodes      : 729
Primal Bound       : +7.40000000000000e+01 (20 solutions)
Dual Bound         : +7.40000000000000e+01
Gap                : 0.00 %
# The wrong solution
SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 2.06
Solving Nodes      : 2659 (total of 3555 nodes in 2 runs)
Primal Bound       : +8.10000000000000e+01 (1 solutions)
Dual Bound         : +8.10000000000000e+01
Gap                : 0.00 %

I am running scip = 10.0.2, and pyscipopt = 6.2.1.

If you need any further information, just let me know.
All the best
Abbas

PMSP_Logical.txt

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