jeroenraven / cspsol

Automatically exported from code.google.com/p/cspsol
GNU General Public License v3.0
0 stars 0 forks source link

Reducing length of one element, causes an increase in material required. #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While using cspsol to calculate window/door trim for a renovation project, I 
err'd in some of my lengths so shortened some of the lengths in my input file 
but the result required _more_ material than the previous input file.  I 
narrowed it down to one problematic line item.

The following transcript illustrates the problem:

./cspsol --data moldings.txt 
Reading order data from file moldings.txt
Total orders read from file = 11
48 8
28 2
67 2
73 8
21 2
27 2
84 2
87 2
85 4
74 2
60.5 2
Add order demand constraints. Total rows, cols = 11, 0
Node    1: .......
Patterns: Current =   9, New =   7, Obj Func Value = 12 INTEGER ***

Branch and bound tree exhausted.

# Total runtime = 0 Secs

 # Solution Report # 

Best integer obj. func. value = 12
Pattern count =    2:    85 x  2,    21 x  1, 
Pattern count =    3:    73 x  2,    28 x  1, 
Pattern count =    1:    48 x  4, 
Pattern count =    2:    84 x  1,  60.5 x  1,    48 x  1, 
Pattern count =    2:    74 x  1,    67 x  1,    48 x  1, 
Pattern count =    2:    87 x  1,    73 x  1,    27 x  1, 

=================

./cspsol --data moldings.txt 
Reading order data from file moldings.txt
Total orders read from file = 11
48 8
28 2
67 2
73 8
21 2
27 2
84 2
83 2
85 4
74 2
60.5 2
Add order demand constraints. Total rows, cols = 11, 0
Node    1: ..........
Patterns: Current =   9, New =  10, LP worse than integer incumbent 12 >= 13. 
Fathom node. 

Branch and bound tree exhausted.

# Total runtime = 0 Secs

 # Solution Report # 

Best integer obj. func. value = 13
Pattern count =    2:    85 x  2,    21 x  1, 
Pattern count =    1:    84 x  2,    21 x  1, 
Pattern count =    1:    83 x  2, 
Pattern count =    1:    74 x  2,    28 x  1, 
Pattern count =    4:    73 x  2,    28 x  1, 
Pattern count =    1:    67 x  2,    48 x  1, 
Pattern count =    1:  60.5 x  2,    48 x  1, 
Pattern count =    1:    48 x  4, 
Pattern count =    1:    48 x  2,    27 x  2, 

Other than the above issue, cspsol is exactly what I needed... Thank you!

Original issue reported on code.google.com by hpey...@beer.org on 24 Feb 2012 at 12:30

GoogleCodeExporter commented 8 years ago
Hello,
Could you please provide max. length of pattern i.e. first row of data file. I 
plan to analysis the issue ASAP.

Original comment by vijay.pa...@gmail.com on 28 Feb 2012 at 4:18

GoogleCodeExporter commented 8 years ago
A thousand apologies.  Of course you need the length.

This is my input file:

192
48 8
28 2
67 2
73 8
21 2
27 2
84 2
87 2
85 4
74 2
60.5 2

Original comment by hpey...@beer.org on 28 Feb 2012 at 4:37

GoogleCodeExporter commented 8 years ago
Hello,
I have found the bug fix, it will be soon checked in. Here is the new output 
for shortened lengths:

Total orders read from file = 11
48 8
28 2
67 2
73 8
21 2
27 2
84 2
83 2
85 4
74 2
60.5 2
Add order demand constraints. Total rows, cols = 11, 0
Node    1: ..........
Patterns: Current =   9, New =  10, Obj Func Value = 12 Branch.
Node    2: 
Patterns: Current =  19, New =   0, Obj Func Value = 12 INTEGER ***
Node    3: ..
Patterns: Current =  19, New =   2, Obj Func Value = 12 INTEGER ***

Branch and bound tree exhausted.

# Total runtime = 0 Secs

 # Solution Report # 

Best integer obj. func. value = 12
Pattern count =    1:    85 x  2,    21 x  1, 
Pattern count =    1:    83 x  2, 
Pattern count =    2:    73 x  2,    28 x  1, 
Pattern count =    1:    48 x  4, 
Pattern count =    2:    84 x  1,  60.5 x  1,    48 x  1, 
Pattern count =    1:    73 x  2,    21 x  2, 
Pattern count =    2:    74 x  1,    67 x  1,    48 x  1, 
Pattern count =    2:    85 x  1,    73 x  1,    27 x  1, 

Original comment by vijay.pa...@gmail.com on 1 Apr 2012 at 5:03

GoogleCodeExporter commented 8 years ago
On Sun, 01 Apr 2012 17:03:56 +0000 cspsol@googlecode.com wrote

Thank you.  Much appreciated!

Original comment by hpey...@beer.org on 2 Apr 2012 at 7:33

GoogleCodeExporter commented 8 years ago
Fix is now available in the repository. If you have checked out source code, 
please update. Also I will make new tarball release soon. 

Original comment by vijay.pa...@gmail.com on 3 Apr 2012 at 3:28