Class LqnPh
An entry becomes a Workflow whose leaves are its activities and, when
requested, its synchronous calls; the series-parallel reduction of that
workflow is then the exact law of the entry service time. Mirrors the MATLAB
lqn_entry_workflow, lqn_ph_serial_law and lqn_ph_moments.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classActivity graph of one entry, as a workflow plus its execution counts. -
Method Summary
Modifier and TypeMethodDescriptionstatic LqnPh.EntryWorkflowentryWorkflow(LayeredNetwork model, LayeredNetworkStruct lqn, int eidx, boolean withCalls) Activity graph of LQN entry EIDX as a workflow.static double[]First two moments of a phase-type law without building a Distribution object, which is what the layered fixed point needs at every iteration for every composed entry law.Composed law of a workflow in which the branches of an AND fork are SERIAL rather than concurrent, that is, the total work the branches request rather than the elapsed time until the last of them finishes.
-
Method Details
-
entryWorkflow
public static LqnPh.EntryWorkflow entryWorkflow(LayeredNetwork model, LayeredNetworkStruct lqn, int eidx, boolean withCalls) Activity graph of LQN entry EIDX as a workflow.The activity precedences are read from the task object rather than reconstructed from lqn.graph, whose loop back-edges carry probabilities and not counts.
- Parameters:
model- the layered network the struct was obtained fromlqn- the layered network structeidx- absolute index of the entrywithCalls- true to expand every synchronous call into a leaf of its own, placed in series after its activity; false to keep only the host demands, which is the processor-demand law- Returns:
- the workflow and its execution counts
-
serialLaw
Composed law of a workflow in which the branches of an AND fork are SERIAL rather than concurrent, that is, the total work the branches request rather than the elapsed time until the last of them finishes.This is the law of the PROCESSOR demand of an LQN entry. Two branches of an AND fork are two activity threads of the same task instance: they overlap in time, so the entry response time is the maximum of the branches, but they run on ONE processor, so the demand they place on it is the sum. Composing the host law with Workflow.toPH would charge the processor the maximum and let the layer report a utilization below the true one, which no amount of iterating recovers.
- Parameters:
wf- the workflow- Returns:
- the initial vector and subgenerator of the composed law
-
moments
First two moments of a phase-type law without building a Distribution object, which is what the layered fixed point needs at every iteration for every composed entry law. A defective ALPHA carries an atom at zero and contributes nothing to either moment.- Parameters:
alpha- initial vectorT- subgenerator- Returns:
- {mean, squared coefficient of variation}
-