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
how to check which constraints would be violated by a presumed solution?
In some cases the solver fails to find a solution for my model, which I think is there.
So I would like to populate a solution, and then check which constraint is violated.
How to do that with choco-solver?
Using choco-solver 4.10.6.

brunesto
- 430
- 3
- 11
0
votes
1 answer
Numpy is installed, but astropy says numpy is not installed
An ImportError is thrown when my program searches for Numpy. Yet, numpy is installed as seen by the import numpy working properly.
I've tried
uninstalling python and numpy and reinstalling with choco
with pip
and with conda.
None seem to work.…

unixcorn
- 375
- 1
- 5
- 17
0
votes
1 answer
Choco 4: calling a method whenever a Boolean variable gets assigned or unassigned
I have a technical question regarding the Choco 4 CP solver.
I would like to call a method (lets call it f()) whenever some Boolean variables in my model are assigned or unassigned during search. The purpose of f() is to update a data structure…

Avi Itzhakov
- 11
- 2
0
votes
1 answer
How can I can add an arithmetic constraint to my model in chocosolver
I'm new to chocosolver, and i want to add an arithmetic constraint to my model. The probleme is that the constraint contains 6 Invar variables.
Here is the constraint: ((A1*B1)+(A2*B2)) / (B1+B2) = Const;
With A1, A2, B1, B2 are Intvar…
0
votes
1 answer
Puppet: how to check in IF condition if a Choco package installed OR a local user exists?
Windows Server environment. We have servers with a Puppet role that installs a specific Choco package. It was decided that the package should not be installed on new servers. The simplest way would be just removing the package statement from the…

Evgeny
- 43
- 1
- 8
0
votes
1 answer
Run powershell command from cmd
I want to run a PowerShell command from cmd, because I need to install the Chocolatey package manager from my Python script. Like this:
import subprocess as sp
choco = sp.Popen(['powershell', 'Start-Process -verb runas powershell',
…

heavyblack1
- 72
- 2
- 9
0
votes
1 answer
Reusing choco solver model to further constrain the solution
I'm using the choco solver library to generate a set of puzzles. I need to run the solver, check how many solutions there are and if there is more than one, add an extra constraint. Repeating this will give me a set of constraints (clues) that has a…

Graham Evans
- 23
- 4
0
votes
1 answer
eclipse IDE windows 7 os importing choco package
i am trying to install the java constraint solver package called choco : http://choco.sourceforge.net/first.html
please let me know how to go about, i have tried several times, with no success.
Thanks

whatf
- 6,378
- 14
- 49
- 78
0
votes
0 answers
how to use Choco to set objective like 3.5X+4.2Y?
I am new to Choco. I found an example online saying showing how to set the object as below
// Model objective function 3X + 4Y
IntVar OBJ = model.intVar("objective", 0, 999);
model.scalar(new IntVar[]{X,Y}, new int[]{3,4}, OBJ)).post();
// Specify…

Laodao
- 1,547
- 3
- 17
- 39
0
votes
1 answer
Manual reboot & login when Installing packages through choco via powershell script
I've a powershell script which installs some softwares using choco.
Softwares like vagrant require reboot of the system and machine reboots on its own.
How can I make this process fully automated as in if restart is required then, it restarts and…

Axel
- 113
- 3
0
votes
1 answer
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2' on windows when using coursera-dl package
i wanted to download from coursera using coursera-dl package on windows
it kept giving that message
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'
so i searched through stackoverflow and found this here
which says that i have…
user11045864
0
votes
1 answer
Choco solver logging
I'm trying the Choco solver (version 4.10.1) for the first time, and I don't know how to enable logging for the solver.
I've added slf4j-log4j12 dependency and a log4j.properties file.
For older Choco (e.g. v3) versions, the doc mentioned some…

jack malkovick
- 503
- 2
- 14
0
votes
1 answer
Use IntVar as index of IntVar[] array in a constraint
I want to use the value of an IntVar as an index of another IntVar array in a constraint, using Choco Solver.
I have an IntVar who contains the next task who follow the i-th task
And I have another IntVar who contains the person assigned to a…

ingambe
- 26
- 3
0
votes
0 answers
How to install chrome in custom location using chocolatey
I want to install chrome in a custom location by using chocolatey, but I can't figure out how to do it.
I know I have to use
choco install googlechrome --installargs ""
but I can not find the args to pass. Is this even possible?
I don't…

Tobias von Falkenhayn
- 1,355
- 5
- 26
- 59
0
votes
1 answer
Create Chocolatey Package and perform installation multiple times
I want to use chocolatey to manage my windows application installer. However, my application requires multiple times installation with different parameters. I wonder is it possible to be achieved by just using one single choco package. If yes, how…

weijie lin
- 143
- 5
- 14