{"id":13857333,"url":"https://github.com/delta1epsilon/BoxPacking","last_synced_at":"2025-07-13T21:32:18.977Z","repository":{"id":74706427,"uuid":"69050858","full_name":"delta1epsilon/BoxPacking","owner":"delta1epsilon","description":"R package for solving three-dimensional bin packing problem","archived":false,"fork":false,"pushed_at":"2017-04-20T07:18:36.000Z","size":1028,"stargazers_count":63,"open_issues_count":3,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-06T03:03:31.996Z","etag":null,"topics":["3d-bin-packing-problem","genetic-algorithm","packing-algorithm","r"],"latest_commit_sha":null,"homepage":"https://delta1epsilon.github.io/2016/3D-bin-packing-problem-in-R/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delta1epsilon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-09-23T18:30:50.000Z","updated_at":"2024-05-08T13:09:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6458998-bcbd-45df-8d8e-c9f2433dccff","html_url":"https://github.com/delta1epsilon/BoxPacking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta1epsilon%2FBoxPacking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta1epsilon%2FBoxPacking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta1epsilon%2FBoxPacking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta1epsilon%2FBoxPacking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delta1epsilon","download_url":"https://codeload.github.com/delta1epsilon/BoxPacking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920274,"owners_count":17545463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-bin-packing-problem","genetic-algorithm","packing-algorithm","r"],"created_at":"2024-08-05T03:01:33.641Z","updated_at":"2024-11-22T15:30:30.721Z","avatar_url":"https://github.com/delta1epsilon.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# BoxPacking: R package for solving three-dimensional bin packing problem\n\n## Problem description\n\nIn the bin packing problem, the task is to select one or more bins from a set of available bins to pack three dimensional, rectangular boxes such that the usage of the bin space is maximized. [Read more about the problem.](https://en.wikipedia.org/wiki/Bin_packing_problem)\n\n## Algorithm\n\nThe package uses [Genetic algorithm for the three-dimensional bin packing problem with heterogeneous bins](https://www.researchgate.net/publication/273121476_A_genetic_algorithm_for_the_three-dimensional_bin_packing_problem_with_heterogeneous_bins).\n\nYou can read more about the algorithm in my [blog post](https://delta1epsilon.github.io/2016/3D-bin-packing-problem-in-R/). \n\n## Install\n\n```\ndevtools::install_github('delta1epsilon/BoxPacking')\n```\n\n## Example\n\nConsider an example where 20 boxes of different sizes are going to be packed into containers 2x2x2.\n\n```\nlibrary(BoxPacking)\n\n# create containers\ncontainers \u003c- list()\nn_containers \u003c- 4\n\nfor (i in 1:n_containers) {\n    containers \u003c- c(containers,\n                    Container(length = 2, height = 2, width = 2)\n                    )\n}\n\n\n# create boxes\nboxes \u003c- list()\nn_boxes \u003c- 20\n\nfor (i in 1:n_boxes) {\n    length \u003c- sample(c(0.4, 0.5, 1), 1)\n    height \u003c- sample(c(0.4, 0.5, 1), 1)\n    width \u003c- sample(c(0.4, 0.5, 1), 1)\n\n    boxes \u003c- c(boxes,\n               Box(length = length, height = height, width = width)\n               )\n}\n\n# Box Packing\nsolution \u003c-\n    PerformBoxPacking(containers = containers,\n                      boxes = boxes,\n                      n_iter = 4,\n                      population_size = 20,\n                      elitism_size = 5,\n                      crossover_prob = 0.5,\n                      mutation_prob = 0.5,\n                      verbose = TRUE,\n                      plotSolution = TRUE\n                      )\n```\n\n![](giphy.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelta1epsilon%2FBoxPacking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelta1epsilon%2FBoxPacking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelta1epsilon%2FBoxPacking/lists"}