Mathieu TSH
Mathieu TSH

Reputation: 69

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)

Upvotes: 0

Views: 182

Answers (1)

bernard
bernard

Reputation: 11

First of all which version of choco solver are you using ? Secondly you have a nice documentation of choco provided by the authors and still you can explore the sources. In constraint programming the maximum value of variable's domain is called the upper bound. In choco 3 you can get it by calling :

     IntVar gisement_courant = model.intVar("Gisement courant", 5, 10);
     gisement_courant. getUB()

I encourage u to read the sources to know exactly the behavior of each function.

Upvotes: 1

Related Questions