Class DecisionVariable

java.lang.Object
jline.opt.variables.DecisionVariable
Direct Known Subclasses:
ClassPriority, ClassServiceMapping, JobPopulation, RoutingProbabilities, ServerAllocation, ServiceRate, StationReplicas

public abstract class DecisionVariable extends Object
Abstract base for line-opt decision variables. Mirrors native-Python line_solver.opt.variables.DecisionVariable: each variable encodes a tunable model parameter as continuous values in [0, 1] (see getBounds()), decodes them to the native domain (decode(double[])), and applies the decoded value to a per-evaluation model copy (apply(jline.lang.Network, java.lang.Object)). Decision variables hold references to the base model's objects; because models are deep-copied per evaluation, objects are re-resolved by name in the target model.
  • Field Details

    • name

      protected final String name
    • dimension

      protected int dimension
  • Constructor Details

    • DecisionVariable

      protected DecisionVariable(String name)
  • Method Details

    • getName

      public String getName()
    • getDimension

      public int getDimension()
    • getBounds

      public abstract double[][] getBounds()
      Bounds per encoded dimension, each {low, high}. Standard is {0,1}.
    • decode

      public abstract Object decode(double[] x)
      Decode the encoded slice (length getDimension()) to a value.
    • apply

      public abstract void apply(Network model, Object value)
      Apply a decoded value to a (copied) model.
    • getVariableType

      public abstract String getVariableType()
      Type identifier used by decomposition and the gradient dispatcher.
    • resolveClass

      protected static JobClass resolveClass(Network model, JobClass jobclass)
    • resolveNode

      protected static Node resolveNode(Network model, Node node)
    • connectionMatrix

      protected static Matrix connectionMatrix(Network model)
      Node-by-node binary connection (adjacency) matrix.
    • unitBounds

      protected static double[][] unitBounds(int dim)
    • indexOfNode

      protected static int indexOfNode(List<Node> nodes, String nameToFind)