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

Suggested contributions #2

Open
erelsgl opened this issue Oct 9, 2021 · 3 comments
Open

Suggested contributions #2

erelsgl opened this issue Oct 9, 2021 · 3 comments

Comments

@erelsgl
Copy link

erelsgl commented Oct 9, 2021

Hi, are you still working on this project?

I have some code for k-way number partitioning, as well as for some related problems such as bin-packing and bin-covering. Will you be interested in adding them?

@fuglede
Copy link
Owner

fuglede commented Oct 10, 2021

Yep, it's active. And I think there's room for more functionality.

  • The tiny bit of functionality that's already in here is also for multiway number partitioning (which happened to be what I needed myself). One thing that could be useful would be having more alternatives to KK and CKK (included in Add the complete karmarkar-karp algorithm #1), perhaps taking inspiration from this SO post. Or perhaps something based on the MILP-solvers out there. I'm sitting on a few NumPy/Numba implementations for KK as well that give speed-ups in certain cases. I'd also consider PyO3/Cython if the packaging story didn't come with so much maintenance.
  • For bin-packing and friends there are some established packages already -- e.g. binpacking -- and it would probably be less confusing/more efficient if further improvements went into that.

@erelsgl
Copy link
Author

erelsgl commented Oct 22, 2021

OK. I sent a PR that finds an exact solution using integer linear programming. One advantage of this approach is that it can be easily generalized, for example, to finding a partition with the smallest sum of the two largest parts; adding multiplicity constraints; etc.

I asked at the binpacking project and it seems they are not interested in contributions.

@fuglede
Copy link
Owner

fuglede commented Oct 22, 2021

Thanks, looks solid! I'm bit preoccupied these days but I'll make sure to dig in once time permits.

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

No branches or pull requests

2 participants