Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MOI.AllDifferent #37

Merged
merged 3 commits into from
Oct 9, 2024
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
36 changes: 0 additions & 36 deletions .appveyor.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/GitHubCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,3 @@ jobs:
- uses: codecov/codecov-action@v4
with:
file: lcov.info
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
[![DOI](https://zenodo.org/badge/240344723.svg)](https://zenodo.org/badge/latestdoi/240344723)

[![Continuous integration](https://github.com/JuliaConstraints/ConstraintProgrammingExtensions.jl/actions/workflows/GitHubCI.yml/badge.svg)](https://github.com/JuliaConstraints/ConstraintProgrammingExtensions.jl/actions/workflows/GitHubCI.yml/)
[![Coverage Status](https://coveralls.io/repos/JuliaConstraints/ConstraintProgrammingExtensions.jl/badge.svg?branch=master)](https://coveralls.io/r/JuliaConstraints/ConstraintProgrammingExtensions.jl?branch=master)
[![codecov](https://codecov.io/gh/JuliaConstraints/ConstraintProgrammingExtensions.jl/graph/badge.svg?token=watKBcsP59)](https://codecov.io/gh/JuliaConstraints/ConstraintProgrammingExtensions.jl)
[![Coverage Status](https://codecov.io/gh/JuliaConstraints/ConstraintProgrammingExtensions.jl/graph/badge.svg?token=watKBcsP59)](https://codecov.io/gh/JuliaConstraints/ConstraintProgrammingExtensions.jl)

This package provides extensions to
[MathOptInterface](https://github.com/jump-dev/MathOptInterface.jl)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/mappings/cplexcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Constraints removed/renamed between OPL 3 and OPL 6:

* [`sequence`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_seq.html): what the heck!?
* [`circuit`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_circuit.html): `CP.Walk` (Eulerian circuit)
* [`alldifferent`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_alldiff.html): `CP.AllDifferent`
* [`alldifferent`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_alldiff.html): `MOI.AllDifferent`
* [`atleast`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_atleast.html): `CP.Count` and `MOI.GreaterThan`
* [`atleastatmost`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_atleastmost.html): `CP.Count`, `MOI.GreaterThan`, and `MOI.LessThan`
* [`atmost`](https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/cplex/12.5/amd64_co5/doc/html/en-US/OPL_Studio/oplmigration/topics/opl_mig_prev_3x4x_3xCP_constr_atmost.html): `CP.Count` and `MOI.LessThan`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/mappings/minizinc.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MiniZinc has a similar goal to this project: a common modelling interface for ma
* Multivalued: `CP.VectorDomain`
* [`table`](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/std/table.mzn): [one binary variable per possible combination](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/linear/fzn_table_int.mzn)
* All different:
* Base: `CP.AllDifferent`
* Base: `MOI.AllDifferent`
* [`all_different`](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/std/all_different.mzn): mapped onto [a MILP-like model](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/std/fzn_all_different_int.mzn).
* [`all_different_reif`](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/std/all_different.mzn): similar, [with an equivalence](https://github.com/MiniZinc/libminizinc/blob/master/share/minizinc/std/fzn_all_different_int_reif.mzn).
* These constraints are available in two includes: `all_different.mzn` and `alldifferent.mzn`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/mappings/numberjack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Numberjack has a very similar goal to this project: a common modelling interface for many underlying solvers. List of supported global constraints: https://github.com/eomahony/Numberjack/blob/master/doc/source/globalcons.rst. List of other constraints: https://github.com/eomahony/Numberjack/blob/master/doc/source/constraints.rst

* `Numberjack.AllDiff`: `AllDifferent`
* `Numberjack.AllDiff`: `MOI.AllDifferent`
* `Numberjack.AllDiffExcept0`: `AllDifferentExceptConstants`
* `Numberjack.Sum`: MOI (linear expressions
* `Numberjack.Product`: MOI (quadratic expressions)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/mappings/sas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Based on [the current docs](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_toc.htm), SAS' constraint-programming interface is still burgeoning:

- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_syntax06.htm): `CP.AllDifferent`
- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_syntax06.htm): `MOI.AllDifferent`
- [CUMULATIVE](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_syntax07.htm): `CP.CumulativeResource`
- [ELEMENT](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_syntax08.htm)
- [GCC](https://documentation.sas.com/doc/en/pgmsascdc/v_014/casmopt/casmopt_clpsolver_syntax09.htm)
Expand All @@ -13,7 +13,7 @@ Based on [the current docs](https://documentation.sas.com/doc/en/pgmsascdc/v_014
There are more features in [the scheduling module](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax.htm):

- [ACTIVITY](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax03.htm): TODO
- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax04.htm): `CP.AllDifferent`
- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax04.htm): `MOI.AllDifferent`
- [CUMULATIVE](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax06.htm): `CP.CumulativeResource`
- [ARRAY](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax05.htm)
- [ELEMENT](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax07.htm)
Expand Down
1 change: 0 additions & 1 deletion docs/src/reference/sets.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ElementVariableArray

```@docs
AllEqual
AllDifferent
AllDifferentExceptConstants
AllDifferentExceptConstant
SymmetricAllDifferent
Expand Down
8 changes: 4 additions & 4 deletions src/Bridges/Constraint/AllDifferent/ad_to_neq.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Bridges `CP.AllDifferent` to a series of `CP.DifferentFrom`.
Bridges `MOI.AllDifferent` to a series of `CP.DifferentFrom`.
"""
struct AllDifferent2DifferentFromBridge{T} <: MOIBC.AbstractBridge
# An upper-triangular matrix (i.e. nothing if i < j, constraint if i >= j).
Expand All @@ -16,7 +16,7 @@ function MOIBC.bridge_constraint(
::Type{AllDifferent2DifferentFromBridge{T}},
model,
f::MOI.VectorOfVariables,
s::CP.AllDifferent,
s::MOI.AllDifferent,
) where {T}
return MOIBC.bridge_constraint(
AllDifferent2DifferentFromBridge{T},
Expand All @@ -30,7 +30,7 @@ function MOIBC.bridge_constraint(
::Type{AllDifferent2DifferentFromBridge{T}},
model,
f::MOI.VectorAffineFunction{T},
s::CP.AllDifferent,
s::MOI.AllDifferent,
) where {T}
f_scalars = MOIU.scalarize(f)
dim = MOI.output_dimension(f)
Expand Down Expand Up @@ -59,7 +59,7 @@ end
function MOI.supports_constraint(
::Type{AllDifferent2DifferentFromBridge{T}},
::Union{Type{MOI.VectorOfVariables}, Type{MOI.VectorAffineFunction{T}}},
::Type{CP.AllDifferent},
::Type{MOI.AllDifferent},
) where {T}
return true
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Bridges `CP.SortPermutation` to `CP.AllDifferent` and
Bridges `CP.SortPermutation` to `MOI.AllDifferent` and
`CP.ElementVariableArray`.
"""
struct SortPermutation2AllDifferentBridge{T} <: MOIBC.AbstractBridge
con_alldiff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.AllDifferent}
con_alldiff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.AllDifferent}
cons_value::Vector{MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.ElementVariableArray}}
cons_sort::Vector{MOI.ConstraintIndex{MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T}}}
end
Expand Down Expand Up @@ -50,7 +50,7 @@ function MOIBC.bridge_constraint(
con_alldiff = MOI.add_constraint(
model,
MOIU.vectorize(indices),
CP.AllDifferent(dim)
MOI.AllDifferent(dim)
)

# Relate the three sets of variables by indexing.
Expand Down Expand Up @@ -86,7 +86,7 @@ end

function MOIB.added_constraint_types(::Type{SortPermutation2AllDifferentBridge{T}}) where {T}
return [
(MOI.VectorAffineFunction{T}, CP.AllDifferent),
(MOI.VectorAffineFunction{T}, MOI.AllDifferent),
(MOI.ScalarAffineFunction{T}, CP.ElementVariableArray),
(MOI.ScalarAffineFunction{T}, MOI.LessThan{T}),
]
Expand All @@ -95,7 +95,7 @@ end
function MOI.get(
::SortPermutation2AllDifferentBridge{T},
::MOI.NumberOfConstraints{
MOI.VectorAffineFunction{T}, CP.AllDifferent,
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
},
) where {T}
return 1
Expand All @@ -122,7 +122,7 @@ end
function MOI.get(
b::SortPermutation2AllDifferentBridge{T},
::MOI.ListOfConstraintIndices{
MOI.VectorAffineFunction{T}, CP.AllDifferent,
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
},
) where {T}
return [b.con_alldiff]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Bridges `CP.SymmetricAllDifferent` to `CP.AllDifferent` and `CP.Inverse`.
Bridges `CP.SymmetricAllDifferent` to `MOI.AllDifferent` and `CP.Inverse`.
"""
struct SymmetricAllDifferent2AllDifferentInverseBridge{T} <: MOIBC.AbstractBridge
con_all_diff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.AllDifferent}
con_all_diff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.AllDifferent}
con_inverse::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.Inverse}
end

Expand Down Expand Up @@ -32,7 +32,7 @@ function MOIBC.bridge_constraint(
con_all_diff = MOI.add_constraint(
model,
f,
CP.AllDifferent(dim)
MOI.AllDifferent(dim)
)

con_inverse = MOI.add_constraint(
Expand All @@ -58,15 +58,15 @@ end

function MOIB.added_constraint_types(::Type{SymmetricAllDifferent2AllDifferentInverseBridge{T}}) where {T}
return [
(MOI.VectorAffineFunction{T}, CP.AllDifferent),
(MOI.VectorAffineFunction{T}, MOI.AllDifferent),
(MOI.VectorAffineFunction{T}, CP.Inverse),
]
end

function MOI.get(
::SymmetricAllDifferent2AllDifferentInverseBridge{T},
::MOI.NumberOfConstraints{
MOI.VectorAffineFunction{T}, CP.AllDifferent,
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
},
) where {T}
return 1
Expand All @@ -84,7 +84,7 @@ end
function MOI.get(
b::SymmetricAllDifferent2AllDifferentInverseBridge{T},
::MOI.ListOfConstraintIndices{
MOI.VectorAffineFunction{T}, CP.AllDifferent,
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
},
) where {T}
return [b.con_all_diff]
Expand Down
8 changes: 4 additions & 4 deletions src/Test/test_alldifferent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ function test_alldifferent_vectorofvariables(
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c1
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Interval{T}) # c2
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
x2, _ = MOI.add_constrained_variable(model, MOI.Integer())

c1 = MOI.add_constraint(model, x1, MOI.EqualTo(T(1)))
c2 = MOI.add_constraint(model, x2, MOI.Interval(T(1), T(2)))

c3 = MOI.add_constraint(model, MOI.VectorOfVariables([x1, x2]), CP.AllDifferent(2))
c3 = MOI.add_constraint(model, MOI.VectorOfVariables([x1, x2]), MOI.AllDifferent(2))

@test MOI.is_valid(model, x1)
@test MOI.is_valid(model, x2)
Expand Down Expand Up @@ -51,7 +51,7 @@ function test_alldifferent_vectoraffinefunction(
) where {T <: Real}
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Interval{Int}) # c1, c2
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{Int}, CP.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{Int}, MOI.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, MOI.EqualTo{Int}) # c4

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
Expand All @@ -60,7 +60,7 @@ function test_alldifferent_vectoraffinefunction(
c1 = MOI.add_constraint(model, x1, MOI.Interval(T(1), T(2)))
c2 = MOI.add_constraint(model, x2, MOI.Interval(T(1), T(2)))

c3 = MOI.add_constraint(model, MOIU.vectorize(one(T) .* [x1, x2]), CP.AllDifferent(2))
c3 = MOI.add_constraint(model, MOIU.vectorize(one(T) .* [x1, x2]), MOI.AllDifferent(2))
c4 = MOI.add_constraint(model, one(T) * x1, MOI.EqualTo(1))

@test MOI.is_valid(model, x1)
Expand Down
8 changes: 4 additions & 4 deletions src/Test/test_antidomain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function test_antidomain_singlevariable(
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c1
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.GreaterThan{T}) # c2
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.LessThan{T}) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c4
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c4
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.AntiDomain{T}) # c5

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
Expand All @@ -15,7 +15,7 @@ function test_antidomain_singlevariable(
c1 = MOI.add_constraint(model, x1, MOI.EqualTo(T(1)))
c2 = MOI.add_constraint(model, x2, MOI.GreaterThan(T(1)))
c3 = MOI.add_constraint(model, x2, MOI.LessThan(T(3)))
c4 = MOI.add_constraint(model, MOI.VectorOfVariables([x1, x2]), CP.AllDifferent(2))
c4 = MOI.add_constraint(model, MOI.VectorOfVariables([x1, x2]), MOI.AllDifferent(2))

c5 = MOI.add_constraint(model, x2, CP.AntiDomain(Set(T[3])))

Expand Down Expand Up @@ -59,7 +59,7 @@ function test_antidomain_scalaraffinefunction(
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{Int}) # c1
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.GreaterThan{Int}) # c2
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.LessThan{Int}) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, CP.AllDifferent) # c4
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, MOI.AllDifferent) # c4
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.AntiDomain{Int}) # c5

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
Expand All @@ -68,7 +68,7 @@ function test_antidomain_scalaraffinefunction(
c1 = MOI.add_constraint(model, x1, MOI.EqualTo(T(1)))
c2 = MOI.add_constraint(model, x2, MOI.GreaterThan(T(1)))
c3 = MOI.add_constraint(model, x2, MOI.LessThan(T(3)))
c4 = MOI.add_constraint(model, MOIU.vectorize(one(T) .* [x1, x2]), CP.AllDifferent(2))
c4 = MOI.add_constraint(model, MOIU.vectorize(one(T) .* [x1, x2]), MOI.AllDifferent(2))

c5 = MOI.add_constraint(
model,
Expand Down
10 changes: 5 additions & 5 deletions src/Test/test_domain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function test_domain_singlevariable(
@show MOI.supports_add_constrained_variable(model, MOI.Integer) # x1, x2
@show MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
@show MOI.supports_constraint(model, MOI.VariableIndex, CP.Domain{T}) # c1, c2
@show MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
@show MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3
@show MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c4

@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.Domain{T}) # c1, c2
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c4

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
Expand All @@ -20,7 +20,7 @@ function test_domain_singlevariable(
c1 = MOI.add_constraint(model, x1, CP.Domain(Set([1, 2])))
c2 = MOI.add_constraint(model, x2, CP.Domain(Set([1, 2])))

c3 = MOI.add_constraint(model, MOIU.vectorize([x1, x2]), CP.AllDifferent(2))
c3 = MOI.add_constraint(model, MOIU.vectorize([x1, x2]), MOI.AllDifferent(2))
c4 = MOI.add_constraint(model, x1, MOI.EqualTo(1))

@test MOI.is_valid(model, x1)
Expand Down Expand Up @@ -59,7 +59,7 @@ function test_domain_scalaraffinefunction(
) where {T <: Real}
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{T}, CP.Domain{T}) # c1, c2
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{T}, CP.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{T}, MOI.AllDifferent) # c3
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{T}, MOI.EqualTo{T}) # c4

x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
Expand All @@ -79,7 +79,7 @@ function test_domain_scalaraffinefunction(
c3 = MOI.add_constraint(
model,
MOIU.vectorize(one(T) .* [x1, x2]),
CP.AllDifferent(2),
MOI.AllDifferent(2),
)
c4 = MOI.add_constraint(
model,
Expand Down
Loading
Loading