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

0 commit comments

Comments
 (0)