knapsack: knapsack problem

Description Usage Arguments

View source: R/CommonMZNProblems.R

Description

Solve a simple knapsack problem (Goal is to maximize the profit)

Usage

1
knapsack(n, capacity, profit, size)

Arguments

n

number of items

capacity

total capacity of carrying weight

profit

profit corresponding to each item

size

weight/size of each item


rminizinc documentation built on Oct. 15, 2021, 9:06 a.m.