
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
multi-munkres
Advanced tools
基于 [匈牙利算法](https://en.wikipedia.org/wiki/Hungarian_algorithm) 的 [js实现](https://www.npmjs.com/package/munkres-js) 改进的多空槽的匈牙利算法,用于解决常用的根据空闲时间值班排班的问题
基于 匈牙利算法 的 js实现 改进的多空槽的匈牙利算法,用于解决常用的根据空闲时间值班排班的问题
const {multiMunkres} = require('multi-munkres')
multiMunkres([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 24 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.

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.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.