Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.algorithms.KnapsackSolver.SolverType Enum Reference

Public Member Functions

final int swigValue ()
 

Static Public Member Functions

static SolverType swigToEnum (int swigValue)
 

Public Attributes

 KNAPSACK_BRUTE_FORCE_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_BRUTE_FORCE_SOLVER_get())
 
 KNAPSACK_64ITEMS_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_64ITEMS_SOLVER_get())
 
 KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER_get())
 
 KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER_get())
 
 KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER_get())
 
 KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER_get())
 
 KNAPSACK_DIVIDE_AND_CONQUER_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_DIVIDE_AND_CONQUER_SOLVER_get())
 
 KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER_get())
 

Detailed Description

Enum controlling which underlying algorithm is used.

This enum is passed to the constructor of the KnapsackSolver object.
It selects which solving method will be used.

Definition at line 198 of file KnapsackSolver.java.

Member Function Documentation

◆ swigToEnum()

static SolverType com.google.ortools.algorithms.KnapsackSolver.SolverType.swigToEnum ( int swigValue)
static

Definition at line 266 of file KnapsackSolver.java.

◆ swigValue()

final int com.google.ortools.algorithms.KnapsackSolver.SolverType.swigValue ( )

Definition at line 262 of file KnapsackSolver.java.

Member Data Documentation

◆ KNAPSACK_64ITEMS_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_64ITEMS_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_64ITEMS_SOLVER_get())

Optimized method for single dimension small problems

Limited to 64 items and one dimension, this
solver uses a branch & bound algorithm. This solver is about 4 times
faster than KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER.

Definition at line 215 of file KnapsackSolver.java.

◆ KNAPSACK_BRUTE_FORCE_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_BRUTE_FORCE_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_BRUTE_FORCE_SOLVER_get())

Brute force method.

Limited to 30 items and one dimension, this
solver uses a brute force algorithm, ie. explores all possible states.
Experiments show competitive performance for instances with less than
15 items.

Definition at line 207 of file KnapsackSolver.java.

◆ KNAPSACK_DIVIDE_AND_CONQUER_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_DIVIDE_AND_CONQUER_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_DIVIDE_AND_CONQUER_SOLVER_get())

Divide and Conquer approach for single dimension problems

Limited to one dimension, this solver is based on a divide and conquer
technique and is suitable for larger problems than Dynamic Programming
Solver. The time complexity is O(capacity * number_of_items) and the
space complexity is O(capacity + number_of_items).

Definition at line 253 of file KnapsackSolver.java.

◆ KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_DYNAMIC_PROGRAMMING_SOLVER_get())

Dynamic Programming approach for single dimension problems

Limited to one dimension, this solver is based on a dynamic programming
algorithm. The time and space complexity is O(capacity *<br> number_of_items).

Definition at line 223 of file KnapsackSolver.java.

◆ KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER_get())

Generic Solver.

This solver can deal with both large number of items and several
dimensions. This solver is based on branch and bound.

Definition at line 237 of file KnapsackSolver.java.

◆ KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_CBC_MIP_SOLVER_get())

CBC Based Solver

This solver can deal with both large number of items and several
dimensions. This solver is based on Integer Programming solver CBC.

Definition at line 230 of file KnapsackSolver.java.

◆ KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_CP_SAT_SOLVER_get())

CP-SAT based solver

This solver can deal with both large number of items and several
dimensions. This solver is based on the CP-SAT solver

Definition at line 260 of file KnapsackSolver.java.

◆ KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER

com.google.ortools.algorithms.KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER =(mainJNI.KnapsackSolver_KNAPSACK_MULTIDIMENSION_SCIP_MIP_SOLVER_get())

SCIP based solver

This solver can deal with both large number of items and several
dimensions. This solver is based on Integer Programming solver SCIP.

Definition at line 244 of file KnapsackSolver.java.


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