Class SolverLDES
- Direct Known Subclasses:
LDES
-
Nested Class Summary
Nested classes/interfaces inherited from class jline.solvers.NetworkSolver
NetworkSolver.SolverConfiguratorNested classes/interfaces inherited from class jline.solvers.Solver
Solver.ResolvedVerdict -
Field Summary
FieldsModifier and TypeFieldDescriptionThread pool for parallel replication executionFields inherited from class jline.solvers.NetworkSolver
avgHandles, lastPerctMethod, lastPermEngine, model, sn, tranHandles -
Constructor Summary
ConstructorsConstructorDescriptionSolverLDES(String filename) Load a JMT model file (.jsimg/.jsim/.jsimw/.jmva) and simulate with LDES.SolverLDES(String filename, Object... args) Load a JMT model file (.jsimg/.jsim/.jsimw/.jmva) and simulate with LDES, accepting variable option arguments (e.g., "seed", 23000, "samples", 50000).SolverLDES(LayeredNetwork model) Constructs a SolverLDES with the given LayeredNetwork model using default options.SolverLDES(LayeredNetwork model, Object... args) Constructs a SolverLDES with the given LayeredNetwork model and variable arguments.SolverLDES(LayeredNetwork model, SolverOptions options) Constructs a SolverLDES with the given LayeredNetwork model and options.SolverLDES(Network model) Constructs a SolverLDES with the given model using default options.SolverLDES(Network model, Object... args) Constructs a SolverLDES with the given model and variable arguments.SolverLDES(Network model, String method) Constructs a SolverLDES with the given model and method.SolverLDES(Network model, NetworkSolver initSolver, Object... args) Constructs a SolverLDES that warm-starts the simulation from the steady-state distribution computed by another solver.SolverLDES(Network model, SolverOptions options) Constructs a SolverLDES with the given model and options. -
Method Summary
Modifier and TypeMethodDescriptionClosed-chain population conservation check on a steady-state QN, ported from MATLAB's parseSteady.static SolverOptionsReturns the default solver options for the LDES solver.getAvg()Computes and returns average station metrics at steady-state.doublegetAvgBusyPeriod(int[] stations, int jobClass, int order) Mean busy period of order n for a set of stations, measured along the simulated sample path.Cache performance table for a layered cache-queueing (LCQ) model: one row per CacheTask read (ItemEntry), reporting hit / delayed-hit / miss probabilities and rates.Steady-state expected reward for every reward function defined on the model.doublegetAvgReward(String rewardName) Steady-state expected reward for a single named reward function.Returns a table of average station metrics organized by job classes.Empirical response time CDF, measured on the simulated sample path.Empirical response time CDF, handle form.Empirical response time distribution of every entry of a LayeredNetwork, measured on the simulated sample path.static FeatureSetReturns the feature set supported by the LDES solver.The jobs present at the end of the run, in the layout ofinitFromJobs(Matrix), so passing the result back restarts each job with its residual service work.One row[id, station, class, time]per departure of a taggedinitFromJobs(Matrix)job from the station it was placed at.Rate at which each call is dispatched, counted at the caller.Per-call occupancy of the called task's thread pool, in job units.Occupancy contributed by each entry's own request stream, in job units.Returns average metrics for a LayeredNetwork model as a table.Mean think time of every LQN element, at task indices and zero elsewhere.static FeatureSetReturns the feature set supported by the LDES solver for LayeredNetwork models.Returns the LayeredNetwork model (if solving an LQN).Returns the LayeredNetworkStruct (if solving an LQN).intReturns the number of threads for parallel execution.Response time percentiles with the default levels 10, 25, 50, 75, 90, 95 and 99.getPerctRespT(double[] percentiles) Steady-state response time percentiles measured on the simulated sample path, each with a confidence interval.getPerctRespT(double[] percentiles, String method) Percentiles by a named method.Estimates state probability using node index.getProb(StatefulNode node) Estimates state probability using current network state.getProb(StatefulNode node, Matrix state) Steady-state probability of a state at a node, read from the engine's exact joint-state residence-time histogram as the referencegetProb.m.getProbAggr(int nodeIndex, Matrix stateAggr) Estimates aggregated state probability using node index.getProbAggr(StatefulNode node) Estimates aggregated state probability using current network state.getProbAggr(StatefulNode node, Matrix stateAggr) Steady-state probability of a per-class job distribution at a node, read from the engine's exact residence-time histogram as the referencegetProbAggr.m.Joint steady-state probability of the model's current state over every station, read from the engine's exact residence-time histogram as the referencegetProbSys.m.Joint steady-state probability of the model's current aggregated state; the histogram is already per-class, so this isgetProbSys(), as in the reference.Names of the reward functions defined on the model.Time vector associated withgetTranReward().Matrix[]Runs the simulation with state-histogram export enabled and returns the exact joint-state residence-time histogram.Matrix[]Runs the simulation with state export enabled and returns the integer joint-state trajectory along the sampled path:{space, time}where rowiof space is the aggregated state (CTMCstateSpaceAggrlayout) attime[i].Returns the current streaming collector, or null if not streaming.Returns the network structure for this solver.Returns the thread pool for parallel replication execution.voidPerforms a transient analysis of the model using discrete event simulation.Returns cumulative distribution functions of passage times during transient analysis.Returns cumulative distribution functions of passage times during transient analysis.Returns cumulative distribution functions of response times during transient analysis.Returns cumulative distribution functions of response times during transient analysis.getTranProb(StatefulNode node) Computes transient state probabilities at a specific node over time using LDES simulation.getTranProbAggr(StatefulNode node) Computes transient aggregated state probabilities at a specific node over time.Computes transient system-wide state probabilities over time using LDES simulation.Computes transient system-wide aggregated state probabilities over time.Transient reward trajectory for all reward functions.getTranReward(String rewardName) Single-run transient reward trajectory r(X(t)) recorded along the simulated path.initFromJobs(Matrix jobs) Start the simulation from a job-level initial state.initFromSolver(NetworkSolver initSolver) Warm-start the simulation from the steady-state solution of an auxiliary solver.booleanisStochasticMethod(String method) LDES is a discrete-event simulator; all methods are stochastic.Returns the list of valid solution methods for LDES.listValidMethods(Network model) Returns the list of valid solution methods for LDES.voidExecutes the solver algorithm to analyze the model.Run the LDES analyzer with current options including init_sol.sample(StatefulNode node, int numEvents) Exact sample path of one node: one row per step, holding the LINE State of the node OCCUPIED UNTILt[k], with the events of the node tagged att[k], as in SolverSSA.sampleAggr(StatefulNode node, int numEvents) Exact sample path of one node as per-class job counts (always available, also where the detailed rows are refused).sampleSys(int numEvents) Exact system sample path: one LINE State matrix per stateful node, all sharing the step times, and every event of the run.sampleSysAggr(int numEvents) Exact system sample path as per-class job counts per stateful node.voidsetNumThreads(int numThreads) Sets the parallelism level for replication execution.stream(StatefulNode node, int numEvents, StreamingOptions streamingOptions) Generates a sample path with streaming metrics pushed via OTLP.stream(StatefulNode node, StreamingOptions streamingOptions) Generates a sample path with streaming metrics pushed via OTLP.streamAggr(StatefulNode node, int numEvents, StreamingOptions streamingOptions) Generates an aggregated sample path with streaming metrics pushed via OTLP.streamAggr(StatefulNode node, StreamingOptions streamingOptions) Generates an aggregated sample path with streaming metrics pushed via OTLP.booleansupports(LayeredNetwork model) Checks if the solver supports the given LayeredNetwork model.booleanChecks if this solver supports the given network model.booleanDoes this solver produce transient averages, i.e.Methods inherited from class jline.solvers.NetworkSolver
aCaT, aCT, aCT, aCT, aCT, aCT, aCT, aFJT, aIT, aLT, aNCT, aNCT, aNCT, aNCT, aNCT, aNCT, aNT, aNT, aNT, aNT, aNT, aNT, aOT, applyCacheResults, aRLT, aST, aST, aST, aT, aT, aT, aT, aT, aT, avg, avg, avg, avgArvR, avgArvRChain, avgArvRHandles, avgChain, avgChainT, avgChainT, avgChainT, avgChainT, avgChainT, avgChainT, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgChainTable, avgHandles, avgNode, avgNodeArvRChain, avgNodeChain, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainT, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeChainTable, avgNodeQLenChain, avgNodeResidTChain, avgNodeRespTChain, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeT, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTable, avgNodeTputChain, avgNodeUtilChain, avgQLen, avgQLenChain, avgQLenHandles, avgResidT, avgResidTChain, avgResidTHandles, avgRespT, avgRespTChain, avgRespTHandles, avgSys, avgSysRespT, avgSysT, avgSysT, avgSysT, avgSysTable, avgSysTable, avgSysTable, avgSysTput, avgT, avgT, avgT, avgT, avgT, avgT, avgTable, avgTable, avgTable, avgTable, avgTable, avgTable, avgTput, avgTputChain, avgTputHandles, avgUtil, avgUtilChain, avgUtilHandles, avgWaitT, bindingCapacityReason, cacheAvgT, cdfPassT, cdfPassT, cdfRespT, cdfRespT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, chainAvgT, checkDeclaredMethod, citations, declaredAllMethods, declaredAllMethods, declaredValidMethods, declaredValidMethods, fjAvgT, getAllSolvers, getAvg, getAvg, getAvgArvR, getAvgArvRChain, getAvgArvRHandles, getAvgCacheT, getAvgCacheTableImpl, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTableImpl, getAvgChainTableImpl, getAvgFJ, getAvgFJT, getAvgFJTable, getAvgFJTableImpl, getAvgHandles, getAvgItemT, getAvgItemTable, getAvgItemTableImpl, getAvgLossT, getAvgLossTable, getAvgNode, getAvgNodeArvRChain, getAvgNodeChain, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTable, getAvgNodeChainTableImpl, getAvgNodeChainTableImpl, getAvgNodeQLenChain, getAvgNodeResidTChain, getAvgNodeRespTChain, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTable, getAvgNodeTableImpl, getAvgNodeTableImpl, getAvgNodeTputChain, getAvgNodeUtilChain, getAvgOrbit, getAvgOrbitT, getAvgOrbitTable, getAvgOrbitTableImpl, getAvgQLen, getAvgQLenChain, getAvgQLenHandles, getAvgQLenTable, getAvgQLenTable, getAvgRegionLossT, getAvgRegionLossTable, getAvgResidT, getAvgResidTChain, getAvgResidTHandles, getAvgRespT, getAvgRespTChain, getAvgRespTHandles, getAvgRespTTable, getAvgRespTTable, getAvgSys, getAvgSys, getAvgSys, getAvgSysRespT, getAvgSysTable, getAvgSysTable, getAvgSysTable, getAvgSysTableImpl, getAvgSysTput, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTableImpl, getAvgTableImpl, getAvgTard, getAvgTput, getAvgTputChain, getAvgTputHandles, getAvgTputTable, getAvgTputTable, getAvgUtil, getAvgUtilChain, getAvgUtilHandles, getAvgUtilTable, getAvgUtilTable, getAvgWaitT, getCdfPassT, getCdfPassT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getChainAvgT, getDeadlineTable, getLibrariesUsed, getModel, getMomentChainT, getMomentChainT, getMomentChainT, getMomentChainTable, getMomentChainTable, getMomentChainTable, getMomentStationT, getMomentStationT, getMomentStationT, getMomentStationTable, getMomentStationTable, getMomentStationTable, getMomentT, getMomentT, getMomentT, getMomentTable, getMomentTable, getMomentTable, getMomentTable, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getNodeChainAvgT, getProb, getProbAggr, getProbMarg, getProbMarg, getProbNormConstAggr, getProbSysMarg, getProbSysMarg, getSensitivityT, getSensitivityT, getSensitivityTable, getSensitivityTable, getStageT, getStageT, getStageTable, getStageTable, getSysAvgT, getSysAvgT, getSysAvgT, getTranHandles, hasAvgResults, hasBoundedBuffer, hasDistribResults, hasReneging, hasTranResults, initHandles, itemAvgT, libraries, lossAvgT, mapEnvApprox, mCT, mCT, mCT, model, momentChainT, momentChainT, momentChainT, momentStationT, momentStationT, momentStationT, momentT, momentT, momentT, mST, mST, mST, mT, mT, mT, needsMapEnv, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, nodeChainAvgT, options, orbitAvgT, print, prob, prob, probAggr, probAggr, probMarg, probMarg, probNormConstAggr, probSys, probSysAggr, regionLossAvgT, runAnalyzerChecks, sample, sampleAggr, sensitivityT, sensitivityT, setAvgHandles, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranHandles, setTranProb, showLibraryAttribution, sT, sT, stageT, stageTable, storeAvgResults, supportsExactSensitivity, sysAvgT, sysAvgT, sysAvgT, tranAvg, tranCdfPassT, tranCdfPassT, tranCdfRespT, tranCdfRespT, tranHandles, unsupportedMethodReasonMethods inherited from class jline.solvers.Solver
armTimeout, flagTimeout, getMethodFeatureSet, getName, getOptions, getResults, hasResults, isJavaAvailable, isStochastic, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, resolveMethod, selectMethod, setChecks, setOptions, supportsModelMethod, supportsResolvedMethod, supportsTransientVariance, timeExceeded, unsupportedRefusalId
-
Field Details
-
threadPool
Thread pool for parallel replication execution
-
-
Constructor Details
-
SolverLDES
Constructs a SolverLDES with the given model using default options.- Parameters:
model- the queueing network model to solve
-
SolverLDES
Constructs a SolverLDES with the given LayeredNetwork model using default options.- Parameters:
model- the layered queueing network model to solve
-
SolverLDES
Constructs a SolverLDES with the given LayeredNetwork model and variable arguments.- Parameters:
model- the layered queueing network model to solveargs- variable arguments for solver options
-
SolverLDES
Constructs a SolverLDES with the given LayeredNetwork model and options.- Parameters:
model- the layered queueing network model to solveoptions- solver configuration options
-
SolverLDES
Constructs a SolverLDES with the given model and variable arguments.- Parameters:
model- the queueing network model to solveargs- variable arguments for solver options
-
SolverLDES
Constructs a SolverLDES with the given model and method.- Parameters:
model- the queueing network model to solvemethod- the solution method to use
-
SolverLDES
Constructs a SolverLDES with the given model and options.- Parameters:
model- the queueing network model to solveoptions- solver configuration options
-
SolverLDES
Load a JMT model file (.jsimg/.jsim/.jsimw/.jmva) and simulate with LDES.- Parameters:
filename- path to the JMT model file
-
SolverLDES
Load a JMT model file (.jsimg/.jsim/.jsimw/.jmva) and simulate with LDES, accepting variable option arguments (e.g., "seed", 23000, "samples", 50000).- Parameters:
filename- path to the JMT model fileargs- variable arguments for solver options
-
SolverLDES
Constructs a SolverLDES that warm-starts the simulation from the steady-state distribution computed by another solver. The auxiliary solver is used to find the stationary distribution of the model; the resulting distribution decides the initial state of the simulation (seeinitFromSolver(NetworkSolver)).- Parameters:
model- the queueing network model to solveinitSolver- auxiliary solver used to compute the steady-state distributionargs- variable arguments for solver options
-
-
Method Details
-
initFromSolver
Warm-start the simulation from the steady-state solution of an auxiliary solver. If the auxiliary solver is aSolverCTMC, the exact stationary distribution over the aggregate state space is computed and the initial state is set to the mode of that distribution (the most probable aggregate state). For any other network solver, the steady-state mean queue lengths are used instead and rounded to an integer placement that conserves each closed-class population. The placement is applied as the model initial state via initFromMarginal, as for every other state-driven solver, and LDES starts the run from it. Note that this modifies the initial state of the model object shared with any other solver instance. Since the simulation starts (approximately) in steady state, the transient removal filter is disabled (tranfilter = "fixed" with warmupfrac = 0), so every simulated sample contributes to the estimators.- Overrides:
initFromSolverin classNetworkSolver- Parameters:
initSolver- auxiliary solver used to compute the steady-state distribution- Returns:
- this solver, for chaining
-
initFromJobs
Start the simulation from a job-level initial state.jobshas one row per job,[station, class, remaining, elapsed, qage, sage, order, id], with 0-based station and class indexes.remainingis the service work the job still owes (-1 draws a fresh service time, -2 the residual given the attained serviceelapsed);qageandsageare the times already spent at the station and in the system;orderranks the jobs of a station, the first ones taking the servers; andidis an optional tag (-1 untagged). The layout is the onegetFinalJobs()returns, so a run can be continued exactly where an earlier one stopped:s2.initFromJobs(s1.getFinalJobs()).Unlike
Network.initFromMarginal, which restores counts only and so restarts every job with a fresh service, this keeps each job's residual work. It is LDES-specific, so it is held by the solver (options.init_jobs) rather than by the model, takes precedence over the model initial state and overoptions.init_sol, and enablesoptions.track_jobs. Supported at FCFS queues, the PS family and Delays.- Parameters:
jobs- one row per job, at least the first seven columns- Returns:
- this solver, for chaining
-
getFinalJobs
The jobs present at the end of the run, in the layout ofinitFromJobs(Matrix), so passing the result back restarts each job with its residual service work.Runs the analyzer with
options.track_jobswhen the current result carries no job state. A transient run (options.timespan) is read at its horizon. The departures of the tagged jobs are returned bygetJobDepartures().- Returns:
- one row
[station, class, remaining, elapsed, qage, sage, order, id]per job
-
getJobDepartures
One row[id, station, class, time]per departure of a taggedinitFromJobs(Matrix)job from the station it was placed at.- Returns:
- the departures of the tagged jobs, empty when none was tagged
-
getThreadPool
Returns the thread pool for parallel replication execution.- Returns:
- the thread pool
-
getNumThreads
public int getNumThreads()Returns the number of threads for parallel execution.- Returns:
- the number of threads
-
setNumThreads
public void setNumThreads(int numThreads) Sets the parallelism level for replication execution.- Parameters:
numThreads- number of parallel threads
-
getFeatureSet
Returns the feature set supported by the LDES solver. Supports multiclass Jackson queueing networks with FCFS queues.- Returns:
- the feature set supported by the LDES solver
-
getStruct
Returns the network structure for this solver.- Returns:
- the network structure
-
getTranAvg
public void getTranAvg()Performs a transient analysis of the model using discrete event simulation. The simulation is run for the time horizon specified in options.timespan. If options.timespan is not specified, it defaults to [0, 30/min_rate]. The number of replications is determined by LDESOptions.replications.- Overrides:
getTranAvgin classNetworkSolver
-
getAvg
Computes and returns average station metrics at steady-state. For LayeredNetwork models, this delegates to the LN-specific analyzer.- Overrides:
getAvgin classNetworkSolver- Returns:
- solver result containing average metrics
-
listValidMethods
Returns the list of valid solution methods for LDES.- Returns:
- list of valid method names
-
listValidMethods
Returns the list of valid solution methods for LDES.- Parameters:
model- the network model (unused, for interface compatibility)- Returns:
- list of valid method names
-
supportsTransientAnalysis
public boolean supportsTransientAnalysis()Description copied from class:SolverDoes this solver produce transient averages, i.e. does getTranAvg return trajectories on a finite options.timespan? Declared false here and overridden by the solvers that populate result.Tran (Fluid, CTMC, LDES, JMT). It is a capability claim, not a state test: it must answer before any run has taken place, because the MAP/MMPP random-environment fallback uses it to decide whether the environment stages can be coupled by the mean-field analyzer (which needs getTranAvg) or only by the two steady-state limits.- Overrides:
supportsTransientAnalysisin classSolver- Returns:
- true if the solver can return transient averages
-
closedPopulationWarnings
Closed-chain population conservation check on a steady-state QN, ported from MATLAB's parseSteady.A closed chain must conserve its population in the reported queue lengths. Engine builds that drop blocked closed jobs at a finite-capacity station (pre-guard ldes.jar) leak population silently, and the reported means then describe a different model. FCR models are excluded (a WAITQ waiter is parked outside the station rows), and so are fork-join models (a forked job is counted once per sibling task, so the rows sum to more than the population by construction). A chain is flagged when |sum(QN) - N| > max(0.05*N, 0.05), NaN entries being omitted from the sum.
- Parameters:
sn- the model's network structQN- the (stations x classes) mean queue lengths returned by the engine- Returns:
- one warning message per chain that fails the check, empty when none does
-
runAnalyzer
Description copied from class:SolverExecutes the solver algorithm to analyze the model. This abstract method must be implemented by concrete solver classes.- Specified by:
runAnalyzerin classSolver- Throws:
IllegalAccessException- if access to required resources is deniedParserConfigurationException- if XML parsing configuration failsIOException- if I/O operations fail
-
runMethodSpecificAnalyzer
Run the LDES analyzer with current options including init_sol. Called by SolverENV for transient analysis with initial conditions.- Returns:
- SolverResult containing transient metrics (QNt, UNt, TNt, t)
-
supports
Description copied from class:SolverChecks if this solver supports the given network model. Default implementation returns true; subclasses should override to provide specific feature validation. -
isStochasticMethod
LDES is a discrete-event simulator; all methods are stochastic.- Overrides:
isStochasticMethodin classSolver- Parameters:
method- the method name to classify- Returns:
- true always
-
supports
Checks if the solver supports the given LayeredNetwork model.- Parameters:
model- the LayeredNetwork model to check- Returns:
- true if the model is supported
-
getLNFeatureSet
Returns the feature set supported by the LDES solver for LayeredNetwork models.- Returns:
- the feature set supported for LQN models
-
getLNModel
Returns the LayeredNetwork model (if solving an LQN).- Returns:
- the LayeredNetwork model, or null if solving a regular Network
-
getLNStruct
Returns the LayeredNetworkStruct (if solving an LQN).- Returns:
- the LayeredNetworkStruct, or null if solving a regular Network
-
getAvgCacheTable
Cache performance table for a layered cache-queueing (LCQ) model: one row per CacheTask read (ItemEntry), reporting hit / delayed-hit / miss probabilities and rates. Mirrors the flat-networkNetworkSolver.getAvgCacheTable()convention (delayed hits reported in their own column; reads = hits + misses + delayed hits). Returns an empty table for LQNs without a CacheTask.- Overrides:
getAvgCacheTablein classNetworkSolver- Returns:
- cache performance table
-
getLNAvgThinkTime
Mean think time of every LQN element, at task indices and zero elsewhere.The time a thread of the task holds no request, per completion. The thread pool of a task is a closed cycle of one delay stage and one service stage, so its Little's law reads
X(t)*Z(t) + sum_k B(t,k) = N(t); the simulation measures the occupancyBand the throughputXand this returns theZthat closes it. SolverLN arrives at the same quantity by iteratingupdateThinkTimes, which makes this the natural reference for it. Zero at a task whose threads are unbounded, which has no pool for the law to close on.- Returns:
- [1 x nidx] think times, indexed as the LQN struct is
- Throws:
RuntimeException- if not solving a LayeredNetwork model or results not available
-
getLNAvgCallUtil
Per-call occupancy of the called task's thread pool, in job units.Entry
cis the mean number of threads of the callee held on behalf of callc: theB(t,k)term of the thread-pool law, whose caller classes are the calls reaching the task. Indexed by the call's own index in0..ncalls-1-- the one keyinglsn.calltypeand listed bylsn.callsof-- because calls sit outside the element index space thatgetLNAvgTablecovers.- Returns:
- [1 x ncalls] occupancies
- Throws:
RuntimeException- if not solving a LayeredNetwork model or results not available
-
getLNAvgCallTput
Rate at which each call is dispatched, counted at the caller.Counting at the caller rather than the callee is what lets an asynchronous call register: nobody waits for it, so it never returns. This is
X(c)in the call-flow lawX(c) = X(src(c))*y(c).- Returns:
- [1 x ncalls] throughputs
- Throws:
RuntimeException- if not solving a LayeredNetwork model or results not available
-
getLNAvgEntryClassUtil
Occupancy contributed by each entry's own request stream, in job units.A reference task cycles on its own entries and an open arrival drives an entry from outside the model; the request that results holds a thread just as a call does, and so enters the thread-pool law as a caller class of its own. Indexed by local entry index,
0..nentries-1. Together withgetLNAvgCallUtil()over the calls into a task, these are all theB(t,k)that task has.- Returns:
- [1 x nentries] occupancies
- Throws:
RuntimeException- if not solving a LayeredNetwork model or results not available
-
getAvgTable
Returns a table of average station metrics organized by job classes.Refused for a LayeredNetwork: the AvgTable is indexed by STATION and this solver holds LQN elements. The inherited implementation reaches for a
NetworkStructthat an LQN solve never built, so without this the caller met a NullPointerException naming a field rather than the mistake. Its return type isNetworkAvgTable, so the layered table cannot be returned in its place -- askgetLNAvgTable()for that.- Overrides:
getAvgTablein classNetworkSolver- Returns:
- table containing station-level metrics for each class
-
getCdfRespTLN
Empirical response time distribution of every entry of a LayeredNetwork, measured on the simulated sample path.Counterpart of
SolverLN.getCdfRespT(), and the SIMULATED answer to the same question: where SolverLN'smoment3pass fits an APH to three moments and convolves, this is the ecdf of the response times the run actually observed, so its tail is measured rather than extrapolated. The engine times each request from the instant the entry acquires a thread to the instant it replies -- the same intervalRLNaverages, which is why the mean of this law reproduces that row.- Returns:
- one entry per entry of the LQN, in the entry-local index space
(
lsn.eshift + i). Each element is an (n x 2) matrix whose columns are [F(t), t], the column order every CDF getter in LINE uses, or null for an entry the run observed nothing at -- left empty rather than filled with a guess. - Throws:
RuntimeException- if not solving a LayeredNetwork model, or if the run retained no samples
-
getLNAvgTable
Returns average metrics for a LayeredNetwork model as a table. This method should be called after getAvg() for LayeredNetwork models.- Returns:
- LayeredNetworkAvgTable containing average metrics per LQN element
- Throws:
RuntimeException- if not solving a LayeredNetwork model or results not available
-
defaultOptions
Returns the default solver options for the LDES solver.- Returns:
- Default solver options with SolverType.LDES
-
sample
Exact sample path of one node: one row per step, holding the LINE State of the node OCCUPIED UNTILt[k], with the events of the node tagged att[k], as in SolverSSA. Phase-level rows follow the LDES phase map (samplePath.phases), which is one phase for a law with no phase structure.- Parameters:
node- the stateful node to samplenumEvents- number of rows (steps) to record- Returns:
- the node's state rows, times and events
-
sampleAggr
Exact sample path of one node as per-class job counts (always available, also where the detailed rows are refused).- Parameters:
node- the stateful node to samplenumEvents- number of rows (steps) to record- Returns:
- the node's per-class counts, times and events
-
sampleSys
Exact system sample path: one LINE State matrix per stateful node, all sharing the step times, and every event of the run.- Overrides:
sampleSysin classNetworkSolver- Parameters:
numEvents- number of rows (steps) to record- Returns:
- the state rows of every stateful node, times and events
-
sampleSysAggr
Exact system sample path as per-class job counts per stateful node.- Overrides:
sampleSysAggrin classNetworkSolver- Parameters:
numEvents- number of rows (steps) to record- Returns:
- the per-class counts of every stateful node, times and events
-
stream
Generates a sample path with streaming metrics pushed via OTLP.- Parameters:
node- The stateful node to samplestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleResult containing the state trajectory for the node
-
stream
Generates a sample path with streaming metrics pushed via OTLP.- Parameters:
node- The stateful node to samplenumEvents- Number of time points to samplestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleResult containing the state trajectory for the node
-
streamAggr
Generates an aggregated sample path with streaming metrics pushed via OTLP.- Parameters:
node- The stateful node to samplestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleResult containing the aggregated state trajectory
-
streamAggr
public Ret.SampleResult streamAggr(StatefulNode node, int numEvents, StreamingOptions streamingOptions) Generates an aggregated sample path with streaming metrics pushed via OTLP.- Parameters:
node- The stateful node to samplenumEvents- Number of time points to samplestreamingOptions- Configuration for streaming (endpoint, mode, frequency)- Returns:
- SampleResult containing the aggregated state trajectory
-
getStream
Returns the current streaming collector, or null if not streaming.- Returns:
- the streaming collector
-
getProb
Steady-state probability of a state at a node, read from the engine's exact joint-state residence-time histogram as the referencegetProb.m. The state is marginalized to per-class counts, which is what the histogram records.- Parameters:
node- the stateful node to analyze; must be a stationstate- the state to evaluate (one per row, probabilities summed); null uses the model's current state- Returns:
- fraction of simulated time spent in the state
-
getProb
Estimates state probability using node index.- Overrides:
getProbin classNetworkSolver- Parameters:
nodeIndex- Index of the stateful nodestate- The state vector to compute probability for- Returns:
- Estimated probability of the specified state
-
getProb
Estimates state probability using current network state.- Parameters:
node- The stateful node to analyze- Returns:
- Estimated probability of current network state at the node
-
getProbAggr
Steady-state probability of a per-class job distribution at a node, read from the engine's exact residence-time histogram as the referencegetProbAggr.m.- Parameters:
node- the stateful node to analyze; must be a stationstateAggr- per-class job counts (one per row, probabilities summed); null aggregates the model's current state- Returns:
- fraction of simulated time spent in the aggregated state
-
getProbAggr
Estimates aggregated state probability using node index.- Overrides:
getProbAggrin classNetworkSolver- Parameters:
nodeIndex- Index of the stateful nodestateAggr- The aggregated state vector to compute probability for- Returns:
- Estimated probability of the specified aggregated state
-
getProbAggr
Estimates aggregated state probability using current network state.- Parameters:
node- The stateful node to analyze- Returns:
- Estimated probability of current aggregated network state at the node
-
getProbSys
Joint steady-state probability of the model's current state over every station, read from the engine's exact residence-time histogram as the referencegetProbSys.m. The histogram records per-class counts, so this equalsgetProbSysAggr().- Overrides:
getProbSysin classNetworkSolver- Returns:
- fraction of simulated time spent in the current joint state
-
getProbSysAggr
Joint steady-state probability of the model's current aggregated state; the histogram is already per-class, so this isgetProbSys(), as in the reference.- Overrides:
getProbSysAggrin classNetworkSolver- Returns:
- fraction of simulated time spent in the current aggregated joint state
-
getAvgBusyPeriod
public double getAvgBusyPeriod(int[] stations, int jobClass, int order) Mean busy period of order n for a set of stations, measured along the simulated sample path. A busy period of order n runs from the instant an arrival raises the jobs held by the set to n up to the instant the set falls back below n (H. Daduna, "Busy Periods for Subnetworks in Stochastic Networks: Mean Value Analysis", J. ACM 35(3), 1988). Periods in progress when the warmup ends are discarded, since their start is not observable.- Parameters:
stations- station indexes forming the subnetworkjobClass- class index, or -1 to count every classorder- busy period order, 1 for the ordinary busy period- Returns:
- mean busy period duration, NaN if no such period completed
-
getAvgReward
Steady-state expected reward for every reward function defined on the model. The reward integral E[r] = (1/T) integral_0^T r(X(t)) dt is accumulated inside the discrete-event simulation on the exact integer joint state, so it is correct for nonlinear rewards (e.g. E[n^2]) and converges to the stationary expectation sum_s pi(s) r(s) computed exactly by the CTMC solver.- Returns:
- map from reward name to expected reward value in steady state
- Throws:
IllegalStateException- if no rewards are defined on the model
-
getAvgReward
Steady-state expected reward for a single named reward function.- Returns:
- the expected reward value in steady state
- Throws:
IllegalArgumentException- if the reward name is not defined
-
getTranReward
Single-run transient reward trajectory r(X(t)) recorded along the simulated path. The associated time vector is available viagetRewardTimeVector().- Parameters:
rewardName- optional reward name to filter; if null, all rewards are returned- Returns:
- map from reward name to the reward time series
- Throws:
IllegalStateException- if no rewards are defined on the model
-
getTranReward
Transient reward trajectory for all reward functions.- Returns:
- map from reward name to the reward time series
-
getRewardTimeVector
Time vector associated withgetTranReward().- Returns:
- the time points, or null if not available
-
getRewardNames
Names of the reward functions defined on the model.- Returns:
- list of reward names (empty if none are defined)
-
getStateHistogram
Runs the simulation with state-histogram export enabled and returns the exact joint-state residence-time histogram. Rowiof the returned space matrix is an aggregated system state (CTMCstateSpaceAggrlayout, station-major) and entryiof the time vector is its residence time. Host languages that cannot pass a Java reward function into the simulation use this to evaluate arbitrary Markov rewards: E[r] = sum_i (time_i / sum(time)) * r(state_i).- Returns:
- a two-element array {space, time}; both null if the histogram is empty
-
getStateTrajectory
Runs the simulation with state export enabled and returns the integer joint-state trajectory along the sampled path:{space, time}where rowiof space is the aggregated state (CTMCstateSpaceAggrlayout) attime[i]. Host languages evaluate their reward functions on each state to obtain the transient reward trajectory r(X(t)).- Returns:
- a two-element array {space, time}; both null if unavailable
-
getCdfRespT
Empirical response time CDF, measured on the simulated sample path.A simulator must report what it observed: the base NetworkSolver implementation fabricates an exponential law with the right mean, which is an analytical fallback and says nothing about the tail. The LDES engine records every per-job response time, so the CDF here is the ecdf of those samples, exactly as the reference
@SolverLDES/getCdfRespT.m. Each populated cell is an (n x 2) matrix of [F(t), t]; a (station, class) pair with no observation is left empty rather than filled with a guess.The reference dispatches a LayeredNetwork to
getCdfRespTLN; here the two return types differ (DistributionResultversus a per-entryList<Matrix>), so a layered model is refused by name with the same redirection instead.- Overrides:
getCdfRespTin classNetworkSolver- Returns:
- DistributionResult containing empirical CDFs for each station-class pair
-
getCdfRespT
Empirical response time CDF, handle form. The handle only names which metrics the caller wants; the engine records every (station, class) anyway, so it is accepted for signature compatibility and not read.- Overrides:
getCdfRespTin classNetworkSolver- Parameters:
R- response time handles, accepted for signature compatibility- Returns:
- DistributionResult containing empirical CDFs for each station-class pair
-
getPerctRespT
Response time percentiles with the default levels 10, 25, 50, 75, 90, 95 and 99.- Returns:
- one entry per (station, class) pair with recorded response times
- See Also:
-
getPerctRespT
Steady-state response time percentiles measured on the simulated sample path, each with a confidence interval.The input is the departure-ordered sequence of per-job response times of each (station, class), warmup included, since the procedures detect and delete the warmup themselves. A single run is analysed by FQUEST (Lolos et al., WSC 2023). A replicated run (
replications >= 2, or methodparallel) is analysed by FIRQUEST (Lolos et al., WSC 2025) on the per-replication sequences, each trimmed at the END to the shortest of them, because FIRQUEST needs equal lengths and cutting the tail leaves the warmup at the start and the replications independent.The confidence level is
options.confintwhen it is set, 0.95 otherwise. A pair with too few observations for the procedure gets the empirical quantile of all its samples and NaN interval fields, with a warning; a pair with no observation (e.g. the Source) is omitted.- Parameters:
percentiles- percentile levels, fractions in (0,1) or percentages in (0,100)- Returns:
- one entry per (station, class) pair with recorded response times
-
getPerctRespT
Percentiles by a named method. Onlyforktailis served here, by the base implementation, because itsMatrixreturn type cannot carry an interval; the measured percentiles with FQUEST/FIRQUEST confidence intervals aregetPerctRespT(double[]).- Overrides:
getPerctRespTin classNetworkSolver- Parameters:
percentiles- percentile levels, fractions in (0,1) or percentages in (0,100)method- "forktail"- Returns:
- matrix [classes x percentiles] of ForkTail predictions
-
getTranCdfRespT
Returns cumulative distribution functions of response times during transient analysis. The engine keeps one set of per-job response time samples, so this is the same measured ecdfgetCdfRespT()reports, under the transient getter's name.- Overrides:
getTranCdfRespTin classNetworkSolver- Returns:
- DistributionResult containing empirical CDFs for each station-class pair
-
getTranCdfRespT
Returns cumulative distribution functions of response times during transient analysis.- Overrides:
getTranCdfRespTin classNetworkSolver- Parameters:
R- response time handles specifying which metrics to compute- Returns:
- DistributionResult containing empirical CDFs for each station-class pair
-
getTranCdfPassT
Returns cumulative distribution functions of passage times during transient analysis. For LDES, passage times are equivalent to response times in single-visit networks.- Overrides:
getTranCdfPassTin classNetworkSolver- Returns:
- DistributionResult containing empirical CDFs for passage times
-
getTranCdfPassT
Returns cumulative distribution functions of passage times during transient analysis.- Overrides:
getTranCdfPassTin classNetworkSolver- Parameters:
R- response time handles specifying which metrics to compute- Returns:
- DistributionResult containing empirical CDFs for passage times
-
getTranProb
Computes transient state probabilities at a specific node over time using LDES simulation.- Parameters:
node- the stateful node to analyze- Returns:
- ProbabilityResult containing transient probability data
-
getTranProbAggr
Computes transient aggregated state probabilities at a specific node over time.- Parameters:
node- the stateful node to analyze- Returns:
- ProbabilityResult containing transient aggregated probability data
-
getTranProbSys
Computes transient system-wide state probabilities over time using LDES simulation.- Returns:
- ProbabilityResult containing transient system probability data
-
getTranProbSysAggr
Computes transient system-wide aggregated state probabilities over time.- Returns:
- ProbabilityResult containing transient system aggregated probability data
-