Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input assigns same ID to different timbers #11

Open
JamesBremner opened this issue Jul 2, 2020 · 2 comments
Open

Input assigns same ID to different timbers #11

JamesBremner opened this issue Jul 2, 2020 · 2 comments
Assignees
Labels
bug Something isn't working status::test Extra attention is needed

Comments

@JamesBremner
Copy link
Owner

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
@JamesBremner JamesBremner added the bug Something isn't working label Jul 2, 2020
@Cashewfly
Copy link
Collaborator

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
Copy link
Owner Author

TimberAllocation
Discarding duplicate IDs ( tid11 ):
359998 627349 516465 814843 671953 

JamesBremner added a commit that referenced this issue Jul 2, 2020
Discard orders with duplicate IDs #11
@JamesBremner JamesBremner added the status::test Extra attention is needed label Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status::test Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants