0

Say, I am having an IntVar array int n = 10; IntVar[] x = VariableFactory.boundedArray("x", n, 0, 100, solver);

I need to define a constraint that restricts the standard deviation(can be a number with decimal points) of this array less than a predefined real number, say 3.45.

Nitu Chiring
  • 13
  • 1
  • 3

1 Answers1

1

The deviation constraint is not (yet) implemented in choco. My company can implement it and add it to the library for you if you wish. Contact us to get a commercial offer (https://www.cosling.com/#contact).

Otherwise, you may encode the deviation as a continuous constraint (as in this example https://github.com/chocoteam/choco-solver/blob/master/choco-samples/src/main/java/org/chocosolver/samples/real/SmallSantaClaude.java) but it requires to install Ibex solver, with the jni bridge (http://www.ibex-lib.org/doc/java-install.html).

Best,

Jean-Guillaume Fages https://www.cosling.com/