Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonassegner opened this issue Mar 13, 2023 · 0 comments
Open

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

jonassegner opened this issue Mar 13, 2023 · 0 comments

Comments

@jonassegner
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant