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 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<DecisionStrategyProto.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<DecisionStrategyProto.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<DecisionStrategyProto.Builder>
    • getDefaultInstanceForType

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

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

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

      public DecisionStrategyProto.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<DecisionStrategyProto.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<DecisionStrategyProto.Builder>
    • mergeFrom

      public DecisionStrategyProto.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<DecisionStrategyProto.Builder>
      Throws:
      IOException
    • getVariablesList

      public List<Integer> 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 interface DecisionStrategyProtoOrBuilder
      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 interface DecisionStrategyProtoOrBuilder
      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 interface DecisionStrategyProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The variables at the given index.
    • setVariables

      public DecisionStrategyProto.Builder setVariables(int index, int value)
       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

      public DecisionStrategyProto.Builder addVariables(int value)
       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

      public DecisionStrategyProto.Builder addAllVariables(Iterable<? extends Integer> values)
       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

      public DecisionStrategyProto.Builder 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

      public List<LinearExpressionProto> 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 interface DecisionStrategyProtoOrBuilder
    • 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 interface DecisionStrategyProtoOrBuilder
    • getExprs

      public LinearExpressionProto getExprs(int index)
       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 interface DecisionStrategyProtoOrBuilder
    • setExprs

      public DecisionStrategyProto.Builder setExprs(int index, LinearExpressionProto value)
       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

      public DecisionStrategyProto.Builder addExprs(int index, LinearExpressionProto value)
       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

      public DecisionStrategyProto.Builder addAllExprs(Iterable<? extends LinearExpressionProto> values)
       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

      public DecisionStrategyProto.Builder 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

      public DecisionStrategyProto.Builder removeExprs(int index)
       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

      public LinearExpressionProto.Builder getExprsBuilder(int index)
       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

      public LinearExpressionProtoOrBuilder getExprsOrBuilder(int index)
       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 interface DecisionStrategyProtoOrBuilder
    • getExprsOrBuilderList

      public List<? extends LinearExpressionProtoOrBuilder> 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 interface DecisionStrategyProtoOrBuilder
    • addExprsBuilder

      public LinearExpressionProto.Builder 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

      public LinearExpressionProto.Builder addExprsBuilder(int index)
       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

      public List<LinearExpressionProto.Builder> 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 interface DecisionStrategyProtoOrBuilder
      Returns:
      The enum numeric value on the wire for variableSelectionStrategy.
    • setVariableSelectionStrategyValue

      public DecisionStrategyProto.Builder setVariableSelectionStrategyValue(int value)
      .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

      public DecisionStrategyProto.VariableSelectionStrategy getVariableSelectionStrategy()
      .operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;
      Specified by:
      getVariableSelectionStrategy in interface DecisionStrategyProtoOrBuilder
      Returns:
      The variableSelectionStrategy.
    • setVariableSelectionStrategy

      .operations_research.sat.DecisionStrategyProto.VariableSelectionStrategy variable_selection_strategy = 2;
      Parameters:
      value - The variableSelectionStrategy to set.
      Returns:
      This builder for chaining.
    • clearVariableSelectionStrategy

      public DecisionStrategyProto.Builder 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 interface DecisionStrategyProtoOrBuilder
      Returns:
      The enum numeric value on the wire for domainReductionStrategy.
    • setDomainReductionStrategyValue

      public DecisionStrategyProto.Builder setDomainReductionStrategyValue(int value)
      .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

      public DecisionStrategyProto.DomainReductionStrategy getDomainReductionStrategy()
      .operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;
      Specified by:
      getDomainReductionStrategy in interface DecisionStrategyProtoOrBuilder
      Returns:
      The domainReductionStrategy.
    • setDomainReductionStrategy

      .operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;
      Parameters:
      value - The domainReductionStrategy to set.
      Returns:
      This builder for chaining.
    • clearDomainReductionStrategy

      public DecisionStrategyProto.Builder clearDomainReductionStrategy()
      .operations_research.sat.DecisionStrategyProto.DomainReductionStrategy domain_reduction_strategy = 3;
      Returns:
      This builder for chaining.