brute_force_knapsack: brute_force_knapsack function

Description Usage Arguments Value

View source: R/brute_force_knapsack.R

Description

evaluates the solution for knapsack problem by calculating sum of weights & profits for each combination possible for given input

Usage

1

Arguments

x

as a data.frame containing the weights and values of knapsack objects with column names 'w' & 'v' respectively

W

as a numeric value defining the constraint of the knapsack capacity

parallel

as a logical to specify if the code should be parallelized or not. Default value is FALSE

Value

list containing sum of values of chosen elements and the reference of the elements chosen in the final solution


JS2387/Group8knapsack documentation built on Dec. 18, 2021, 12:27 a.m.