knapsack: Solves knapsack problem with the library defined in...

Description Usage Arguments Value

View source: R/packing.R

Description

Solves knapsack problem with the library defined in knapsack.solver option: - cbc (default) - uses rcbc package - lpsolve - uses lpSolve package

Usage

1
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


madedotcom/mknapsack documentation built on June 28, 2018, 2:09 a.m.