Given a set of
./main_knapsack.out {...}
where the available options are:
-
--inst
: file containing the data- must be placed in the
./instances
folder and formatted as follows:
n W list of profits (delimited with spaces) list of weights (delimited with spaces)
- must be placed in the
-
--ub
: upper bound functiondantzig
: implementation of Dantzig's bound [1] (default)martello
: implementation of Martello and Toth's bound [2]
-
--lb
: initial lower bound (LB)opt
: initialize the LB to the best solution known (default)inf
: initialize the LB to 0, leading to a search from scratch{NUM}
: initialize the LB to the given number
Specifically for targeting hard Pisinger's instances [3], the following parameters can be used (and --inst
omitted):
-
--n
: number of items- any positive integer (
100
by default)
- any positive integer (
-
--r
: range of coefficients- any positive integer (
10000
by default)
- any positive integer (
-
--t
: type of instance1
: uncorrelated (default)2
: weakly correlated3
: strongly correlated4
: inverse strongly correlated5
: almost strongly correlated6
: subset sum9
: uncorrelated with similar weights11
: uncorrelated spanner, span(2,10)12
: weakly correlated spanner, span(2,10)13
: strongly correlated spanner, span(2,10)14
: multiple strongly correlated, mstr(3R/10,2R/10,6)15
: profit ceiling, pceil(3)16
: circle, circle(2/3)
-
--id
: index of the instance- any positive integer (
1
by default)
- any positive integer (
-
--s
: number of instances in series- any positive integer (
100
by default)
- any positive integer (
- G. B. Dantzig. (1957) Discrete-Variable Extremum Problems. Operations Research, 5(2):266-288. DOI: 10.1287/opre.5.2.266.
- S. Martello, P. Toth. (1977) An upper bound for the zero-one knapsack problem and a branch and bound algorithm. European Journal of Operational Research, 1(3):169-175. DOI: 10.1016/0377-2217(77)90024-8.
- D. Pisinger. (2005) Where are the hard knapsack problems?. Computers & Operations Research, 32(9):2271-2284. DOI: 10.1016/j.cor.2004.03.002.