简体   繁体   中英

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM