Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Algorithms.KnapsackSolver Class Reference
Inheritance diagram for Google.OrTools.Algorithms.KnapsackSolver:

Public Types

enum  SolverType {
  KNAPSACK_BRUTE_FORCE_SOLVER = 0 , KNAPSACK_64ITEMS_SOLVER = 1 , KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER = 2 , KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER = 3 ,
  KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER = 5 , KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER = 6 , KNAPSACK_DIVIDE_AND_CONQUER_SOLVER = 9 , KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER = 10
}
 

Public Member Functions

void Dispose ()
 
 KnapsackSolver (string solver_name)
 
 KnapsackSolver (KnapsackSolver.SolverType solver_type, string solver_name)
 
void Init (long[] profits, long[,] weights, long[] capacities)
 
long Solve ()
 
bool BestSolutionContains (int item_id)
 
bool IsSolutionOptimal ()
 
string GetName ()
 
bool UseReduction ()
 
void SetUseReduction (bool use_reduction)
 
void set_time_limit (double time_limit_seconds)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Protected Attributes

bool swigCMemOwn
 

Detailed Description

Definition at line 15 of file KnapsackSolver.cs.

Member Enumeration Documentation

◆ SolverType

Enumerator
KNAPSACK_BRUTE_FORCE_SOLVER 
KNAPSACK_64ITEMS_SOLVER 
KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER 
KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER 
KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER 
KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER 
KNAPSACK_DIVIDE_AND_CONQUER_SOLVER 
KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER 

Definition at line 111 of file KnapsackSolver.cs.

Constructor & Destructor Documentation

◆ KnapsackSolver() [1/2]

Google.OrTools.Algorithms.KnapsackSolver.KnapsackSolver ( string solver_name)
inline

Definition at line 62 of file KnapsackSolver.cs.

◆ KnapsackSolver() [2/2]

Google.OrTools.Algorithms.KnapsackSolver.KnapsackSolver ( KnapsackSolver::SolverType solver_type,
string solver_name )
inline

Definition at line 66 of file KnapsackSolver.cs.

Member Function Documentation

◆ BestSolutionContains()

bool Google.OrTools.Algorithms.KnapsackSolver.BestSolutionContains ( int item_id)
inline

Definition at line 83 of file KnapsackSolver.cs.

◆ Dispose() [1/2]

void Google.OrTools.Algorithms.KnapsackSolver.Dispose ( )
inline

Definition at line 45 of file KnapsackSolver.cs.

◆ Dispose() [2/2]

virtual void Google.OrTools.Algorithms.KnapsackSolver.Dispose ( bool disposing)
inlineprotectedvirtual

Definition at line 50 of file KnapsackSolver.cs.

◆ GetName()

string Google.OrTools.Algorithms.KnapsackSolver.GetName ( )
inline

Definition at line 93 of file KnapsackSolver.cs.

◆ Init()

void Google.OrTools.Algorithms.KnapsackSolver.Init ( long[] profits,
long weights[,],
long[] capacities )
inline

Definition at line 70 of file KnapsackSolver.cs.

◆ IsSolutionOptimal()

bool Google.OrTools.Algorithms.KnapsackSolver.IsSolutionOptimal ( )
inline

Definition at line 88 of file KnapsackSolver.cs.

◆ set_time_limit()

void Google.OrTools.Algorithms.KnapsackSolver.set_time_limit ( double time_limit_seconds)
inline

Definition at line 107 of file KnapsackSolver.cs.

◆ SetUseReduction()

void Google.OrTools.Algorithms.KnapsackSolver.SetUseReduction ( bool use_reduction)
inline

Definition at line 103 of file KnapsackSolver.cs.

◆ Solve()

long Google.OrTools.Algorithms.KnapsackSolver.Solve ( )
inline

Definition at line 78 of file KnapsackSolver.cs.

◆ UseReduction()

bool Google.OrTools.Algorithms.KnapsackSolver.UseReduction ( )
inline

Definition at line 98 of file KnapsackSolver.cs.

Member Data Documentation

◆ swigCMemOwn

bool Google.OrTools.Algorithms.KnapsackSolver.swigCMemOwn
protected

Definition at line 17 of file KnapsackSolver.cs.


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