devtools::install_github('delta1epsilon/BoxPacking')
Example
Consider an example where 20 boxes of different sizes are going to be packed into containers 2x2x2.
library(BoxPacking)
# create containers
containers <- list()
n_containers <- 4
for (i in 1:n_containers) {
containers <- c(containers,
Container(length = 2, height = 2, width = 2)
)
}
# create boxes
boxes <- list()
n_boxes <- 20
2022-05-10 16:03:57
1006KB
r语言
开发语言