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
1
vote
0 answers

Constraint solving with choco: Finding unique solutions for a variable

I'm using Choco to solve a CSP. In the beginning, I create an array of variables v like this: IntVar[] v = new IntVar[5]; After adding several constraints, I'll search for solutions and find multiple of them. However, I want only unique solutions…
RaideR
  • 869
  • 1
  • 12
  • 33
1
vote
1 answer

How to replace instanceof in the case of collection of instances by their classtype or interface

I have got a lot of classes, which are all derived from the class AbstractVariable. I need to collect them into corresponding lists because I'll need to work with them. It may be simpler to collect them into one list and then filter them by…
Eramol
  • 33
  • 7
1
vote
1 answer

Limiting assignment value - Choco

Is there a way to limit the number of assignments for a specific value of a variable? I'm writing a schedule problem using Choco [4.0.1] with courses, teachers and timeslots. The same teacher can teach many courses and I need to define the amount of…
psi_
  • 65
  • 5
1
vote
1 answer

Choco Sat Formulation

I am trying to model a SAT formula using Choco 4.0.1. I read the docs , I am trying to understand from the javadoc, but unfortunately I am failing so far. This is my first time working on these type of problems and also choco. So, I may be asking…
begumgenc
  • 393
  • 1
  • 2
  • 12
1
vote
1 answer

Choco 4: Constrain domain of variable to equal a set of values

I have the following array S of IntVar[]: IntVar[] S = model.intVarArray("Flights Schedule", 18, 0, 19); I also have the following ArrayList of Integer, called fromHome: ArrayList fromHome = [1, 2, 4]; fromHome is derived later in the…
Iva
  • 357
  • 5
  • 13
1
vote
0 answers

Make a Constraint to sorting an Array (Choco + java )

I am trying to develop a choco solver to the probelm of the Planning of telephone support center. in 12 hours from 8:00 o clock to 20:00. variables and constraint : Number of employees = 9 Minimum ans Maximum buisiness hours for every employee (h…
TheLastOne
  • 61
  • 5
1
vote
1 answer

Bin packing in csharp

I need to minimize number of trucks to be loaded by packages. It is less then 50 packages. They are loaded in row. I can solve this problem using choco-solver written in java, but I need to call it from c#. Do you have any idea how to easily do it?…
jan hruska
  • 249
  • 1
  • 9
1
vote
1 answer

At least one Var equals to X within a Var array using Choco Solver

I'm using Choco Solver and given an array of int vars, I want a constraint that check that at least one var in the array is equal to a static value... Something similar to IntConstraintFactory#count but with the following doc : /** * Let N be the…
avianey
  • 5,545
  • 3
  • 37
  • 60
1
vote
0 answers

Set complex constrain - Choco

I have a constrain in this format: (1 + x*y/z*m)*(2/x*y) - 10 = 0 How can I add this constraint? IntConstraintFactory class provide a method called arithm to add simpler constraints like this one: //x + y > 10 IntVar x =…
dirac
  • 309
  • 1
  • 9
1
vote
1 answer

It is possible to create constraints between solutions in Choco?

I have this problem: find as large a set S of strings (words) of length 8 over the alphabet W = { A,C,G,T } with the following properties: Each word in S has 4 symbols from { C,G } Each pair of distinct words in S differ in at least 4 position.…
Elena
  • 11
  • 2
0
votes
1 answer

Minimize error in average of priced resource assignments

Problem definition I need to group resources, where the average price of each group is closest to a given average price. As an input I get a list of resources with price and quantities of each one, plus the target groups quantities and average…
0
votes
1 answer

Installation unsuccessful: Chocolatey installation on VS Code via CMD / Power Shell

I was installing node.js and, during the installation, was given the option to also install Chocolatey. The first issue was, it didn't install. The error will be attached below. I then ran CMD as an administrator and wrote choco upgrade -y…
0
votes
1 answer

Creating chocolatey packages for plug-ins of "large" applications

I have a question about using Chocolatey to package plugins for other applications. Say I have a primary application sample-app, and a plugin that can be installed for this sample-app-plugin. Technically sample-app-plugin depends on sample-app as it…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
0
votes
1 answer

Unable to retrieve Flare VM packages from myget via Chocolatey on Windows 10

I am trying to install packages for Flare VM on Windows 10 using Chocolatey, but I'm facing issues with the installation. Could you please help me resolve this problem? Here is the output I receive: Error retrieving packages from source…
joan
  • 39
  • 3
0
votes
0 answers

How to tell Manim to write LaTeX using MikTeX instead TinyTeX?

I have a working Manim CE v0.17.2 installation, but I accidentally uninstall TinyTeX using choco uninstall tinytex in PowerShell (as administrator). As a result, of course, Manim can't write any LaTeX with the following error: RuntimeError: latex…
Hanif
  • 1