An API which allows constraint programming for java programmers. It aims at describing hard combinatorial problems in the form of Constraint Satisfaction Problems and solving them with Constraint Programming techniques
Questions tagged [choco]
120 questions
0
votes
1 answer
Choco abs of an IntVar not working
[I'm using Choco 3.3.3]
I have an IntVar a and an int b. I want to save the difference into an IntVar[] array d. I've done this at another point in the code in exactly the same way and it worked without a problem, but here I just don't get it to…

Dora
- 47
- 1
- 8
0
votes
1 answer
resource allocation with penalties in choco
For my model I have about 120 people and 650 tasks. I now want to allocate those tasks with choco 3.3.3. For that I have a boolMatrix "assignment" 120x650 where there is a 1 if the task is assigned to the person and a 0 otherwise. But now I have to…

Dora
- 47
- 1
- 8
0
votes
1 answer
Choco 3.3.3 NoClassDefFoundError
Earlier on today, I found myself answering a question which used a library I haven't previously used (Choco 3.3.3). When I tested my code to check it worked I received an exception, java.lang.NoClassDefFoundError. In order to fix this, I attempted…

Dan
- 7,286
- 6
- 49
- 114
0
votes
1 answer
Using or constraint for RealVariables in Choco 2
I use Choco 2.1.5 with Eclipse IDE in Windows 8.1
When I compile the code below:
CPModel m = new CPModel();
m.setDefaultExpressionDecomposition(false);
RealVariable A = Choco.makeRealVar("a", -5.5, 5.5);
RealVariable B = Choco.makeRealVar("b", -4.4,…

padawan
- 1,295
- 1
- 17
- 45
0
votes
1 answer
ExceptionInInitializerError in Choco 3
When I try to run the example in Choco's website:
Solver solver = new Solver();
double PREC = 0.01d; // precision
RealVar x = VariableFactory.real("x", -1.0d, 1.0d, PREC, solver);
RealVar y = VariableFactory.real("y", -1.0d, 1.0d,…

padawan
- 1,295
- 1
- 17
- 45
0
votes
1 answer
Constraint choco
I am using choco API to solve a problem. What I need is coding a constraint that make the sum of all my variables equal to 1.
This code keeps a sum of rows equal 1:
IntegerVariable[][] rows;
int n; //number of rows
for(int i=0; i

HiddenDroid
- 1,440
- 4
- 14
- 27
0
votes
0 answers
Scheduling in choco
I have n tasks to be scheduled. The time horizon is 0..T periods. Each task consumes a resources when executed. A resources are limited and could be of different types. I use the following decision variables in choco 2.1.5:
IntegerVariable[][] x =…

JackAW
- 164
- 2
- 14
0
votes
1 answer
Choco Error: Initial Propagation: Contradiction due to
I use Choco and when I try to solve a model, I get the message:
- Initial Propagation: Contradiction due to [48.89604359598426,4.0]
What does that mean? I could not find it in documents.

padawan
- 1,295
- 1
- 17
- 45
0
votes
2 answers
Constraint in Choco
I've found a Choco solver as constraint programming software working with Java. I would like to learn it more. I have done some basic example. But now I would like to try something more complex (Pritsker project scheduling alg) and I need your help.…

JackAW
- 164
- 2
- 14
0
votes
0 answers
NoClassDefFoundError With Choco library
I´m trying to run this project made in eclipse with android, and this projects uses the CHOCO library. The problem is choco uses a class called ArraDeque that gives an error:
NoClassDefFoundError
If I import this class (java.util.ArrayDeque) in…
-1
votes
1 answer
updating Adobe Acrobat Reader DC using chololatey
"Error upgrading application Adobe Acrobat Reader DC - \nWARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else

Raja Sac
- 9
- 2
-1
votes
1 answer
sum one variable (X[i][j]) in one constraint with choco
I am using choco to solve a CSP , and one of my constraints is that the sum of one variables (X[i][j]) is less than N=10, and i=j=1....N.
How do I accomplish this? thank you for your help.
sum(X[i][j]) = 1 for i=j=1....N

Morad
- 3
- 3
-1
votes
2 answers
Choco Solver math expression generation
I want to use Choco solver to write a Java program that generates math problems that satisfy a number of constraints.
The problems have to take the following form:
x @ y ∆ z = r
Where:
x, y & z are positive integers, not necessarily different from…

Matthias
- 569
- 1
- 9
- 30
-4
votes
2 answers
Explanation of solution from choco solver
When i run my choco solver 4.0.6 I get this kind of solution :
Solution : X = 10, Y = 14, REIF_1=1, not(REIF_1)=0, REIF_2=1, not(REIF_2)=0, IV_3=2, REIF_4=1, not(REIF_4)=0 ...
Except the values of X and Y, can someone tell me what do the rest of…

Mathieu TSH
- 69
- 6