Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class AllocationSpec
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.AllocationSpec
- Record Components:
lo- the lower bound of the per-row allocation variable; must be finite and ≤hihi- the upper bound of the per-row allocation variable; must be finite and ≥locolumnName- the name to give the new allocation column in the output schema; must not be blank
Specifies the continuous LP (linear-programming) allocation mode for the
OPTIMIZE ALLOCATE operator.
Each candidate row is assigned a continuous decision variable in the closed
interval [lo, hi]. The solver chooses a value for each row that
optimises the objective while satisfying the constraints; the chosen value is
emitted in a new output column named columnName (output schema =
input schema + 1 column).
Contrast with the default binary MIP mode, where each row's variable is
{0, 1} (in or out) and the output schema is unchanged (chosen rows
are emitted verbatim).
-
Constructor Summary
ConstructorsConstructorDescriptionAllocationSpec(double lo, double hi, String columnName) Creates an instance of aAllocationSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecolumnNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublehi()Returns the value of thehirecord component.doublelo()Returns the value of thelorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AllocationSpec
Creates an instance of aAllocationSpecrecord class.- Parameters:
lo- the value for thelorecord componenthi- the value for thehirecord componentcolumnName- the value for thecolumnNamerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
lo
public double lo()Returns the value of thelorecord component.- Returns:
- the value of the
lorecord component
-
hi
public double hi()Returns the value of thehirecord component.- Returns:
- the value of the
hirecord component
-
columnName
Returns the value of thecolumnNamerecord component.- Returns:
- the value of the
columnNamerecord component
-