xflp icon indicating copy to clipboard operation
xflp copied to clipboard

Unloading Location Not working correctly

Open rahul-bhardwaj11 opened this issue 2 years ago • 6 comments

Hello, I want to load item from a single location and unload them on multiple locations in single container. Also the order would be the first unloading location item must be loaded last in the container. I want to group items according to unloading location. I have tried setting unloading location but some how all the co-ordinates are 0. Please help me resolve this.

Here is my code XFLP xflp = new XFLP(); xflp.setTypeOfOptimization(XFLPOptType.BEST_FIXED_CONTAINER_PACKER); xflp.getParameter().setLifoImportance(1); xflp.addContainer().setLength(1350000).setWidth(2500).setHeight(3000).setMaxWeight(25000000);

xflp.addItem().setExternID("Packet1").setLength(13500).setWidth(2500).setHeight(3000).setWeight(25000).setUnloadingLocation("location 1"); xflp.addItem().setExternID("Packet2").setLength(13500).setWidth(2500).setHeight(3000).setWeight(25000).setUnloadingLocation("location 2"); xflp.addItem().setExternID("Packet3").setLength(13500).setWidth(2500).setHeight(3000).setWeight(25000).setUnloadingLocation("location 1");

xflp.executeLoadPlanning(); LPReport report = xflp.getReport();

rahul-bhardwaj11 avatar Sep 26 '23 06:09 rahul-bhardwaj11

Will check. Give me some days :-)

hschneid avatar Oct 01 '23 12:10 hschneid

Hi,

Any updates on this ?

rahul-bhardwaj11 avatar Oct 16 '23 10:10 rahul-bhardwaj11

Just a question to your example: Packet1 is loaded at location1, correct?

Then I would expect, that you used "setUnloadingLocation()" method...

For real I need to check, if this function still works. :-D I used xflp in the past for VRP optimization, but then used it more and more in normal load planning. So, need to check, where I moved the loading/unloading thing.

The ordering of loading and unloading must be done by the input. XFLP is no inverse-VRP, which solves the question "Which sequence of loading and unloading would be necessary that all items can be loaded."

hschneid avatar Oct 17 '23 16:10 hschneid

Hi, We are already using a VRP and have the order in which the items must be unloaded. So we already know the unloading locations. We need to now set the unloading locations on the material for which we tried to use the "setUnloadingLocation()" method. This however did not give the required result we got the coordinates as 0,0,0 for all the packets. Please check this once if this method works otherwise is there any other alternative that can be used to set the ordering of the input?

rahul-bhardwaj11 avatar Oct 26 '23 07:10 rahul-bhardwaj11

Okay, you are right. Here got something lost in the past :-D

But!!!

Reason: Currently, XFLP is creating for every given item 2 new items: 1 x loading item and 1 x unloading item. Both ones are directly one after another, which leads to the situation, that the algorithm is only loading and unloading each item in sequence. LOAD1, UNLOAD1, LOAD2, UNLOAD2, ...

I will try to fix this.

hschneid avatar Oct 28 '23 13:10 hschneid

Hi,

I created a branch "Fix-Locations" for your issue, which should fix the issue. So, thanks for your hint. :-)

Important is, that the 'location' must be sortable to show the algorithm the sequence of visits. And yes, a location is a visit. Hence the algorithm cannot identify, when a certain location is revisited.

This example here is not working, as you designed the problem so, that only 1 item can be loaded.

        XFLP xflp = new XFLP()
        xflp.setTypeOfOptimization(XFLPOptType.FAST_FIXED_CONTAINER_PACKER)
        xflp.getParameter().setLifoImportance(1)
        xflp.addContainer().setLength(13500).setWidth(25).setHeight(30).setMaxWeight(25000000)
        xflp.addItem().setExternID("Packet1").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("1").setUnloadingLocation("5")
        xflp.addItem().setExternID("Packet2").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("2").setUnloadingLocation("3")
        xflp.addItem().setExternID("Packet3").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("4").setUnloadingLocation("6")

        xflp.executeLoadPlanning()
        var report = xflp.getReport()

        assert report.getUnplannedPackages().size() > 0

        XFLP xflp = new XFLP()
        xflp.setTypeOfOptimization(XFLPOptType.FAST_FIXED_CONTAINER_PACKER)
        xflp.getParameter().setLifoImportance(1)
        xflp.addContainer().setLength(13500).setWidth(25).setHeight(30).setMaxWeight(25000000)
        xflp.addItem().setExternID("Packet1").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("1").setUnloadingLocation("5")
        xflp.addItem().setExternID("Packet2").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("2").setUnloadingLocation("3")
        xflp.addItem().setExternID("Packet3").setLength(135).setWidth(25).setHeight(30).setWeight(25000).setLoadingLocation("6").setUnloadingLocation("7")

        xflp.executeLoadPlanning()
        var report = xflp.getReport()

        assert report.getUnplannedPackages().size() == 0

Is this helping you?

hschneid avatar Oct 28 '23 17:10 hschneid