khalil-research / PyEPO

A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programming
MIT License
444 stars 58 forks source link

Multi-dimensional knapsack problem #5

Closed saswat0 closed 1 year ago

saswat0 commented 1 year ago

How can this be used to model a multi-dim knapsack problem? There can be k sacks with 4-D capacity and m items with 4-D weights need to be fit in these sacks. The profits for all items and sacks are the same (say 1) and hence, packing all the items in the minimum number of sacks would be an optimal solution

LucasBoTang commented 1 year ago

Hi saswat0, PyEPO supports optimization models with linear objective functions and unknown cost coefficients. Therefore, as long as you can build a mathematical optimization model, you can use it. Btw, your problem with multiple sacks seems like some generalized assignment problem.