Interface CpObjectiveProtoOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
CpObjectiveProto, CpObjectiveProto.Builder

public interface CpObjectiveProtoOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    getCoeffs(int index)
    repeated int64 coeffs = 4;
    int
    repeated int64 coeffs = 4;
    repeated int64 coeffs = 4;
    long
    getDomain(int index)
    If non-empty, only look for an objective value in the given domain.
    int
    If non-empty, only look for an objective value in the given domain.
    If non-empty, only look for an objective value in the given domain.
    long
    Internal field.
    long
    int64 integer_scaling_factor = 8;
    double
    The displayed objective is always: scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset).
    double
    double scaling_factor = 3;
    boolean
    Internal field.
    int
    getVars(int index)
    The linear terms of the objective to minimize.
    int
    The linear terms of the objective to minimize.
    The linear terms of the objective to minimize.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getVarsList

      List<Integer> getVarsList()
       The linear terms of the objective to minimize.
       For a maximization problem, one can negate all coefficients in the
       objective and set scaling_factor to -1.
       
      repeated int32 vars = 1;
      Returns:
      A list containing the vars.
    • getVarsCount

      int getVarsCount()
       The linear terms of the objective to minimize.
       For a maximization problem, one can negate all coefficients in the
       objective and set scaling_factor to -1.
       
      repeated int32 vars = 1;
      Returns:
      The count of vars.
    • getVars

      int getVars(int index)
       The linear terms of the objective to minimize.
       For a maximization problem, one can negate all coefficients in the
       objective and set scaling_factor to -1.
       
      repeated int32 vars = 1;
      Parameters:
      index - The index of the element to return.
      Returns:
      The vars at the given index.
    • getCoeffsList

      List<Long> getCoeffsList()
      repeated int64 coeffs = 4;
      Returns:
      A list containing the coeffs.
    • getCoeffsCount

      int getCoeffsCount()
      repeated int64 coeffs = 4;
      Returns:
      The count of coeffs.
    • getCoeffs

      long getCoeffs(int index)
      repeated int64 coeffs = 4;
      Parameters:
      index - The index of the element to return.
      Returns:
      The coeffs at the given index.
    • getOffset

      double getOffset()
       The displayed objective is always:
         scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset).
       This is needed to have a consistent objective after presolve or when
       scaling a double problem to express it with integers.
       Note that if scaling_factor is zero, then it is assumed to be 1, so that by
       default these fields have no effect.
       
      double offset = 2;
      Returns:
      The offset.
    • getScalingFactor

      double getScalingFactor()
      double scaling_factor = 3;
      Returns:
      The scalingFactor.
    • getDomainList

      List<Long> getDomainList()
       If non-empty, only look for an objective value in the given domain.
       Note that this does not depend on the offset or scaling factor, it is a
       domain on the sum of the objective terms only.
       
      repeated int64 domain = 5;
      Returns:
      A list containing the domain.
    • getDomainCount

      int getDomainCount()
       If non-empty, only look for an objective value in the given domain.
       Note that this does not depend on the offset or scaling factor, it is a
       domain on the sum of the objective terms only.
       
      repeated int64 domain = 5;
      Returns:
      The count of domain.
    • getDomain

      long getDomain(int index)
       If non-empty, only look for an objective value in the given domain.
       Note that this does not depend on the offset or scaling factor, it is a
       domain on the sum of the objective terms only.
       
      repeated int64 domain = 5;
      Parameters:
      index - The index of the element to return.
      Returns:
      The domain at the given index.
    • getScalingWasExact

      boolean getScalingWasExact()
       Internal field. Do not set. When we scale a FloatObjectiveProto to a
       integer version, we set this to true if the scaling was exact (i.e. all
       original coeff were integer for instance).
       TODO(user): Put the error bounds we computed instead?
       
      bool scaling_was_exact = 6;
      Returns:
      The scalingWasExact.
    • getIntegerOffset

      long getIntegerOffset()
       Internal field. This is only useful for inner_objective_lower_bound, It
       should never be set in most cases, so we have the simple:
         sum(coefficients[i] * objective_vars[i]) >= inner_objective_lower_bound.
       This is similar to offset/scaling_factor but allows to stay in the integer
       domain. Note that the formula is not the same than for the floating point
       objective. If this is set, we have
          linear_expression * scaling + offset >= inner_objective_lower_bound
       
      int64 integer_offset = 7;
      Returns:
      The integerOffset.
    • getIntegerScalingFactor

      long getIntegerScalingFactor()
      int64 integer_scaling_factor = 8;
      Returns:
      The integerScalingFactor.