Description Usage Arguments Value References See Also Examples
View source: R/brute_force_knapsack.R
The function returns maximum value within all the possible solutions
1 | brute_force_knapsack(x, W = NULL, ..., parallel = FALSE)
|
x |
data.frame, contains variables weight(w) and value(v) |
W |
weight threshold for the knapsack |
... |
arguments |
parallel |
boolean, if 'T' then implements parallelization |
Total and Maximum value within the threshold of W
https://en.wikipedia.org/wiki/Knapsack problem
slow_brute_force
greedy_knapsack
knapsack_dynamic
1 2 3 4 | brute_force_knapsack(x = knapsack_objects[1:8,], W = 3500, parallel = FALSE)
brute_force_knapsack(x = knapsack_objects[1:12,], W = 3500, parallel = FALSE)
brute_force_knapsack(x = knapsack_objects[1:8,], W = 2000, parallel = FALSE)
brute_force_knapsack(x = knapsack_objects[1:12,], W = 2000, parallel = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.