简体   繁体   English

Choco-Solver:有没有办法知道在求解过程中约束被破坏了多少次?

[英]Choco-Solver: Is there a way to know how many times a constraint is broken during the solving process?

My models is inefficient and taking too long to find valid solutions so I think knowing how many times the constraints are being broken would be useful for testing.我的模型效率低下并且需要很长时间才能找到有效的解决方案,所以我认为知道约束被破坏的次数对于测试很有用。

Thank you谢谢

Since Choco-solver-4.10.8, it is possible to have insights on the propagation.从 Choco-solver-4.10.8 开始,可以对传播有所了解。

//...
Solver s = m.getSolver();
PropagationProfiler profiler = s.profilePropagation();
s.findSolution();
profiler.writeTo(new File("profiling.txt"));

You can have an idea of what is being collected in the following discussion .您可以在下面的讨论中了解正在收集的内容。

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

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