MATLAB: Is there any learning material available for Knapsack/Backpack problem in optimization toolbox of MATLAB
genetic algorithmoptimizationOptimization Toolbox
How can I learn to experiment with Knapsack problem in optimization toolbox of MATLAB?
Is any video tutorial available out there?
Best Answer
I know of no tutorial, but I believe that the problem formulation is not hard. Useintlinprog. To maximize the value of the items in the knapsack, have the objective function vectorf be the negative of the value of each item (intlinprog minimizes, so to maximize, minimize the negative). Linear constraints, such as the total weight, can be easily included in the linear inequality constraint matrixA and the vectorb.
Best Answer