java.lang.Object
java.lang.Record
com.darkcollective.relix.processor.eval.AllocationRow
Record Components:
row - the original input row; never null
allocation - the solver-assigned allocation value for this row

public record AllocationRow(Row row, double allocation) extends Record
A candidate row paired with its continuous LP allocation value, as returned by SubsetOptimizer.allocate(com.darkcollective.relix.ast.ObjectiveSense, com.darkcollective.relix.ast.Operand, java.util.List<com.darkcollective.relix.ast.OptimizeConstraint>, double, double, java.util.List<com.darkcollective.relix.processor.Row>, java.lang.String). The allocation is the solver's chosen value for this row's decision variable, in the [lo, hi] range specified by the OPTIMIZE ALLOCATE operator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AllocationRow(Row row, double allocation)
    Creates an instance of a AllocationRow record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the allocation record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    row()
    Returns the value of the row record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AllocationRow

      public AllocationRow(Row row, double allocation)
      Creates an instance of a AllocationRow record class.
      Parameters:
      row - the value for the row record component
      allocation - the value for the allocation record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • row

      public Row row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • allocation

      public double allocation()
      Returns the value of the allocation record component.
      Returns:
      the value of the allocation record component