JamesBremner / knapsack

3D Bin packing code direct from psuedocode
3 stars 1 forks source link

Input assigns same ID to different timbers #11

Open JamesBremner opened 4 years ago

JamesBremner commented 4 years ago

The input file https://github.com/JamesBremner/knapsack/blob/master/data/timber-alloc-data.txt contains, near line 40, this

d 6000 3500 7500 1 627349
d 8000 3500 7500 1 627349
d 10000 3500 7500 1 627349
d 12000 3500 7500 1 627349
d 14000 3500 7500 1 627349
d 16000 3500 7500 1 627349
d 18000 3500 7500 1 627349
d 20000 3500 7500 1 627349
d 22000 3500 7500 1 627349
d 26000 3500 7500 1 627349
d 10000 3500 7500 1 627349

What do you want to do about this? Some possibilities

  1. Display error and stop
  2. Display error and discard the duplicate ID'ed timbers
  3. Display error and assign new, unique ID
Cashewfly commented 4 years ago

Let's go with possibility 2. It is definitely an error but at this point we don't want a showstopper. I'll take a look at how I generated the list and get it corrected.

JamesBremner commented 4 years ago
TimberAllocation
Discarding duplicate IDs ( tid11 ):
359998 627349 516465 814843 671953