Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.bop.BopParameters.ThreadSynchronizationType Enum Reference

Detailed Description

Defines how the different solvers are synchronized during the search.
Note that the synchronization (if any) occurs before each call to an
optimizer (the smallest granularity of the solver in a parallel context).

Protobuf enum operations_research.bop.BopParameters.ThreadSynchronizationType

Definition at line 89 of file BopParameters.java.

Inheritance diagram for com.google.ortools.bop.BopParameters.ThreadSynchronizationType:

Public Member Functions

final int getNumber ()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor ()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType ()

Static Public Member Functions

 [static initializer]
static ThreadSynchronizationType valueOf (int value)
static ThreadSynchronizationType forNumber (int value)
static com.google.protobuf.Internal.EnumLiteMap< ThreadSynchronizationTypeinternalGetValueMap ()
static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor ()
static ThreadSynchronizationType valueOf (com.google.protobuf.Descriptors.EnumValueDescriptor desc)

Public Attributes

 NO_SYNCHRONIZATION =(0)
 SYNCHRONIZE_ALL =(1)
 SYNCHRONIZE_ON_RIGHT =(2)

Static Public Attributes

static final int NO_SYNCHRONIZATION_VALUE = 0
static final int SYNCHRONIZE_ALL_VALUE = 1
static final int SYNCHRONIZE_ON_RIGHT_VALUE = 2

Member Function Documentation

◆ [static initializer]()

com.google.ortools.bop.BopParameters.ThreadSynchronizationType.[static initializer]
static

◆ forNumber()

ThreadSynchronizationType com.google.ortools.bop.BopParameters.ThreadSynchronizationType.forNumber ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.

Definition at line 220 of file BopParameters.java.

◆ getDescriptor()

com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.bop.BopParameters.ThreadSynchronizationType.getDescriptor ( )
static

Definition at line 250 of file BopParameters.java.

◆ getDescriptorForType()

final com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.bop.BopParameters.ThreadSynchronizationType.getDescriptorForType ( )

Definition at line 246 of file BopParameters.java.

◆ getNumber()

final int com.google.ortools.bop.BopParameters.ThreadSynchronizationType.getNumber ( )

Definition at line 202 of file BopParameters.java.

◆ getValueDescriptor()

final com.google.protobuf.Descriptors.EnumValueDescriptor com.google.ortools.bop.BopParameters.ThreadSynchronizationType.getValueDescriptor ( )

Definition at line 242 of file BopParameters.java.

◆ internalGetValueMap()

com.google.protobuf.Internal.EnumLiteMap< ThreadSynchronizationType > com.google.ortools.bop.BopParameters.ThreadSynchronizationType.internalGetValueMap ( )
static

Definition at line 230 of file BopParameters.java.

◆ valueOf() [1/2]

ThreadSynchronizationType com.google.ortools.bop.BopParameters.ThreadSynchronizationType.valueOf ( com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static

Definition at line 256 of file BopParameters.java.

◆ valueOf() [2/2]

ThreadSynchronizationType com.google.ortools.bop.BopParameters.ThreadSynchronizationType.valueOf ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.
Deprecated
Use forNumber(int) instead.

Definition at line 212 of file BopParameters.java.

Member Data Documentation

◆ NO_SYNCHRONIZATION

com.google.ortools.bop.BopParameters.ThreadSynchronizationType.NO_SYNCHRONIZATION =(0)
No synchronization. The solvers run independently until the time limit
is reached; Then learned information from each solver are aggregated.
The final solution is the best of all found solutions.
Pros: - No need to wait for another solver to complete its task,
- Adding a new solver always improves the final solution (In the
current implementation it still depends on the machine load and
the time limit).
Cons: - No learning between solvers.

NO_SYNCHRONIZATION = 0;

Definition at line 105 of file BopParameters.java.

◆ NO_SYNCHRONIZATION_VALUE

final int com.google.ortools.bop.BopParameters.ThreadSynchronizationType.NO_SYNCHRONIZATION_VALUE = 0
static
No synchronization. The solvers run independently until the time limit
is reached; Then learned information from each solver are aggregated.
The final solution is the best of all found solutions.
Pros: - No need to wait for another solver to complete its task,
- Adding a new solver always improves the final solution (In the
current implementation it still depends on the machine load and
the time limit).
Cons: - No learning between solvers.

NO_SYNCHRONIZATION = 0;

Definition at line 165 of file BopParameters.java.

◆ SYNCHRONIZE_ALL

com.google.ortools.bop.BopParameters.ThreadSynchronizationType.SYNCHRONIZE_ALL =(1)
Synchronize all solvers. Each solver waits for all other solvers to
complete the previous optimizer run, before running again.
The final solution is the best of all found solutions.
Pros: - Full learning between solvers.
Cons: - A lot of waiting time when solvers don't run at the exact same
speed,
- The quality of the final solution depends on the number of
solvers, adding one more solver might lead to poorer results
because the search goes on a different path.

SYNCHRONIZE_ALL = 1;

Definition at line 121 of file BopParameters.java.

◆ SYNCHRONIZE_ALL_VALUE

final int com.google.ortools.bop.BopParameters.ThreadSynchronizationType.SYNCHRONIZE_ALL_VALUE = 1
static
Synchronize all solvers. Each solver waits for all other solvers to
complete the previous optimizer run, before running again.
The final solution is the best of all found solutions.
Pros: - Full learning between solvers.
Cons: - A lot of waiting time when solvers don't run at the exact same
speed,
- The quality of the final solution depends on the number of
solvers, adding one more solver might lead to poorer results
because the search goes on a different path.

SYNCHRONIZE_ALL = 1;

Definition at line 181 of file BopParameters.java.

◆ SYNCHRONIZE_ON_RIGHT

com.google.ortools.bop.BopParameters.ThreadSynchronizationType.SYNCHRONIZE_ON_RIGHT =(2)
Solver i synchronizes with solvers 0..i-1.
This is a good tradeoff between NO_SYNCHRONIZATION and SYNCHRONIZE_ALL:
communication while keeping a relative determinism on the result even
when the number of solvers increases.
The final solution is the best of all found solutions.
Pros: - Solver i learns from i different solvers,
- Adding a new solver always improves the final solution (In the
current implementation it still depends on the machine load and
the time limit).
Cons: - No full learning,
- Some solvers need to wait for synchronization.

SYNCHRONIZE_ON_RIGHT = 2;

Definition at line 139 of file BopParameters.java.

◆ SYNCHRONIZE_ON_RIGHT_VALUE

final int com.google.ortools.bop.BopParameters.ThreadSynchronizationType.SYNCHRONIZE_ON_RIGHT_VALUE = 2
static
Solver i synchronizes with solvers 0..i-1.
This is a good tradeoff between NO_SYNCHRONIZATION and SYNCHRONIZE_ALL:
communication while keeping a relative determinism on the result even
when the number of solvers increases.
The final solution is the best of all found solutions.
Pros: - Solver i learns from i different solvers,
- Adding a new solver always improves the final solution (In the
current implementation it still depends on the machine load and
the time limit).
Cons: - No full learning,
- Some solvers need to wait for synchronization.

SYNCHRONIZE_ON_RIGHT = 2;

Definition at line 199 of file BopParameters.java.


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