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.Descriptor
com.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.int
If 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.int
getVariables
(int index) The variables to be considered for the next decision.int
The 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.FieldAccessorTable
final boolean
mergeFrom
(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, 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<DecisionStrategyProto.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<DecisionStrategyProto.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<DecisionStrategyProto.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<DecisionStrategyProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getVariablesList
in 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:
getVariablesCount
in 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:
getVariables
in 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:
getExprsList
in 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:
getExprsCount
in 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:
getExprs
in 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:
getExprsOrBuilder
in 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:
getExprsOrBuilderList
in 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:
getVariableSelectionStrategyValue
in 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:
getVariableSelectionStrategy
in 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:
getDomainReductionStrategyValue
in 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:
getDomainReductionStrategy
in 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.
-