Package jline.opt
Class LineEvaluator
java.lang.Object
jline.opt.LineEvaluator
Interface between the optimizer and LINE's SolverAUTO. Applies decision
variable values to a per-evaluation model copy, solves, and extracts per-
(station, class) and system metrics into an
EvaluationResult. Mirrors
native-Python line_solver.opt.evaluator.LineEvaluator.
Because a copied model carries a cached NetworkStruct that scalar setters
do not invalidate, evaluateValues(java.util.Map<java.lang.String, java.lang.Object>) forces refreshStruct after
applying variables so the solve reflects the mutated configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionLineEvaluator(LayeredNetwork lqnModel, List<DecisionVariable> variables, List<Pair<DecisionVariable, Object>> fixedVariables) LineEvaluator(Network model, List<DecisionVariable> variables, List<Pair<DecisionVariable, Object>> fixedVariables) -
Method Summary
Modifier and TypeMethodDescriptionDeep copy the base model (flat Network or LayeredNetwork).decodeVariables(double[] x) Decode the full vector to a name -> decoded-value map.evaluate(double[] x) evaluateLayeredSensitivities(Map<String, Object> values) Compute LQN per-layer service-rate partial sensitivities on demand.evaluateValues(Map<String, Object> values) evaluateValuesWithCache(Map<String, Object> values, Map<String, EvaluationResult> cache) evaluateWithCache(double[] x, Map<String, EvaluationResult> cache) double[][]Concatenated per-dimension bounds for the full optimization vector.intgetModel()intbooleanTrue if this evaluator drives a LayeredNetwork (LQN) model.static String
-
Constructor Details
-
LineEvaluator
public LineEvaluator(Network model, List<DecisionVariable> variables, List<Pair<DecisionVariable, Object>> fixedVariables) -
LineEvaluator
public LineEvaluator(LayeredNetwork lqnModel, List<DecisionVariable> variables, List<Pair<DecisionVariable, Object>> fixedVariables)
-
-
Method Details
-
getModel
-
isLayered
public boolean isLayered()True if this evaluator drives a LayeredNetwork (LQN) model. -
getVariables
-
getFixedVariables
-
getTotalDimension
public int getTotalDimension() -
getEvaluationCount
public int getEvaluationCount() -
getBounds
public double[][] getBounds()Concatenated per-dimension bounds for the full optimization vector. -
decodeVariables
Decode the full vector to a name -> decoded-value map. -
copyModel
Deep copy the base model (flat Network or LayeredNetwork). -
evaluate
-
evaluateValues
-
evaluateLayeredSensitivities
Compute LQN per-layer service-rate partial sensitivities on demand. Rebuilds the configured model copy, solves it with SolverLN, and reshapes SolverLN.getSensitivityTable into{station||jobclass: {metric: d/dRate}}. Called only by the partial-sensitivity gradient path, never on the hot evaluation loop. Returns null on any failure (the caller then finite-differences). -
valuesKey
-
evaluateValuesWithCache
public EvaluationResult evaluateValuesWithCache(Map<String, Object> values, Map<String, EvaluationResult> cache) -
evaluateWithCache
-