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 Summary
Modifier and TypeMethodDescriptionbuild()
clear()
Automatically define the value for the temperatures as follows.Determines the speed at which the temperature changes from initial to final.The final temperature.The initial temperature.boolean
Automatically define the value for the temperatures as follows.Determines the speed at which the temperature changes from initial to final.int
Determines the speed at which the temperature changes from initial to final.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
double
The final temperature.double
The initial temperature.boolean
Automatically define the value for the temperatures as follows.boolean
The final temperature.boolean
The initial temperature.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) setAutomaticTemperatures
(boolean value) Automatically define the value for the temperatures as follows.Determines the speed at which the temperature changes from initial to final.setCoolingScheduleStrategyValue
(int value) Determines the speed at which the temperature changes from initial to final.setFinalTemperature
(double value) The final temperature.setInitialTemperature
(double value) The initial temperature.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<SimulatedAnnealingParameters.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SimulatedAnnealingParameters.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.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 interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.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 interfaceSimulatedAnnealingParametersOrBuilder
- Returns:
- The enum numeric value on the wire for coolingScheduleStrategy.
-
setCoolingScheduleStrategyValue
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
Determines the speed at which the temperature changes from initial to final.
.operations_research.CoolingScheduleStrategy.Value cooling_schedule_strategy = 1;
- Specified by:
getCoolingScheduleStrategy
in interfaceSimulatedAnnealingParametersOrBuilder
- 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
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 interfaceSimulatedAnnealingParametersOrBuilder
- 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 interfaceSimulatedAnnealingParametersOrBuilder
- Returns:
- The initialTemperature.
-
setInitialTemperature
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
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 interfaceSimulatedAnnealingParametersOrBuilder
- 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 interfaceSimulatedAnnealingParametersOrBuilder
- Returns:
- The finalTemperature.
-
setFinalTemperature
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
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 interfaceSimulatedAnnealingParametersOrBuilder
- 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 interfaceSimulatedAnnealingParametersOrBuilder
- Returns:
- The automaticTemperatures.
-
setAutomaticTemperatures
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
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.
-