knapsack {mknapsack} | R Documentation |
Solves knapsack problem with the library defined in knapsack.solver option: - cbc (default) - uses rcbc package - lpsolve - uses lpSolve package
Description
Solves knapsack problem with the library defined in knapsack.solver option: - cbc (default) - uses rcbc package - lpsolve - uses lpSolve package
Usage
knapsack(profit, volume, moq = rep(0, length(profit)), cap = 65)
Arguments
profit |
vector with profit for item |
volume |
vector of item sizes in cubic meters |
moq |
vector of flags where 1 means that row contans mininum order quantity (MOQ). Defaults to zero vector matching profit in length. |
cap |
size of the container in cubic meters |
Value
vector with container numbers keeping the permutation of the original data
[Package mknapsack version 0.1.0 Index]