Description Usage Arguments Value Examples
Solver for the knapsack problem based on the brute force algorithm.
1 | brute_force_knapsack(x, W, parallel = FALSE)
|
x |
Dataframe containing weight and value of objects |
W |
maximum weight allowed in knapsack |
parallel |
boolean value whether to use parallelization |
List with the optimal value and the respective elements, that are included in the solution.
1 2 3 | knapsack_objects <- get_knapsack_objects(2000)
brute_force_knapsack(x = knapsack_objects[1:8, ], W = 3500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.