I need to minimize number of trucks to be loaded by packages. It is less then 50 packages. They are loaded in row. I can solve this problem using choco-solver written in java, but I need to call it from c#. Do you have any idea how to easily do it? Is there some library for c#, which can solve this problem? I need to find perfect solution, or at least very optimized.
Asked
Active
Viewed 877 times
1
-
I'm sure your project has more parameters than simply loading 50 packages into an unknown number of trucks. What code have you tried, and what do you need to solve? – Shannon Holsinger Aug 30 '16 at 07:29
-
I have to load packages ranges from 2-10 meters into about 14 meters long truck. Customer chooses packages in eshop and I have to tell him how many trucks he will need. – jan hruska Aug 30 '16 at 07:34
-
Would it be an option to use a heuristic or an approximation algorithm? There seem to be only 9 different sizes of packages. Perhaps [FFD](https://en.wikipedia.org/wiki/Bin_packing_problem#First-fit_algorithm) is an option. – Codor Aug 30 '16 at 08:30
-
@ jan please have a look http://www.codeproject.com/Articles/706136/Csharp-Bin-Packing-Cutting-Stock-Solver – Razack Aug 30 '16 at 09:51
-
thank you, it is not bad, but I need a little better solution. We used something similar until now [link](http://rosettacode.org/wiki/Knapsack_problem/Bounded#JavaScript), but we have many bad feedbacks, so we are searching for something little more accurate. – jan hruska Aug 30 '16 at 10:56
-
@janhruska see my repo https://github.com/cariquitanmac/2D-Bin-Pack-Binary-Search you can leverage from here – Anonymous Duck Oct 17 '16 at 07:35
1 Answers
-1
What about setting up the choco solver model on a java server that would be called from C# (or whatever) via a webservices (using JSON to exchange i/o data for instance)? It is clean and easy. We can do it very quickly if you like.

Jean-Guillaume Fages
- 239
- 1
- 7