OR-Tools  8.2
KnapsackSolverForCuts

Detailed Description

Definition at line 299 of file knapsack_solver_for_cuts.h.

Public Member Functions

 KnapsackSolverForCuts (std::string solver_name)
 
 KnapsackSolverForCuts (const KnapsackSolverForCuts &)=delete
 
KnapsackSolverForCutsoperator= (const KnapsackSolverForCuts &)=delete
 
void Init (const std::vector< double > &profits, const std::vector< double > &weights, const double capacity)
 
int GetNumberOfItems () const
 
void GetLowerAndUpperBoundWhenItem (int item_id, bool is_item_in, double *lower_bound, double *upper_bound)
 
double GetUpperBound ()
 
void set_solution_lower_bound_threshold (const double solution_lower_bound_threshold)
 
void set_solution_upper_bound_threshold (const double solution_upper_bound_threshold)
 
void set_node_limit (const int64 node_limit)
 
double Solve (TimeLimit *time_limit, bool *is_solution_optimal)
 
bool best_solution (int item_id) const
 
const std::string & GetName () const
 

Constructor & Destructor Documentation

◆ KnapsackSolverForCuts() [1/2]

KnapsackSolverForCuts ( std::string  solver_name)
explicit

Definition at line 281 of file knapsack_solver_for_cuts.cc.

◆ KnapsackSolverForCuts() [2/2]

Member Function Documentation

◆ best_solution()

bool best_solution ( int  item_id) const
inline

Definition at line 340 of file knapsack_solver_for_cuts.h.

◆ GetLowerAndUpperBoundWhenItem()

void GetLowerAndUpperBoundWhenItem ( int  item_id,
bool  is_item_in,
double *  lower_bound,
double *  upper_bound 
)

Definition at line 297 of file knapsack_solver_for_cuts.cc.

◆ GetName()

const std::string & GetName ( ) const
inline

Definition at line 345 of file knapsack_solver_for_cuts.h.

◆ GetNumberOfItems()

int GetNumberOfItems ( ) const
inline

Definition at line 309 of file knapsack_solver_for_cuts.h.

◆ GetUpperBound()

double GetUpperBound ( )
inline

Definition at line 318 of file knapsack_solver_for_cuts.h.

◆ Init()

void Init ( const std::vector< double > &  profits,
const std::vector< double > &  weights,
const double  capacity 
)

Definition at line 286 of file knapsack_solver_for_cuts.cc.

◆ operator=()

KnapsackSolverForCuts & operator= ( const KnapsackSolverForCuts )
delete

◆ set_node_limit()

void set_node_limit ( const int64  node_limit)
inline

Definition at line 335 of file knapsack_solver_for_cuts.h.

◆ set_solution_lower_bound_threshold()

void set_solution_lower_bound_threshold ( const double  solution_lower_bound_threshold)
inline

Definition at line 322 of file knapsack_solver_for_cuts.h.

◆ set_solution_upper_bound_threshold()

void set_solution_upper_bound_threshold ( const double  solution_upper_bound_threshold)
inline

Definition at line 329 of file knapsack_solver_for_cuts.h.

◆ Solve()

double Solve ( TimeLimit time_limit,
bool *  is_solution_optimal 
)

Definition at line 320 of file knapsack_solver_for_cuts.cc.


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