When duplicating the cargo, 3x as many containers are created
jonassegner opened this issue · 0 comments
jonassegner commented
I made software to calculate cargo for my Container.
When I got the following cargo:
screenshot mit einem gefülltem Truck
and duplicate the cargo afterwards (calling algorithm.calculate()
), the result should look like:
screenshot richtig -> 2 Trucks
instead the algorithm made 3 Trucks
screenshot wrong 3 trucks
I found a bug in lines 149 and 182 ( in the forked projekt at this file: https://github.com/DigitecGalaxus/3DContainerPacking/blob/master/src/CromulentBisgetti.ContainerPacking/Algorithms/EB_AFIT.cs)
in both lines ther should be a less than or equal instead of less than:
else if (hy - dim2 == bfy && hmx - dim1 == bfx && Math.Abs(hz - dim3) <= bfz)
instead of:
else if (hy - dim2 == bfy && hmx - dim1 == bfx && Math.Abs(hz - dim3) < bfz)
@DigitecGalaxus in your project no issues are allowed, could you fix it in your NuGet