arunpeddakotla / or-tools

Automatically exported from code.google.com/p/or-tools
0 stars 0 forks source link

TreeMonitor produces invalid tree.xml when used in java #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use TreeMonitor to produce cpviz tree-file in Java code
2. Run the code

What is the expected output? What do you see instead?
Valid tree.xml file is expected.
The code creates tree.xml file with invalid value of "size" attribute of 
"<try>" elements: <try id="2" parent="1" name="q0" size="zu" value="3" />

What version of the product are you using? On what operating system?
3795 & 3853 bin distr compiled on MSVS2013-64b

Please provide any additional information below.

The origin of the invalid "zu" value seems to be at the line 442 of 
src/constraint_solver/tree_monitor.cc: StringPrintf("%zu", 
domain_values->size()))

Attached nqueens2-treemon.java is a modification of sample NQueens2.java. It 
adds TreeMonitor to the sample. Run it, to reproduce the problem.
Attached tree.xml is the resulting invalid file.

Original issue reported on code.google.com by jan.hadr...@gmail.com on 27 Feb 2015 at 3:16

Attachments: