gbp1d_solver_dpp {gbp}R Documentation

gbp1d_solver_dpp

Description

solve gbp1d via dynamic programming simple - adagio::knapsnak()

Usage

gbp1d_solver_dpp(p, w, c)

Arguments

p

p profit <vector>::<numeric>

w

w weight <vector>::<integer>

c

c constraint on weight <integer>

Details

a dynamic programming solver on gbp1d instantiate - knapsack 0-1 problem, see gbp1d.

gbp1d init a profit vector p, a weight vector w, and a weight constraint c, gbp1d solver would solve

maximize sum_j=1^n p_j x_j

subject to sum_j=1^n w_j x_j leq c x_j in 0, 1, j = 1, ...., n

and instantiate a gbp1d object with a selectin vector x and an objective z.

gbp1d is implemented as rcpp class, an instantiate can be solved by calling gbp1d_solver_dpp(p, w, c) and gbp1d_solver_min(p, w, c)

Value

gbp1d a gbp1d instantiate with p profit, w weight, c constraint on weight, k selection, o objective, and ok an indicator of all fit or not.

See Also

Other gbp1d: gbp1d


[Package gbp version 0.1.0.4 Index]