Enum BopParameters.ThreadSynchronizationType
java.lang.Object
java.lang.Enum<BopParameters.ThreadSynchronizationType>
com.google.ortools.bop.BopParameters.ThreadSynchronizationType
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<BopParameters.ThreadSynchronizationType>
,java.lang.constant.Constable
- Enclosing class:
BopParameters
public static enum BopParameters.ThreadSynchronizationType
extends Enum<BopParameters.ThreadSynchronizationType>
implements com.google.protobuf.ProtocolMessageEnum
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo synchronization.Synchronize all solvers.Solver i synchronizes with solvers 0..i-1. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
No synchronization.static final int
Synchronize all solvers.static final int
Solver i synchronizes with solvers 0..i-1. -
Method Summary
Modifier and TypeMethodDescriptionforNumber
(int value) static com.google.protobuf.Descriptors.EnumDescriptor
final com.google.protobuf.Descriptors.EnumDescriptor
final int
final com.google.protobuf.Descriptors.EnumValueDescriptor
static com.google.protobuf.Internal.EnumLiteMap
<BopParameters.ThreadSynchronizationType> valueOf
(int value) Deprecated.valueOf
(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_SYNCHRONIZATION
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;
-
SYNCHRONIZE_ALL
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;
-
SYNCHRONIZE_ON_RIGHT
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;
-
-
Field Details
-
NO_SYNCHRONIZATION_VALUE
public static final int NO_SYNCHRONIZATION_VALUENo 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;
- See Also:
-
SYNCHRONIZE_ALL_VALUE
public static final int SYNCHRONIZE_ALL_VALUESynchronize 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;
- See Also:
-
SYNCHRONIZE_ON_RIGHT_VALUE
public static final int SYNCHRONIZE_ON_RIGHT_VALUESolver 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;
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
forNumber
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<BopParameters.ThreadSynchronizationType> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static BopParameters.ThreadSynchronizationType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-