Skip to content

When duplicating the cargo, 3x as many containers are created #50

Description

@jonassegner

I made software to calculate cargo for my Container.
When I got the following cargo:
grafik
screenshot mit einem gefülltem Truck

and duplicate the cargo afterwards (calling algorithm.calculate()), the result should look like:
grafik
screenshot richtig -> 2 Trucks

instead the algorithm made 3 Trucks
grafik
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions