
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
multi-munkres
Advanced tools
基于 [匈牙利算法](https://en.wikipedia.org/wiki/Hungarian_algorithm) 的 [js实现](https://www.npmjs.com/package/munkres-js) 改进的多空槽的匈牙利算法,用于解决常用的根据空闲时间值班排班的问题
基于 匈牙利算法 的 js实现 改进的多空槽的匈牙利算法,用于解决常用的根据空闲时间值班排班的问题
const {multiMunres} = require('multi-munkres')
multiMunres([1, 1, 2, 1, 1],//每个空槽的人数
[
[0, 1, 0, 2, 3],//每个人对每个空槽的cost
[0, 1, 2, 0, 3],
[2, 1, 0, 1, 3]
],
[2, 2, 3])//每个人能接受的最多空槽数
// => [ [ 0 ], [ 2 ], [ 2, 0 ], [ 1 ], [ 1 ] ]
// => [ 0 ], [ 0 ], [ 2 ], [ 1 ], [ 1 ] //每次执行会对人员列表shuffle,保证在cost相同的情况下有尽可能多的最优解
const {calCost} = require('multi-munkres')
// res: 排列后的成员排列结果
// eachPerson: 每个成员对应每个空槽的cost
calCost(res,eachPerson)
FAQs
基于 [匈牙利算法](https://en.wikipedia.org/wiki/Hungarian_algorithm) 的 [js实现](https://www.npmjs.com/package/munkres-js) 改进的多空槽的匈牙利算法,用于解决常用的根据空闲时间值班排班的问题
The npm package multi-munkres receives a total of 6 weekly downloads. As such, multi-munkres popularity was classified as not popular.
We found that multi-munkres demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.