简体   繁体   English

最大域-Choco求解器

[英]Domain Maximum - Choco solver

I'm using choco solver in Java. 我在Java中使用choco求解器。 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) (此处最大为10)

First of all which version of choco solver are you using ? 首先,您使用的是哪个版本的choco求解器? Secondly you have a nice documentation of choco provided by the authors and still you can explore the sources. 其次,您有由作者提供的精美的Choco文档,但您仍然可以探索资源。 In constraint programming the maximum value of variable's domain is called the upper bound. 在约束编程中,变量域的最大值称为上限。 In choco 3 you can get it by calling : 在choco 3中,您可以通过调用以下命令获取它:

     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. 我鼓励您阅读源代码以确切了解每个功能的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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