Multi-Objective Bin packing using linear aggregation

Discussion in 'Java' started by Riri93, Apr 4, 2016.

  1. Riri93

    Riri93

    Joined:
    Apr 4, 2016
    Messages:
    1
    Likes Received:
    0
    I want to load items into an optimal number of containers.

    Each item is defined by its volume and priority and the containers are defined by their volumes.

    I want to prioritize the items with the highest priorities.

    I wrote a best fit, a first fit and a branch&bound algorithms to solve this problem after sorting the items from the highest priority to the lowest.
    But, I guess this is not an effective method, so I thought about using the linear aggregation method of the multi-objective bin packing problem.

    I chose to use a wheight λ= 0.5 for both objective functions (which is relative to their importance). So that makes the problem a mono-objective one whith an objective function = 0.5*f1 +0.5*f2 .

    SO, what I would like to know is how can I apply this to my code?

    This is what I wrote (I am really not sure if I am right)

    if (currentSize + ((0.5*item.getVolume())+(0.5*item.getPriority())) <= volume) {
    packedItems.add(item);
    currentSize += item.getVolume();
    return true; //item fits
    } else {
    return false; // item didn't fit
    }


    Can anyone explain to me how to do it? or has a useful document about it?
    Thank you
     
    Riri93, Apr 4, 2016
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.