OR-Tools  8.2
KnapsackBruteForceSolver

Detailed Description

Definition at line 544 of file knapsack_solver.cc.

Public Member Functions

 KnapsackBruteForceSolver (const std::string &solver_name)
 
void Init (const std::vector< int64 > &profits, const std::vector< std::vector< int64 > > &weights, const std::vector< int64 > &capacities) override
 
int64 Solve (TimeLimit *time_limit, bool *is_solution_optimal) override
 
bool best_solution (int item_id) const override
 
virtual void GetLowerAndUpperBoundWhenItem (int item_id, bool is_item_in, int64 *lower_bound, int64 *upper_bound)
 
virtual std::string GetName () const
 

Constructor & Destructor Documentation

◆ KnapsackBruteForceSolver()

KnapsackBruteForceSolver ( const std::string &  solver_name)
explicit

Definition at line 571 of file knapsack_solver.cc.

Member Function Documentation

◆ best_solution()

bool best_solution ( int  item_id) const
inlineoverridevirtual

Implements BaseKnapsackSolver.

Definition at line 557 of file knapsack_solver.cc.

◆ GetLowerAndUpperBoundWhenItem()

void GetLowerAndUpperBoundWhenItem ( int  item_id,
bool  is_item_in,
int64 lower_bound,
int64 upper_bound 
)
virtualinherited

Reimplemented in KnapsackGenericSolver.

Definition at line 1372 of file knapsack_solver.cc.

◆ GetName()

virtual std::string GetName ( ) const
inlinevirtualinherited

Definition at line 590 of file knapsack_solver.h.

◆ Init()

void Init ( const std::vector< int64 > &  profits,
const std::vector< std::vector< int64 > > &  weights,
const std::vector< int64 > &  capacities 
)
overridevirtual

Implements BaseKnapsackSolver.

Definition at line 579 of file knapsack_solver.cc.

◆ Solve()

int64 Solve ( TimeLimit time_limit,
bool *  is_solution_optimal 
)
overridevirtual

Implements BaseKnapsackSolver.

Definition at line 602 of file knapsack_solver.cc.


The documentation for this class was generated from the following file: