C# .NET - 3 D Bin Packing Problem in C Sharp - Asked By Mahendar Nanamala on 10-May-12 03:26 AM

Hi friends,
Can any one help me on the following problem
I have 3 dimentional bin having width,height and depth and I want to pack the rectangular items into the bin
if anyone gets any idea about this,Please reply.
[)ia6l0 iii replied to Mahendar Nanamala on 10-May-12 12:12 PM
Not many can explain algorithms on a forum. You should read the bin packing problem algorithm yourself. It is very well explained in the following wiki page.


Hope this helps.
kalpana aparnathi replied to Mahendar Nanamala on 10-May-12 02:59 PM

Use Referance link which gives detail of 3D bin packing problem.


Mahendar Nanamala replied to [)ia6l0 iii on 11-May-12 12:01 AM
Actually I am doing coding according to following algorithm,but the thing is am unable to understand the algorithm,if anyone understands Please let me know,I need just the algorithm needs to be coded,I dont need total application code,only algorithm needs to be coded exactly how it was written.

Jitendra Faye replied to Mahendar Nanamala on 11-May-12 01:27 AM
It is bit difficult to give exact algorithm for this problem but Just for reference you can refer following solution-

    float[] used = new float[n + 1];
    //used[j] is the amount of space in bin j already used up.
    int i, j;
    //Initialize all used entries to 0.0
    //Sort S into descending(nonincreasing)order, giving the sequence S1 >= S2 >= ... >= Sn.
    for(i = 1; i <= n; i++)
      //Look for a bin in which s[i] fits.
      for(j = 1; j <= n; j++)
        if (used[j] + S[i] <= 1.0) {
          bin[i] = j;
          used[j] += S[i];
          break;  //exit for(j)

except this refer these links for information-