Learn R Programming

rminizinc (version 0.0.8)

knapsack: knapsack problem

Description

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

Usage

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