Questions tagged [choco]

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

120 questions
0
votes
0 answers

sum variable Σ Xik = Σ Xkj for i=j=k=1…N, 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 Σ Xik = Σ Xkj for i=j=k=1…N. How do I accomplish this? thank you for your help.
Morad
  • 3
  • 3
0
votes
1 answer

Modeling a constraint using Choco Solver

i want to model the following constraint in CHOCO. Any help please //cSelected[i]=1 ==> ∀ j∈{1,…,i-1} xCategory[i]!= xCategory[j] cSelected[i]=0, otherwise this is what i am trying to do int[] x = new int[]{0, 1, 0, 0,…
letraitre
  • 3
  • 2
0
votes
1 answer

Choco Solver setObjective maximize polynominal equation

I'm currently trying out Choco Solver (4.0.8) and I'm trying to solve this equations: Maximize subject to I'm stuck on maximising the first equation. I guess I just need a hint which subtype of Varaible EQUATION should be. Model model = new…
DerMolly
  • 464
  • 5
  • 17
0
votes
1 answer

Modelling constraints in Choco solver

I'm playing around with choco solver to solve some task scheduling problems. I have several jobs and possible slots (where a job can be executed). There are some constraints like: There could only one job per slot (C.1) A job needs a certain time t…
Indivon
  • 1,784
  • 2
  • 17
  • 32
0
votes
1 answer

Chocolatey Credentials Required

I just installed chocolatey through nuGet using the following steps in the admin shell: chocolatey nuget install. However, when I try to get any package, I am asked for credentials (which I assume is not meant to happen). Can anyone point out what I…
Bob
  • 21
  • 4
0
votes
1 answer

Domain Maximum - Choco solver

I'm using choco solver in Java. How can I get the maximum value of a domain? For example here is my domain: IntVar gisement_courant = model.intVar("Gisement courant", 5, 10); How can I get the maximum value of the domain? (Here the max is 10)
0
votes
1 answer

Using the Pure SMT-LIB2 in Z3 to check for consistency in rules

If have a set of rules - 1 : If x then a 2 : If x then b Then these rules shall be conflicting as we shall not know what is the action to be performed when x is triggered. Therefore - Now suppose I want to check for consistency of rules such as -…
Razor21
  • 59
  • 1
  • 6
0
votes
1 answer

Increment an IntVar after condition

I'm using the choco solver to solve my constraint problem. Is it possible in Choco to increment an IntVar after a condition like model.ifThen?
0
votes
0 answers

Capturing a scalar constraint results in an IntVar

I’m posting a scalar constraint and I’d like to be able to print its result out when I get a solution. So I’d like to somehow cache it in an IntVar… I found an old answer with the old Choco syntax and I’m just not able to make it work with the…
wdyp
  • 560
  • 4
  • 16
0
votes
1 answer

Choco solver old class

I found this code for solving the magic square program with the choco solver: public static void main(String[] args) { int n = 4; System.out.println("Magic Square Problem with n = " + n); Problem myPb = new Problem(); IntVar[] vars…
user3742929
  • 360
  • 3
  • 17
0
votes
0 answers

NullPointerException when adding constraint with choco on eclipse

i'm having a problem using choco on eclipse , i tried to add a constraint and i got a nullPointerException can anyone explain to me ? public static void main(String[] args ) { int n=8; CPModel m=new CPModel(); IntegerVariable[] cells =…
AbdallahJg
  • 69
  • 7
0
votes
2 answers

Complex variable in choco

How to check in Choco if a complex variable satisfies the constraints? For example, if I have the following list of configurations: int[][] configurations = new int[][] { {20, 24, 10, 3, 4}, {20, 13, 1, 3, 4}}; where config1 =…
Andrei
  • 7,509
  • 7
  • 32
  • 63
0
votes
1 answer

How to create/post and delete/unpost constraints during search in Choco

I have got a project in Choco solver, but I have a question about the external effects during the search. I have got a planning graph with (let's say) BoolVars organised in layers and durations assigned to the layers, which mean that some action…
Eramol
  • 33
  • 7
0
votes
1 answer

Java Choco solver error (IntVar read as Int)

I'm trying to use java choco solver, a CP solver, to color a graph. However i can't seem to get it to work. Even the code in the tutorial doesn't work: int n = 8; Model model = new Model(n + "-queens problem"); IntVar[] vars = new…
0
votes
1 answer

How to model special set constraints using Choco solver framework for Java

I'm having problems modelling a problem and solving it with Choco-solver in Java, and I am not that familiar with constraint programming to begin with, but have been tasked to make a seating app for conferences where: Each table must have a minimum…
Ceiku
  • 33
  • 6