Class DecisionStrategyProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<DecisionStrategyProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
com.google.ortools.sat.DecisionStrategyProto.Builder
- All Implemented Interfaces:
DecisionStrategyProtoOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
DecisionStrategyProto
public static final class DecisionStrategyProto.Builder
extends com.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
implements DecisionStrategyProtoOrBuilder
Define the strategy to follow when the solver needs to take a new decision. Note that this strategy is only defined on a subset of variables.Protobuf type
operations_research.sat.DecisionStrategyProto-
Method Summary
Modifier and TypeMethodDescriptionaddAllExprs(Iterable<? extends LinearExpressionProto> values) If this is set, then the variables field must be empty.addAllVariables(Iterable<? extends Integer> values) The variables to be considered for the next decision.addExprs(int index, LinearExpressionProto value) If this is set, then the variables field must be empty.addExprs(int index, LinearExpressionProto.Builder builderForValue) If this is set, then the variables field must be empty.addExprs(LinearExpressionProto value) If this is set, then the variables field must be empty.addExprs(LinearExpressionProto.Builder builderForValue) If this is set, then the variables field must be empty.If this is set, then the variables field must be empty.addExprsBuilder(int index) If this is set, then the variables field must be empty.addVariables(int value) The variables to be considered for the next decision.build()clear().operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;If this is set, then the variables field must be empty.The variables to be considered for the next decision..operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptor.operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;int.operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;getExprs(int index) If this is set, then the variables field must be empty.getExprsBuilder(int index) If this is set, then the variables field must be empty.If this is set, then the variables field must be empty.intIf this is set, then the variables field must be empty.If this is set, then the variables field must be empty.getExprsOrBuilder(int index) If this is set, then the variables field must be empty.List<? extends LinearExpressionProtoOrBuilder> If this is set, then the variables field must be empty.intgetVariables(int index) The variables to be considered for the next decision.intThe variables to be considered for the next decision..operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;int.operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;The variables to be considered for the next decision.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(DecisionStrategyProto other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeExprs(int index) If this is set, then the variables field must be empty..operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;setDomainReductionStrategyValue(int value) .operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;setExprs(int index, LinearExpressionProto value) If this is set, then the variables field must be empty.setExprs(int index, LinearExpressionProto.Builder builderForValue) If this is set, then the variables field must be empty.setVariables(int index, int value) The variables to be considered for the next decision..operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;setVariableSelectionStrategyValue(int value) .operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DecisionStrategyProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<DecisionStrategyProto.Builder>
-
mergeFrom
public DecisionStrategyProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DecisionStrategyProto.Builder>- Throws:
IOException
-
getVariablesList
The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Specified by:
getVariablesListin interfaceDecisionStrategyProtoOrBuilder- Returns:
- A list containing the variables.
-
getVariablesCount
public int getVariablesCount()The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Specified by:
getVariablesCountin interfaceDecisionStrategyProtoOrBuilder- Returns:
- The count of variables.
-
getVariables
public int getVariables(int index) The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Specified by:
getVariablesin interfaceDecisionStrategyProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The variables at the given index.
-
setVariables
The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Parameters:
index- The index to set the value at.value- The variables to set.- Returns:
- This builder for chaining.
-
addVariables
The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Parameters:
value- The variables to add.- Returns:
- This builder for chaining.
-
addAllVariables
The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Parameters:
values- The variables to add.- Returns:
- This builder for chaining.
-
clearVariables
The variables to be considered for the next decision. The order matter and is always used as a tie-breaker after the variable selection strategy criteria defined below.
repeated int32 variables = 1;- Returns:
- This builder for chaining.
-
getExprsList
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5;- Specified by:
getExprsListin interfaceDecisionStrategyProtoOrBuilder
-
getExprsCount
public int getExprsCount()If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5;- Specified by:
getExprsCountin interfaceDecisionStrategyProtoOrBuilder
-
getExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5;- Specified by:
getExprsin interfaceDecisionStrategyProtoOrBuilder
-
setExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
setExprs
public DecisionStrategyProto.Builder setExprs(int index, LinearExpressionProto.Builder builderForValue) If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addExprs
public DecisionStrategyProto.Builder addExprs(int index, LinearExpressionProto.Builder builderForValue) If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addAllExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
clearExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
removeExprs
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
getExprsBuilder
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
getExprsOrBuilder
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5;- Specified by:
getExprsOrBuilderin interfaceDecisionStrategyProtoOrBuilder
-
getExprsOrBuilderList
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5;- Specified by:
getExprsOrBuilderListin interfaceDecisionStrategyProtoOrBuilder
-
addExprsBuilder
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
addExprsBuilder
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
getExprsBuilderList
If this is set, then the variables field must be empty. We currently only support affine expression. Note that this is needed so that if a variable has an affine representative, we can properly transform a DecisionStrategyProto through presolve.
repeated .operations_research.sat.LinearExpressionProto exprs = 5; -
getVariableSelectionStrategyValue
public int getVariableSelectionStrategyValue().operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;- Specified by:
getVariableSelectionStrategyValuein interfaceDecisionStrategyProtoOrBuilder- Returns:
- The enum numeric value on the wire for variableSelectionStrategy.
-
setVariableSelectionStrategyValue
.operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;- Parameters:
value- The enum numeric value on the wire for variableSelectionStrategy to set.- Returns:
- This builder for chaining.
-
getVariableSelectionStrategy
.operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;- Specified by:
getVariableSelectionStrategyin interfaceDecisionStrategyProtoOrBuilder- Returns:
- The variableSelectionStrategy.
-
setVariableSelectionStrategy
public DecisionStrategyProto.Builder setVariableSelectionStrategy(DecisionStrategyProto.VariableSelectionStrategy value) .operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;- Parameters:
value- The variableSelectionStrategy to set.- Returns:
- This builder for chaining.
-
clearVariableSelectionStrategy
.operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;- Returns:
- This builder for chaining.
-
getDomainReductionStrategyValue
public int getDomainReductionStrategyValue().operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;- Specified by:
getDomainReductionStrategyValuein interfaceDecisionStrategyProtoOrBuilder- Returns:
- The enum numeric value on the wire for domainReductionStrategy.
-
setDomainReductionStrategyValue
.operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;- Parameters:
value- The enum numeric value on the wire for domainReductionStrategy to set.- Returns:
- This builder for chaining.
-
getDomainReductionStrategy
.operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;- Specified by:
getDomainReductionStrategyin interfaceDecisionStrategyProtoOrBuilder- Returns:
- The domainReductionStrategy.
-
setDomainReductionStrategy
public DecisionStrategyProto.Builder setDomainReductionStrategy(DecisionStrategyProto.DomainReductionStrategy value) .operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;- Parameters:
value- The domainReductionStrategy to set.- Returns:
- This builder for chaining.
-
clearDomainReductionStrategy
.operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;- Returns:
- This builder for chaining.
-