https://github.com/gyang274/gbp
gbp: a bin packing problem solver - an r package solves 1d - 4d bin packing problem.
https://github.com/gyang274/gbp
3d 3d-bin-packing 3d-bin-packing-problem cpp packing-algorithm r
Last synced: about 1 month ago
JSON representation
gbp: a bin packing problem solver - an r package solves 1d - 4d bin packing problem.
- Host: GitHub
- URL: https://github.com/gyang274/gbp
- Owner: gyang274
- License: other
- Created: 2017-01-26T19:19:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-22T06:17:39.000Z (over 6 years ago)
- Last Synced: 2025-12-09T22:25:15.875Z (4 months ago)
- Topics: 3d, 3d-bin-packing, 3d-bin-packing-problem, cpp, packing-algorithm, r
- Language: C++
- Homepage: https://cran.r-project.org/package=gbp
- Size: 1.73 MB
- Stars: 34
- Watchers: 3
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output:
md_document:
variant: markdown_github
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "fig/README-"
)
```
# __gbp: A bin packing problem solver__
## Overview
Basic infrastructure and several algorithms for __1d - 4d bin packing problem__. This package provides a set of __c-level classes and solvers for 1d - 4d bin packing problem__, and __an r-level solver for 4d bin packing problem__, which is a wrapper over the c-level 4d bin packing problem solver.
The 4d bin packing problem solver aims to solve bin packing problem, a.k.a container loading problem, with an additional constraint on weight. Given a set of rectangular-shaped items, and a set of rectangular-shaped bins with weight limit, the solver looks for an orthogonal packing solution such that minimizes the number of bins and maximize volume utilization. Each rectangular-shaped item i = 1, .. , n is characterized by length l\_i, depth d\_i, height h\_i, and weight w\_i, and each rectangular-shaped bin j = 1, .. , m is specified similarly by length l\_j, depth d\_j, height h\_j, and weight limit w\_j. The item can be rotated into any orthogonal direction, and no further restrictions implied.
## Vignettes
A [vignettes](https://cran.r-project.org/web/packages/gbp/vignettes/gbp-vignette.html) that demonstrates the infrastructure and algorithms available from this r-package.
## [Shiny App](https://gyang.shinyapps.io/gbp_app/)
A [shiny application](https://gyang.shinyapps.io/gbp_app/) that demonstrates how to use __gbp__ function __bpp_solver__ in fulfilling the order packing process in business operations.
## OpenCPU API
An example call to __gbp::bpp_solver__ when an OpenCPU server is running with package __gbp__ installed.
```
curl http://localhost:8004/ocpu/library/gbp/R/bpp_solver/json -H "Content-Type: application/json" -d '{"it":[{"oid":1000001,"sku":"A0A0A0","l":2.14,"d":3.58,"h":4.76,"w":243},{"oid":1000001,"sku":"A0A0A1","l":7.24,"d":7.24,"h":2.58,"w":110},{"oid":1000001,"sku":"A0A0A1","l":7.24,"d":7.24,"h":2.58,"w":110},{"oid":1000002,"sku":"A0A0A0","l":2.14,"d":3.58,"h":4.76,"w":243},{"oid":1000002,"sku":"A0A0A1","l":7.24,"d":7.24,"h":2.58,"w":110},{"oid":1000002,"sku":"A0A0A1","l":7.24,"d":7.24,"h":2.58,"w":110},{"oid":1000002,"sku":"A0A0A2","l":6,"d":6,"h":6,"w":235},{"oid":1000002,"sku":"A0A0A3","l":4,"d":4,"h":4,"w":258}], "bn":[{"id":"K0001","l":10,"d":10,"h":10},{"id":"K0010","l":20,"d":20,"h":20}], "wlmt":800, "wprecision":1}'
```