optimized_brute_force: optimized_brute_force

Description Usage Arguments Value Examples

View source: R/optimized_brute_force.R

Description

Optimized version of the Brute Force Algorithm

Usage

1

Arguments

x

Dataframe containing weight and value of objects

W

maximum weight allowed in knapsack

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)

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

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