brute_force_knapsack: brute_force_knapsack

Description Usage Arguments Value Examples

View source: R/brute_force.R

Description

Solver for the knapsack problem based on the brute force algorithm.

Usage

1

Arguments

x

Dataframe containing weight and value of objects

W

maximum weight allowed in knapsack

parallel

boolean value whether to use parallelization

Value

List with the optimal value and the respective elements, that are included in the solution.

Examples

1
2
3
knapsack_objects <- get_knapsack_objects(2000)

brute_force_knapsack(x = knapsack_objects[1:8, ], W = 3500)

PatrickSVM/knapsack documentation built on Dec. 18, 2021, 6:42 a.m.