Package jline.opt.variables
Class HostDemand
java.lang.Object
jline.opt.variables.DecisionVariable
jline.opt.variables.LqnDecisionVariable
jline.opt.variables.HostDemand
Optimize the mean host demand of an LQN Activity (continuous). The host demand
D is the mean service requirement the activity places on its processor; the
processor-layer service rate is mu = 1/D. This is the primary LQN tuning knob
(analogous to
ServiceRate for a flat station). It exposes the hooks
the partial-sensitivity gradient path needs (sensKeys(jline.lang.layered.LayeredNetwork),
sensMetricTargets(jline.lang.layered.LayeredNetwork), rateJacobian(double), decodeJacobian(double[])).
Mirrors native-Python HostDemand.-
Field Summary
Fields inherited from class jline.opt.variables.DecisionVariable
dimension, name -
Constructor Summary
ConstructorsConstructorDescriptionHostDemand(String activityName, double minDemand, double maxDemand) HostDemand(String activityName, double minDemand, double maxDemand, String name) HostDemand(Activity activity, double minDemand, double maxDemand) HostDemand(Activity activity, double minDemand, double maxDemand, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLqn(LayeredNetwork model, Object value) Apply a decoded value to a (copied) LayeredNetwork model.currentValue(Object model) The variable's current (decoded) value in the given model, or null.decode(double[] x) Decode the encoded slice (lengthDecisionVariable.getDimension()) to a value.doubledecodeJacobian(double[] x) d(decoded demand)/d(encoded x): constant slope of the linear map.double[][]Bounds per encoded dimension, each {low, high}.LQN layer name(s) this variable perturbs, or null for flat-network variables.Type identifier used by decomposition and the gradient dispatcher.doublerateJacobian(double value) d(service rate)/d(demand) = d(1/D)/dD = -1/D^2 at demand D=value.sensKey(LayeredNetwork model) Row keystation||jobclassin the per-layer sensitivity table, in the 'srvn.cs' spelling (sensKeys(jline.lang.layered.LayeredNetwork)is what the caller reads).sensKeys(LayeredNetwork model) Candidate row keys of this variable, most specific first.sensMetricTargets(LayeredNetwork model) Map each layer-row metric to the EvaluationResult key it approximates.Methods inherited from class jline.opt.variables.LqnDecisionVariable
applyMethods inherited from class jline.opt.variables.DecisionVariable
connectionMatrix, getDimension, getName, indexOfNode, resolveClass, resolveNode, unitBounds
-
Constructor Details
-
HostDemand
-
HostDemand
-
HostDemand
-
HostDemand
-
-
Method Details
-
getActivity
-
getBounds
public double[][] getBounds()Description copied from class:DecisionVariableBounds per encoded dimension, each {low, high}. Standard is {0,1}.- Specified by:
getBoundsin classDecisionVariable
-
decode
Description copied from class:DecisionVariableDecode the encoded slice (lengthDecisionVariable.getDimension()) to a value.- Specified by:
decodein classDecisionVariable
-
applyLqn
Description copied from class:LqnDecisionVariableApply a decoded value to a (copied) LayeredNetwork model.- Specified by:
applyLqnin classLqnDecisionVariable
-
getVariableType
Description copied from class:DecisionVariableType identifier used by decomposition and the gradient dispatcher.- Specified by:
getVariableTypein classDecisionVariable
-
getLayer
Description copied from class:DecisionVariableLQN layer name(s) this variable perturbs, or null for flat-network variables. Used by layer freezing (both explicitfrozen_layersand adaptiveauto_freeze): a variable whose layer set intersects the frozen set is held fixed. The model argument is the LayeredNetwork the variable is applied to. LQN variable subclasses override this.- Overrides:
getLayerin classDecisionVariable
-
currentValue
Description copied from class:DecisionVariableThe variable's current (decoded) value in the given model, or null. Used by layer freezing to hold a variable at the model's existing parameter value. Flat and non-introspectable variables return null. LQN variable subclasses override this.- Overrides:
currentValuein classDecisionVariable
-
sensKey
Row keystation||jobclassin the per-layer sensitivity table, in the 'srvn.cs' spelling (sensKeys(jline.lang.layered.LayeredNetwork)is what the caller reads). The host-layer rows are (Layer=processor, Station=processor, JobClass=activity); the sensitivity value is d(metric)/d(service rate). Returns null if the activity is not deployed on a processor. -
sensKeys
Candidate row keys of this variable, most specific first. The LN method decides how a host layer names its classes: 'srvn.cs' after the ACTIVITY, 'srvn.ph' (what the 'srvn' default resolves to on every model that admits it) collapses each caller into ONE phase-type class named after the TASK. Both spellings are returned so the gradient reads the table the solver actually produced. The task row is coarser (one row for every activity of the task), a further bias that 'fd'/'partial_plus_fd' correct. Mirrors native-PythonHostDemand.sensKeysand C++sensitivity_keys. Empty if the activity is not deployed on a processor. -
sensMetricTargets
Map each layer-row metric to the EvaluationResult key it approximates. The host-layer row's utilization tracks the processor node's utilization; its throughput/queue-length/response-time track the activity node's. Util is keyed by node name, the others bynode||node. -
rateJacobian
public double rateJacobian(double value) d(service rate)/d(demand) = d(1/D)/dD = -1/D^2 at demand D=value. -
decodeJacobian
public double decodeJacobian(double[] x) d(decoded demand)/d(encoded x): constant slope of the linear map.
-