c# 3D Bin Packing for shipping [closed]
Asked Answered
H

2

8

I try to implement optimisation for shipping product from my e-commerce website.

I don't use plugin for e-commerce, only asp.net mvc 5.

I ask FeDex API for shipping rate for all items in cart. So if the user have 3 item in cart it will calculate it like 3 package. I need a way to calculate what dimension will be the package and split it in more package if it exceed a dimension.

i have find example in c++ and php(Here and Here) but i don't know these languages ...

if you can help me finding c# example or help me convert this php to c# so i can understand how they work ...

Tanks!

EDIT:

i have found exacly what i need but it's in c ... i need to make a dll for it then use it on my app https://github.com/wknechtel/3d-bin-pack

Hydride answered 21/4, 2015 at 18:18 Comment(1)
"How to solve the 3D bin packing problem in C#" is too broad, and "What .NET library does that for me" is off-topic. I'm afraid you'll just have to search the web some more.Stearic
S
8

I recently finished a C# port of the same 3D bin packing algorithm:

https://github.com/davidmchapman/3DContainerPacking

I based the code on these two GitHub projects:

3d-bin-pack by wknechtel (C)
3dbinpackingjs by Kerem Demirer (JavaScript)

I also referenced the PDF of the original master's thesis by Erhan Baltacıoğlu, as needed. The project includes a set of 700 reference tests verifying that the algorithm output matches the results shown in Appendix E of the thesis.

Suprematism answered 9/12, 2017 at 4:56 Comment(1)
I am trying to accomplish the same as the Poster and have already implemented your library into my project. It works great however there does not seem to be a way to adjust for multiple items that exceed a single container? Instead it puts it into an Unpacked list... also it doesn't distinguish the optimal container.Vapor
S
3

I converted wknechtel/3d-bin-pack C code to javascript. Can be easily port to C#.

https://github.com/keremdemirer/3dbinpackingjs

You can run example calculations from index.html file and review the generated report. pack1.js file contains the app and algorithm. I'm not sure how the algorithm works but the results are satisfying for packaging calculations.

Slantwise answered 27/2, 2016 at 23:13 Comment(4)
is the implementation same with the algorithm explained in the given pdf?Rhondarhondda
I'm not sure. It's as-is javascript port of wknechtel/3d-bin-packSlantwise
By the way I tried to run the js and c version, they dont have the same output cheersRhondarhondda
i found the research paper where the code is based. The pdf in github is the research paper for the year 2000 and the code implementation is for the new research in the year 2001. See link passthrough.fw-notify.net/download/029291/http://www.dtic.mil/…Rhondarhondda

© 2022 - 2024 — McMap. All rights reserved.