'How can i call cpprofiler in choco-solver for contrainst programming profiling

I found this on choco-solver documentation but i do not know how use it with provided choco-solver sample program in order to profile.

NB: I already install cpprofiller in my machine and launch it. So it start a tcp server on port 6565.

Need help please.



Solution 1:[1]

First, make sure your code looks like:

try (CPProfiler profiler = new CPProfiler(s1.getSolver(), true)) {
   solver.findSolution();
}

Then, you should start CPProfiler first and then run run Java program. Once you go back to the CPProfiler interface, you should see the search tree being updated.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cprudhom