Skip to content

Commit 71ca3c7

Browse files
authored
Use MOI.AllDifferent (#37)
* Use MOI.AllDifferent * Remove coverall * Remove appveyor and travis
1 parent ff7a1c8 commit 71ca3c7

File tree

22 files changed

+55
-137
lines changed

22 files changed

+55
-137
lines changed

.appveyor.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/GitHubCI.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,3 @@ jobs:
9191
- uses: codecov/codecov-action@v4
9292
with:
9393
file: lcov.info
94-
- uses: coverallsapp/github-action@master
95-
with:
96-
github-token: ${{ secrets.GITHUB_TOKEN }}
97-
path-to-lcov: lcov.info

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
[![DOI](https://zenodo.org/badge/240344723.svg)](https://zenodo.org/badge/latestdoi/240344723)
88

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

1312
This package provides extensions to
1413
[MathOptInterface](https://github.com/jump-dev/MathOptInterface.jl)

docs/src/mappings/cplexcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Constraints removed/renamed between OPL 3 and OPL 6:
3535

3636
* [`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!?
3737
* [`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)
38-
* [`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`
38+
* [`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`
3939
* [`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`
4040
* [`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`
4141
* [`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`

docs/src/mappings/minizinc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MiniZinc has a similar goal to this project: a common modelling interface for ma
99
* Multivalued: `CP.VectorDomain`
1010
* [`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)
1111
* All different:
12-
* Base: `CP.AllDifferent`
12+
* Base: `MOI.AllDifferent`
1313
* [`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).
1414
* [`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).
1515
* These constraints are available in two includes: `all_different.mzn` and `alldifferent.mzn`.

docs/src/mappings/numberjack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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
44

5-
* `Numberjack.AllDiff`: `AllDifferent`
5+
* `Numberjack.AllDiff`: `MOI.AllDifferent`
66
* `Numberjack.AllDiffExcept0`: `AllDifferentExceptConstants`
77
* `Numberjack.Sum`: MOI (linear expressions
88
* `Numberjack.Product`: MOI (quadratic expressions)

docs/src/mappings/sas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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:
44

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

1515
- [ACTIVITY](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax03.htm): TODO
16-
- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax04.htm): `CP.AllDifferent`
16+
- [ALLDIFF](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax04.htm): `MOI.AllDifferent`
1717
- [CUMULATIVE](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax06.htm): `CP.CumulativeResource`
1818
- [ARRAY](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax05.htm)
1919
- [ELEMENT](https://documentation.sas.com/doc/en/pgmsascdc/v_014/orcpug/orcpug_clp_syntax07.htm)

docs/src/reference/sets.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ElementVariableArray
2727

2828
```@docs
2929
AllEqual
30-
AllDifferent
3130
AllDifferentExceptConstants
3231
AllDifferentExceptConstant
3332
SymmetricAllDifferent

src/Bridges/Constraint/AllDifferent/ad_to_neq.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Bridges `CP.AllDifferent` to a series of `CP.DifferentFrom`.
2+
Bridges `MOI.AllDifferent` to a series of `CP.DifferentFrom`.
33
"""
44
struct AllDifferent2DifferentFromBridge{T} <: MOIBC.AbstractBridge
55
# An upper-triangular matrix (i.e. nothing if i < j, constraint if i >= j).
@@ -16,7 +16,7 @@ function MOIBC.bridge_constraint(
1616
::Type{AllDifferent2DifferentFromBridge{T}},
1717
model,
1818
f::MOI.VectorOfVariables,
19-
s::CP.AllDifferent,
19+
s::MOI.AllDifferent,
2020
) where {T}
2121
return MOIBC.bridge_constraint(
2222
AllDifferent2DifferentFromBridge{T},
@@ -30,7 +30,7 @@ function MOIBC.bridge_constraint(
3030
::Type{AllDifferent2DifferentFromBridge{T}},
3131
model,
3232
f::MOI.VectorAffineFunction{T},
33-
s::CP.AllDifferent,
33+
s::MOI.AllDifferent,
3434
) where {T}
3535
f_scalars = MOIU.scalarize(f)
3636
dim = MOI.output_dimension(f)
@@ -59,7 +59,7 @@ end
5959
function MOI.supports_constraint(
6060
::Type{AllDifferent2DifferentFromBridge{T}},
6161
::Union{Type{MOI.VectorOfVariables}, Type{MOI.VectorAffineFunction{T}}},
62-
::Type{CP.AllDifferent},
62+
::Type{MOI.AllDifferent},
6363
) where {T}
6464
return true
6565
end

src/Bridges/Constraint/SortPermutation/perm_to_alldiff_indexing.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
2-
Bridges `CP.SortPermutation` to `CP.AllDifferent` and
2+
Bridges `CP.SortPermutation` to `MOI.AllDifferent` and
33
`CP.ElementVariableArray`.
44
"""
55
struct SortPermutation2AllDifferentBridge{T} <: MOIBC.AbstractBridge
6-
con_alldiff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.AllDifferent}
6+
con_alldiff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.AllDifferent}
77
cons_value::Vector{MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.ElementVariableArray}}
88
cons_sort::Vector{MOI.ConstraintIndex{MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T}}}
99
end
@@ -50,7 +50,7 @@ function MOIBC.bridge_constraint(
5050
con_alldiff = MOI.add_constraint(
5151
model,
5252
MOIU.vectorize(indices),
53-
CP.AllDifferent(dim)
53+
MOI.AllDifferent(dim)
5454
)
5555

5656
# Relate the three sets of variables by indexing.
@@ -86,7 +86,7 @@ end
8686

8787
function MOIB.added_constraint_types(::Type{SortPermutation2AllDifferentBridge{T}}) where {T}
8888
return [
89-
(MOI.VectorAffineFunction{T}, CP.AllDifferent),
89+
(MOI.VectorAffineFunction{T}, MOI.AllDifferent),
9090
(MOI.ScalarAffineFunction{T}, CP.ElementVariableArray),
9191
(MOI.ScalarAffineFunction{T}, MOI.LessThan{T}),
9292
]
@@ -95,7 +95,7 @@ end
9595
function MOI.get(
9696
::SortPermutation2AllDifferentBridge{T},
9797
::MOI.NumberOfConstraints{
98-
MOI.VectorAffineFunction{T}, CP.AllDifferent,
98+
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
9999
},
100100
) where {T}
101101
return 1
@@ -122,7 +122,7 @@ end
122122
function MOI.get(
123123
b::SortPermutation2AllDifferentBridge{T},
124124
::MOI.ListOfConstraintIndices{
125-
MOI.VectorAffineFunction{T}, CP.AllDifferent,
125+
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
126126
},
127127
) where {T}
128128
return [b.con_alldiff]

src/Bridges/Constraint/SymmetricAllDifferent/salldiff_to_alldiff_inverse.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
2-
Bridges `CP.SymmetricAllDifferent` to `CP.AllDifferent` and `CP.Inverse`.
2+
Bridges `CP.SymmetricAllDifferent` to `MOI.AllDifferent` and `CP.Inverse`.
33
"""
44
struct SymmetricAllDifferent2AllDifferentInverseBridge{T} <: MOIBC.AbstractBridge
5-
con_all_diff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.AllDifferent}
5+
con_all_diff::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.AllDifferent}
66
con_inverse::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.Inverse}
77
end
88

@@ -32,7 +32,7 @@ function MOIBC.bridge_constraint(
3232
con_all_diff = MOI.add_constraint(
3333
model,
3434
f,
35-
CP.AllDifferent(dim)
35+
MOI.AllDifferent(dim)
3636
)
3737

3838
con_inverse = MOI.add_constraint(
@@ -58,15 +58,15 @@ end
5858

5959
function MOIB.added_constraint_types(::Type{SymmetricAllDifferent2AllDifferentInverseBridge{T}}) where {T}
6060
return [
61-
(MOI.VectorAffineFunction{T}, CP.AllDifferent),
61+
(MOI.VectorAffineFunction{T}, MOI.AllDifferent),
6262
(MOI.VectorAffineFunction{T}, CP.Inverse),
6363
]
6464
end
6565

6666
function MOI.get(
6767
::SymmetricAllDifferent2AllDifferentInverseBridge{T},
6868
::MOI.NumberOfConstraints{
69-
MOI.VectorAffineFunction{T}, CP.AllDifferent,
69+
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
7070
},
7171
) where {T}
7272
return 1
@@ -84,7 +84,7 @@ end
8484
function MOI.get(
8585
b::SymmetricAllDifferent2AllDifferentInverseBridge{T},
8686
::MOI.ListOfConstraintIndices{
87-
MOI.VectorAffineFunction{T}, CP.AllDifferent,
87+
MOI.VectorAffineFunction{T}, MOI.AllDifferent,
8888
},
8989
) where {T}
9090
return [b.con_all_diff]

src/Test/test_alldifferent.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ function test_alldifferent_vectorofvariables(
55
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
66
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c1
77
# @MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Interval{T}) # c2
8-
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
8+
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3
99

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

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

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

1818
@test MOI.is_valid(model, x1)
1919
@test MOI.is_valid(model, x2)
@@ -51,7 +51,7 @@ function test_alldifferent_vectoraffinefunction(
5151
) where {T <: Real}
5252
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
5353
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Interval{Int}) # c1, c2
54-
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{Int}, CP.AllDifferent) # c3
54+
@MOIT.requires MOI.supports_constraint(model, MOI.VectorAffineFunction{Int}, MOI.AllDifferent) # c3
5555
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, MOI.EqualTo{Int}) # c4
5656

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

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

6666
@test MOI.is_valid(model, x1)

src/Test/test_antidomain.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function test_antidomain_singlevariable(
66
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c1
77
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.GreaterThan{T}) # c2
88
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.LessThan{T}) # c3
9-
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c4
9+
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c4
1010
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.AntiDomain{T}) # c5
1111

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

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

@@ -59,7 +59,7 @@ function test_antidomain_scalaraffinefunction(
5959
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{Int}) # c1
6060
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.GreaterThan{Int}) # c2
6161
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.LessThan{Int}) # c3
62-
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, CP.AllDifferent) # c4
62+
@MOIT.requires MOI.supports_constraint(model, MOI.ScalarAffineFunction{Int}, MOI.AllDifferent) # c4
6363
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.AntiDomain{Int}) # c5
6464

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

7373
c5 = MOI.add_constraint(
7474
model,

src/Test/test_domain.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ function test_domain_singlevariable(
66
@show MOI.supports_add_constrained_variable(model, MOI.Integer) # x1, x2
77
@show MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
88
@show MOI.supports_constraint(model, MOI.VariableIndex, CP.Domain{T}) # c1, c2
9-
@show MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
9+
@show MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3
1010
@show MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c4
1111

1212
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.Integer) # x1, x2
1313
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, CP.Domain{T}) # c1, c2
14-
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, CP.AllDifferent) # c3
14+
@MOIT.requires MOI.supports_constraint(model, MOI.VectorOfVariables, MOI.AllDifferent) # c3
1515
@MOIT.requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T}) # c4
1616

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

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

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

6565
x1, _ = MOI.add_constrained_variable(model, MOI.Integer())
@@ -79,7 +79,7 @@ function test_domain_scalaraffinefunction(
7979
c3 = MOI.add_constraint(
8080
model,
8181
MOIU.vectorize(one(T) .* [x1, x2]),
82-
CP.AllDifferent(2),
82+
MOI.AllDifferent(2),
8383
)
8484
c4 = MOI.add_constraint(
8585
model,

0 commit comments

Comments
 (0)