DotNet Reference

DotNet Reference

KnapsackSolver

Detailed Description

Definition at line 13 of file KnapsackSolver.cs.

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
}
 

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
 

Member Enumeration Documentation

◆ SolverType

enum SolverType
strong
Enumerator
KNAPSACK_BRUTE_FORCE_SOLVER 
KNAPSACK_64ITEMS_SOLVER 
KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER 
KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER 
KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER 

Definition at line 96 of file KnapsackSolver.cs.

Constructor & Destructor Documentation

◆ KnapsackSolver() [1/2]

KnapsackSolver ( string  solver_name)
inline

Definition at line 47 of file KnapsackSolver.cs.

◆ KnapsackSolver() [2/2]

KnapsackSolver ( KnapsackSolver.SolverType  solver_type,
string  solver_name 
)
inline

Definition at line 51 of file KnapsackSolver.cs.

Member Function Documentation

◆ BestSolutionContains()

bool BestSolutionContains ( int  item_id)
inline

Definition at line 68 of file KnapsackSolver.cs.

◆ Dispose() [1/2]

void Dispose ( )
inline

Definition at line 30 of file KnapsackSolver.cs.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
inlineprotectedvirtual

Definition at line 35 of file KnapsackSolver.cs.

◆ GetName()

string GetName ( )
inline

Definition at line 78 of file KnapsackSolver.cs.

◆ Init()

void Init ( long[]  profits,
long  weights[,],
long[]  capacities 
)
inline

Definition at line 55 of file KnapsackSolver.cs.

◆ IsSolutionOptimal()

bool IsSolutionOptimal ( )
inline

Definition at line 73 of file KnapsackSolver.cs.

◆ set_time_limit()

void set_time_limit ( double  time_limit_seconds)
inline

Definition at line 92 of file KnapsackSolver.cs.

◆ SetUseReduction()

void SetUseReduction ( bool  use_reduction)
inline

Definition at line 88 of file KnapsackSolver.cs.

◆ Solve()

long Solve ( )
inline

Definition at line 63 of file KnapsackSolver.cs.

◆ UseReduction()

bool UseReduction ( )
inline

Definition at line 83 of file KnapsackSolver.cs.

Member Data Documentation

◆ swigCMemOwn

bool swigCMemOwn
protected

Definition at line 15 of file KnapsackSolver.cs.


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