Package jline.solvers.ldes.handlers
Class SamplePathRecorder
java.lang.Object
jline.solvers.ldes.handlers.SamplePathRecorder
Row store of an LDES sample path.
Row k follows the SolverSSA convention: t[k] is the epoch
of the events tagged with step k, and the state rows of step
k are the state OCCUPIED UNTIL t[k] (the left limit), so
sum_k state[k] * (t[k] - t[k-1]), with t[-1] = 0, is the
time integral of the state over [0, t[last]].
Detailed rows are variable-width (a FCFS buffer grows and shrinks); they
are left-padded with zeros to the widest row of their node on export, which
is where SolverSSA pads too and what State.toMarginal expects of a
right-aligned FCFS buffer.
-
Constructor Summary
ConstructorsConstructorDescriptionSamplePathRecorder(int limit, int[] statefulNodes, int numClasses, String[] detailRefusal) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends one row.aggr(int isf) Per-class job counts of stateful nodeisf, one row per step.voidCounts a service or interarrival phase script that could not be bound to a job.detailRefusal(int isf) Null when nodeisfcarries detailed rows, else the reason it does not.events()Events, one per row:[step, t, type, node, class, jobId, phase].booleanisFull()True oncelimitrows have been recorded.intnextStep()Index the next row will get.intNumber of stateful nodes.intsize()Rows recorded so far.state(int isf) Detailed rows of stateful nodeisf, left-padded with zeros; null if refused.intstatefulNode(int isf) Node index (0-based) of stateful nodeisf.times()Row epochs as a column vector.int
-
Constructor Details
-
SamplePathRecorder
- Parameters:
limit- rows to record (N of--sample-path N)statefulNodes- node index of each stateful node, in stateful ordernumClasses- number of job classesdetailRefusal- per stateful node, null or the reason detailed rows are refused
-
-
Method Details
-
isFull
public boolean isFull()True oncelimitrows have been recorded. -
size
public int size()Rows recorded so far. -
nextStep
public int nextStep()Index the next row will get. -
numStateful
public int numStateful()Number of stateful nodes. -
detailRefusal
Null when nodeisfcarries detailed rows, else the reason it does not. -
addRow
Appends one row.- Parameters:
time- epoch of the rowstate- per stateful node, its detailed row (ignored where refused)aggr- per stateful node, its per-class job countsevs- events of this step, each[type, node, class, jobId, phase]
-
countUnboundScript
public void countUnboundScript()Counts a service or interarrival phase script that could not be bound to a job. -
unboundScripts
public int unboundScripts() -
times
Row epochs as a column vector. -
events
Events, one per row:[step, t, type, node, class, jobId, phase]. -
state
Detailed rows of stateful nodeisf, left-padded with zeros; null if refused. -
aggr
Per-class job counts of stateful nodeisf, one row per step. -
statefulNode
public int statefulNode(int isf) Node index (0-based) of stateful nodeisf.
-