Comments (1)
Thank you for making an effort to report a problem.
For element the first element in the list has index 1 not 0. ;). Therefore, it is correct.
If you prefer to have things indexed from zero then you need to add extra parameter to Element.
cp.impose(Element.choose(index, vars, value, -1));
This -1 changes starting index from 1 to 0. If I do then your test does not fail.
Again, thank you for making an effort to report a problem. JaCoP participates in solver competition and solves thousands of different problems so usually we have no simple issues like that. Therefore, if you find those type of simple problems most of the time is use of API in the wrong place or misunderstanding of the constraint contract.
I hope you will pass those initial difficulty in using CP/JaCoP and enjoying using our library. I recommend looking at many different examples we provide. It helps a lot at the beginning.
from jacop.
Related Issues (20)
- IntDomain should override Domain.clone() to return an IntDomain HOT 1
- IntDomain question HOT 1
- http://jacop.osolpro.com/ no longer functional? HOT 1
- Change request to signatures of Decreasing & Increasing constructors HOT 1
- Change request to XdivYeqZ: make it extend PrimitiveConstraint HOT 3
- Installation problem HOT 1
- Error instead of solution HOT 2
- Empty list in search annotation raises error HOT 1
- Wrong solution HOT 1
- Wrong solution HOT 1
- fzn-jacop, geost_smallest_bb, missing solutions HOT 1
- fzn-jacop, maximum_arg, wrong solution HOT 2
- geost.ObstacleObjectFrame.timeOnlyCheck() should throw FailExceptions instead of using asserts HOT 1
- Confluence is asking for login & password to access the JaCoP website HOT 5
- Error instead of solution HOT 1
- Error instead of solution HOT 1
- CumulativeOptional throws IndexOutOfBoundsExceptions HOT 1
- wrong semantics of `X ^ Y` for negative `Y` HOT 1
- Version 4.11, `f5444652`, `network_flow_cost`: missing solutions
- Vulnerability issue by JaCoP 4.10.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jacop.