JSPM

@redspher2021/node-red-contrib-binpacking

1.7.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q54862F
  • License ISC

node-red bin packing

Package Exports

  • @redspher2021/node-red-contrib-binpacking
  • @redspher2021/node-red-contrib-binpacking/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@redspher2021/node-red-contrib-binpacking) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-red-contrib-binpacking

Build Status npm version Github Issues MIT license

node-red-contrib-binpacking is based on the binpackingjs (https://github.com/olragon/binpackingjs) library.

It only supports 3D packing and is primarly designed for logistics purpose.

Input / Output

inputs :

  • A vehicle list called "bins". You must provide a msg.payload.bins as a json array.
  • A parcel or package list you want to transport. You must provide a msg.payload.packages a a json array

output :

  • The list of vehicle type with a success true or false ( { "success" : true}). true means the package can fit in the vehicle and false it means it can not. The result is available in the msg.payload.binpacking and the vehicle list order is kept. For each vehicle type the palette also provide which package can fit if they can all be in the vehicle.

Test

You can check the flow in the sample directory to have a better understanding of the input and output. It provides 2 examples :

  • timestamp with predefined set of data
  • api get/post to input values

Execute

  • Got to sample folder.
  • Execute : node-red -s settings.js flow.json -u .

Demo

UI : https://binpacking.yoctu.com/ui

API : curl -X POST https://binpacking.yoctu.com/api/ -H 'Content-type: application/json' -d '{ "packages": [ { "name": "bh", "width": 50, "height": 60, "length": 70, "weight": 28, "quantity": 3 } ], "bins": [ { "name": "brokenvolvo", "width": 100, "height": 100, "length": 120, "weight": 400 } ] }'

Contributors and Thanks

Thank you

@olragon for the binpackingjs library

@fanshan for the feedback on the palette

@misterbh for the first version

@zainiro for using it

LaV.