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
  • Enum Constant Details

    • NO_SYNCHRONIZATION

      public static final BopParameters.ThreadSynchronizationType 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

      public static final BopParameters.ThreadSynchronizationType 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

      public static final BopParameters.ThreadSynchronizationType 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_VALUE
       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;
      See Also:
    • SYNCHRONIZE_ALL_VALUE

      public static final int SYNCHRONIZE_ALL_VALUE
       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;
      See Also:
    • SYNCHRONIZE_ON_RIGHT_VALUE

      public static final int SYNCHRONIZE_ON_RIGHT_VALUE
       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;
      See Also:
  • Method Details

    • values

      public static BopParameters.ThreadSynchronizationType[] 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

      public static BopParameters.ThreadSynchronizationType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static BopParameters.ThreadSynchronizationType valueOf(int value)
      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 name
      NullPointerException - if the argument is null
    • forNumber

      public static BopParameters.ThreadSynchronizationType forNumber(int value)
      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 interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.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 name
      NullPointerException - if the argument is null