Mixed Integer Programming - Warehouse Location (Python + GLPK)

非 Y 不嫁゛ 提交于 2019-12-08 13:05:27

This is not really a huge problem in the scheme of things -- there is specialized code to solve much larger warehouse location instances than this one, and good off-the-shelf solvers like CPLEX could solve it easily too. I don't know how efficient GLPK/PuPL are, but it could well be that they just take too long using straightforward LP/branch-and-bound (which is what they are doing).

One thing you could try is to allow the y variables to be continuous (0 <= y <= 1) instead of binary. This will most likely speed up the run times because the solver won't have to branch on them. The physical interpretation is that some customers can have their demands split between multiple warehouses. In practice, very few of them will probably be split in most solutions. If the capacities are large enough to be non-binding, then none of the demands will be split, and you'll always get binary solutions even though you allow y to be continuous.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!