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

Various improvements and fixes #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

agners
Copy link

@agners agners commented Jan 4, 2020

Fixes issue #1 as well as some other issues I came across.

this prevents crashes when using a non-existing file name
There is no value in a column which has more items then
ordered. Limit count per length to order number. This might
also not be very helpful, but more then a useless column,
especially when low order counts are used.

Also use integer as data type to make clear we deal with
counts.
Also when generating columns do not exceed the order count
as such columns bring no value. Use the double bounded type
with a lower bount of 0 and upper bound of order count.
In practice column counts with a fractal part are not very
useful. Use the MIP solver to solve forr integer column counts.
The last generated column has been computed but then ignored. Since
we seem to be a bit low on columns in practice anyway make use of
this last column as well.
The best_patterns is only an array of arrays and hence does not need
that much memory. Overestimate the size by assuming we have no duplicate
columns and allocate memory only once. This makes the code more readable
and probably faster too (since reallocating takes time too).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant