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
Another constraint request: modulo (%) #201
Comments
I'll focus on the element constraints for not but this should be fairly easy to add I think. For now you might want to solve it using the TableConstraint |
BTW if you're interested in special constraints please feel free to open a PR yourself if interested. I can guide you through the necessary steps. |
Thanks, I'll test implementing modulo with Table constraint. (And I agree that And thanks for the offer about PR:s regarding constraints. However, I want to implement "all" my models before doing more advanced stuff in Julia. I guess that you mean "proper" constraints and not just decompositions. I've already write some decompositions that I've needed, e.g. |
FYI: Here's a simple decomposition using
I first tried to port my ECLiPSe modulo propagator (http://hakank.org/eclipse/modulo_propagator.ecl ) to ConstraintSolver.jl:
|
Would it be possible to add a modulo constraint (as
mod(x,y)
orx % y
orx mod y
)?The mod constraint is quite handy for certain CSP problems. e.g. puzzles and special algorithms.
The text was updated successfully, but these errors were encountered: