Class SimulatedAnnealingParameters.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<SimulatedAnnealingParameters.Builder>
com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder
All Implemented Interfaces:
SimulatedAnnealingParametersOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SimulatedAnnealingParameters

public static final class SimulatedAnnealingParameters.Builder extends com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder> implements SimulatedAnnealingParametersOrBuilder
 Specifies the behavior of a simulated annealing acceptance strategy.
 
Protobuf type operations_research.SimulatedAnnealingParameters
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
    • getDefaultInstanceForType

      public SimulatedAnnealingParameters getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SimulatedAnnealingParameters buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SimulatedAnnealingParameters.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SimulatedAnnealingParameters.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
    • mergeFrom

      public SimulatedAnnealingParameters.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SimulatedAnnealingParameters.Builder>
      Throws:
      IOException
    • getCoolingScheduleStrategyValue

      public int getCoolingScheduleStrategyValue()
       Determines the speed at which the temperature changes from initial to
       final.
       
      .operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
      Specified by:
      getCoolingScheduleStrategyValue in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      The enum numeric value on the wire for coolingScheduleStrategy.
    • setCoolingScheduleStrategyValue

      public SimulatedAnnealingParameters.Builder setCoolingScheduleStrategyValue(int value)
       Determines the speed at which the temperature changes from initial to
       final.
       
      .operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
      Parameters:
      value - The enum numeric value on the wire for coolingScheduleStrategy to set.
      Returns:
      This builder for chaining.
    • getCoolingScheduleStrategy

      public CoolingScheduleStrategy.Value getCoolingScheduleStrategy()
       Determines the speed at which the temperature changes from initial to
       final.
       
      .operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
      Specified by:
      getCoolingScheduleStrategy in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      The coolingScheduleStrategy.
    • setCoolingScheduleStrategy

      public SimulatedAnnealingParameters.Builder setCoolingScheduleStrategy(CoolingScheduleStrategy.Value value)
       Determines the speed at which the temperature changes from initial to
       final.
       
      .operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
      Parameters:
      value - The coolingScheduleStrategy to set.
      Returns:
      This builder for chaining.
    • clearCoolingScheduleStrategy

      public SimulatedAnnealingParameters.Builder clearCoolingScheduleStrategy()
       Determines the speed at which the temperature changes from initial to
       final.
       
      .operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
      Returns:
      This builder for chaining.
    • hasInitialTemperature

      public boolean hasInitialTemperature()
       The initial temperature. See CoolingScheduleStrategy for its usage.
       
      optional double initial_temperature = 2;
      Specified by:
      hasInitialTemperature in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      Whether the initialTemperature field is set.
    • getInitialTemperature

      public double getInitialTemperature()
       The initial temperature. See CoolingScheduleStrategy for its usage.
       
      optional double initial_temperature = 2;
      Specified by:
      getInitialTemperature in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      The initialTemperature.
    • setInitialTemperature

      public SimulatedAnnealingParameters.Builder setInitialTemperature(double value)
       The initial temperature. See CoolingScheduleStrategy for its usage.
       
      optional double initial_temperature = 2;
      Parameters:
      value - The initialTemperature to set.
      Returns:
      This builder for chaining.
    • clearInitialTemperature

      public SimulatedAnnealingParameters.Builder clearInitialTemperature()
       The initial temperature. See CoolingScheduleStrategy for its usage.
       
      optional double initial_temperature = 2;
      Returns:
      This builder for chaining.
    • hasFinalTemperature

      public boolean hasFinalTemperature()
       The final temperature. See CoolingScheduleStrategy for its usage.
       
      optional double final_temperature = 3;
      Specified by:
      hasFinalTemperature in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      Whether the finalTemperature field is set.
    • getFinalTemperature

      public double getFinalTemperature()
       The final temperature. See CoolingScheduleStrategy for its usage.
       
      optional double final_temperature = 3;
      Specified by:
      getFinalTemperature in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      The finalTemperature.
    • setFinalTemperature

      public SimulatedAnnealingParameters.Builder setFinalTemperature(double value)
       The final temperature. See CoolingScheduleStrategy for its usage.
       
      optional double final_temperature = 3;
      Parameters:
      value - The finalTemperature to set.
      Returns:
      This builder for chaining.
    • clearFinalTemperature

      public SimulatedAnnealingParameters.Builder clearFinalTemperature()
       The final temperature. See CoolingScheduleStrategy for its usage.
       
      optional double final_temperature = 3;
      Returns:
      This builder for chaining.
    • hasAutomaticTemperatures

      public boolean hasAutomaticTemperatures()
       Automatically define the value for the temperatures as follows.
       First, a  reference temperature t is defined as
       w1 * c1 + w2 * c2 + ... + wK * cK
       where 0 < wJ <= 1 is the fraction of vehicles of cost class J and cJ is the
       average arc cost for the cost class J.
       The value of cJ is identified by randomly sampling N arc costs for the cost
       class J, where N is equal to the number of instance nodes.
       The initial and final temperatures are then defined as
       - initial_temperature: 0.1 * t
       - final_temperature: 0.001 * t
       
      optional bool automatic_temperatures = 4;
      Specified by:
      hasAutomaticTemperatures in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      Whether the automaticTemperatures field is set.
    • getAutomaticTemperatures

      public boolean getAutomaticTemperatures()
       Automatically define the value for the temperatures as follows.
       First, a  reference temperature t is defined as
       w1 * c1 + w2 * c2 + ... + wK * cK
       where 0 < wJ <= 1 is the fraction of vehicles of cost class J and cJ is the
       average arc cost for the cost class J.
       The value of cJ is identified by randomly sampling N arc costs for the cost
       class J, where N is equal to the number of instance nodes.
       The initial and final temperatures are then defined as
       - initial_temperature: 0.1 * t
       - final_temperature: 0.001 * t
       
      optional bool automatic_temperatures = 4;
      Specified by:
      getAutomaticTemperatures in interface SimulatedAnnealingParametersOrBuilder
      Returns:
      The automaticTemperatures.
    • setAutomaticTemperatures

      public SimulatedAnnealingParameters.Builder setAutomaticTemperatures(boolean value)
       Automatically define the value for the temperatures as follows.
       First, a  reference temperature t is defined as
       w1 * c1 + w2 * c2 + ... + wK * cK
       where 0 < wJ <= 1 is the fraction of vehicles of cost class J and cJ is the
       average arc cost for the cost class J.
       The value of cJ is identified by randomly sampling N arc costs for the cost
       class J, where N is equal to the number of instance nodes.
       The initial and final temperatures are then defined as
       - initial_temperature: 0.1 * t
       - final_temperature: 0.001 * t
       
      optional bool automatic_temperatures = 4;
      Parameters:
      value - The automaticTemperatures to set.
      Returns:
      This builder for chaining.
    • clearAutomaticTemperatures

      public SimulatedAnnealingParameters.Builder clearAutomaticTemperatures()
       Automatically define the value for the temperatures as follows.
       First, a  reference temperature t is defined as
       w1 * c1 + w2 * c2 + ... + wK * cK
       where 0 < wJ <= 1 is the fraction of vehicles of cost class J and cJ is the
       average arc cost for the cost class J.
       The value of cJ is identified by randomly sampling N arc costs for the cost
       class J, where N is equal to the number of instance nodes.
       The initial and final temperatures are then defined as
       - initial_temperature: 0.1 * t
       - final_temperature: 0.001 * t
       
      optional bool automatic_temperatures = 4;
      Returns:
      This builder for chaining.