An open API service indexing awesome lists of open source software.

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.

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}'
```