[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eKnapsackSolver\u003c/code\u003e is a C++ class within the Google OR-Tools library designed for solving knapsack problems, offering various methods for initialization, problem-solving, and solution analysis.\u003c/p\u003e\n"],["\u003cp\u003eUsers can initialize the solver with item profits, weights, and knapsack capacities using the \u003ccode\u003eInit\u003c/code\u003e method, and then invoke the \u003ccode\u003eSolve\u003c/code\u003e method to find the optimal solution.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides functionalities like \u003ccode\u003eBestSolutionContains\u003c/code\u003e to check if an item is part of the optimal solution, and \u003ccode\u003eIsSolutionOptimal\u003c/code\u003e to determine the solution's optimality.\u003c/p\u003e\n"],["\u003cp\u003eAdditional features include setting time limits for the solver using \u003ccode\u003eset_time_limit\u003c/code\u003e and controlling problem reduction techniques with \u003ccode\u003eset_use_reduction\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `KnapsackSolver` class provides methods for solving knapsack problems. Key actions include initializing the solver with `Init`, providing profits, weights, and capacities. The `Solve` method computes the solution, returning the maximum total profit. `BestSolutionContains` checks if a specific item is included in the optimal solution. Other functionalities include retrieving the `GetName`, determining if the solution is optimal with `IsSolutionOptimal`, enabling/disabling reduction with `set_use_reduction`/ `use_reduction` and setting a time limit via `set_time_limit`. It can be constructed using `KnapsackSolver` and destructed with `~KnapsackSolver`.\n"],null,[]]