Class SolverQNS
- Direct Known Subclasses:
QNS
-
Nested Class Summary
Nested classes/interfaces inherited from class jline.solvers.NetworkSolver
NetworkSolver.SolverConfigurator -
Field Summary
Fields inherited from class jline.solvers.NetworkSolver
avgHandles, lastPerctMethod, lastPermEngine, model, sn, tranHandles -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with network modelConstructor with network model and variable argumentsConstructor with network model and method stringSolverQNS(Network model, SolverOptions options) Constructor with network model and solver options -
Method Summary
Modifier and TypeMethodDescriptionstatic SolverOptionsGet the default options for the QNS solverstatic FeatureSetGet the feature set supported by this solvergetProb(int node) Returns marginal state probabilities for a specific node (all states).Returns marginal state probabilities for a specific node and state.getProbAggr(int node) Probability of a SPECIFIC per-class job distribution at a station (current state).getProbAggr(int node, Matrix state_a) Probability of a SPECIFIC per-class job distribution at a station.Returns the logarithm of the normalizing constant of state probabilities.Returns joint state probabilities for the entire system.Returns aggregated joint state probabilities for the entire system.static booleanCheck if the solver is available: a nativeqnsolverbinary is on the PATH.String[]List valid methods for this solverstatic SolverOptionsparseOptions(Object... varargin) Parse options from variable argumentsstatic StringWhy SolverQNS cannot serve a model with immediate feedback, or "" when the model has none.static StringqnsMultiserverRefusal(NetworkStruct sn, String method) Whether qnsolver's own -m switch offers this multiserver approximation.voidRun the analyzer for the QNS solversample(int node, int numEvents) Samples state trajectories for a specific node.sampleAggr(int node, int numEvents) Samples aggregated state trajectories for a specific node.sampleSys(int numEvents) Samples joint system state trajectories.sampleSysAggr(int numEvents) Samples aggregated joint system state trajectories.booleanCheck if the solver supports the given modelsupportsModelMethod(String method) Structural finite-capacity gate.Methods inherited from class jline.solvers.NetworkSolver
aCaT, aCT, aCT, aCT, aCT, aCT, aCT, aIT, aLT, aNCT, aNCT, aNCT, aNCT, aNCT, aNCT, aNT, aNT, aNT, aNT, aNT, aNT, aOT, 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, getAllSolvers, getAvg, getAvg, getAvg, getAvgArvR, getAvgArvRChain, getAvgArvRHandles, getAvgCacheT, getAvgCacheTable, getAvgCacheTableImpl, getAvgChain, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTable, getAvgChainTableImpl, getAvgChainTableImpl, 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, getAvgRegionLossT, getAvgRegionLossTable, getAvgResidT, getAvgResidTChain, getAvgResidTHandles, getAvgRespT, getAvgRespTChain, getAvgRespTHandles, getAvgSys, getAvgSys, getAvgSys, getAvgSysRespT, getAvgSysTable, getAvgSysTable, getAvgSysTable, getAvgSysTableImpl, getAvgSysTput, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgT, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTable, getAvgTableImpl, getAvgTableImpl, getAvgTput, getAvgTputChain, getAvgTputHandles, getAvgUtil, getAvgUtilChain, getAvgUtilHandles, getAvgWaitT, getCdfPassT, getCdfPassT, getCdfRespT, getCdfRespT, 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, getPerctRespT, getProbMarg, getProbMarg, getProbSysMarg, getProbSysMarg, getSensitivityT, getSensitivityT, getSensitivityTable, getSensitivityTable, getStageT, getStageT, getStageTable, getStageTable, getSysAvgT, getSysAvgT, getSysAvgT, getTranAvg, getTranCdfPassT, getTranCdfPassT, getTranCdfRespT, getTranCdfRespT, getTranHandles, hasAvgResults, hasBoundedBuffer, hasDistribResults, hasReneging, hasTranResults, initFromSolver, 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, sensitivityT, sensitivityT, setAvgHandles, setAvgResults, setDistribResults, setLang, setModel, setTranAvgResults, setTranHandles, setTranProb, showLibraryAttribution, sT, sT, stageT, stageTable, supportsExactSensitivity, sysAvgT, sysAvgT, sysAvgT, tranAvg, tranCdfPassT, tranCdfPassT, tranCdfRespT, tranCdfRespT, tranHandles, unsupportedMethodReasonMethods inherited from class jline.solvers.Solver
getMethodFeatureSet, getName, getOptions, getResults, hasResults, isJavaAvailable, isStochastic, isStochasticMethod, isValidOption, listValidOptions, parseOptions, reset, resetRandomGeneratorSeed, resolveMethod, selectMethod, setChecks, setOptions, supportsTransientAnalysis, timeExceeded
-
Constructor Details
-
SolverQNS
Default constructor with network model -
SolverQNS
Constructor with network model and method string -
SolverQNS
Constructor with network model and solver options -
SolverQNS
Constructor with network model and variable arguments
-
-
Method Details
-
parseOptions
Parse options from variable arguments -
defaultOptions
Get the default options for the QNS solver -
getFeatureSet
Get the feature set supported by this solver -
supports
Check if the solver supports the given model -
supportsModelMethod
Structural finite-capacity gate.NOTHING under the QNS tree reads sn.cap or sn.classcap -- the model is written out for
qnsolver, whose MVA-family algorithms have no representation of a finite buffer -- so a capped station was solved as an unbounded one and the table reported the unconstrained answer under this solver's name. There is no registry feature name for plain capacity, hence the structural test; SolverMVA, SolverNC, SolverAG and SolverFluid gate the same way through the same helper.Without it SolverAUTO.listValidMethods offered all eight "qns" method names on the BAS-blocking model of cqn_bas_blocking.
- Overrides:
supportsModelMethodin classSolver- Parameters:
method- the concrete method name- Returns:
- empty string if supported, else the offending reason
-
qnsImmfeedRefusal
Why SolverQNS cannot serve a model with immediate feedback, or "" when the model has none.Immediate feedback (sn.immfeed) keeps a self-looping job on its server instead of re-queueing it, and neither path of SolverQNS can state that: the JMVA document qnsolver reads carries a mean demand and a visit count per chain, and the LQN QN2LQN writes turns the routing into OR-fork precedences of pseudo-activities on the reference task, where a repeated visit is a new call. Either would answer for re-queueing under this solver's name.
ONE PREDICATE, TWO CALLERS:
supportsModelMethod(java.lang.String)(the gate, hence model.help and SolverAUTO) andrunAnalyzer()(the run, for a caller with enableChecks off). SolverJMT keeps its own wording in jmtMethodRefusal. Mirrors matlab/src/solvers/wrappers/QNS/qns_immfeed_refusal.m.- Parameters:
sn- the network struct- Returns:
- the refusal, or "" when the model carries no immediate feedback
-
qnsMultiserverRefusal
Whether qnsolver's own -m switch offers this multiserver approximation.THE RULE IS INSIDE THE MULTISERVER BRANCH, and that is not a detail. Without a multiserver station the reference emits no -m at all and answers under the caller's method name, so refusing "suri" there would refuse a model this solver does solve.
"qnsolver -m" accepts conway, reiser, rolia and zhou. "suri" and "schmidt" are LQNS approximations, reachable only on the non-product-form closed SolverLQNS branch, and qnsolver has no flag for either. Mirrors matlab/src/solvers/wrappers/QNS/qns_multiserver_refusal.m and the C++ is_qnsolver_multiserver.
- Parameters:
sn- the network structmethod- the requested method name- Returns:
- the refusal, or "" when the pair is served
-
listValidMethods
List valid methods for this solver -
runAnalyzer
Run the analyzer for the QNS solver- Specified by:
runAnalyzerin classSolver- Throws:
IllegalAccessException- if access to required resources is deniedParserConfigurationException- if XML parsing configuration failsIOException- if I/O operations fail
-
isAvailable
public static boolean isAvailable()Check if the solver is available: a nativeqnsolverbinary is on the PATH. qnsolver ships with LQNS, whose licence forbids redistribution, so LINE never runs it from a container image; userun-tests.sh --lqns-dockerto test a containerised build. -
getProbNormConstAggr
Description copied from class:NetworkSolverReturns the logarithm of the normalizing constant of state probabilities. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
getProbNormConstAggrin classNetworkSolver- Returns:
- result containing the log normalizing constant
-
getProb
Description copied from class:NetworkSolverReturns marginal state probabilities for a specific node and state. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
getProbin classNetworkSolver- Parameters:
node- the node index for which to compute probabilitiesstate- the state vector to query (optional, null for all states)- Returns:
- result containing marginal state probabilities
-
getProb
Description copied from class:NetworkSolverReturns marginal state probabilities for a specific node (all states). This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
getProbin classNetworkSolver- Parameters:
node- the node index for which to compute probabilities- Returns:
- result containing marginal state probabilities
-
getProbSys
Description copied from class:NetworkSolverReturns joint state probabilities for the entire system. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
getProbSysin classNetworkSolver- Returns:
- result containing joint state probabilities
-
getProbAggr
Description copied from class:NetworkSolverProbability of a SPECIFIC per-class job distribution at a station. Returns P(n1 jobs of class 1, n2 jobs of class 2, ...) for given state.Compare with
NetworkSolver.getProbMarg(int, int, jline.util.matrix.Matrix): returns queue-length distribution for a single class, i.e., P(n jobs of class r) for n=0,1,...,N(r).- Overrides:
getProbAggrin classNetworkSolver- Parameters:
node- the node index for which to compute probabilitiesstate_a- per-class job counts, e.g., [2,1] = 2 class-1, 1 class-2- Returns:
- scalar probability in [0,1]
-
getProbAggr
Description copied from class:NetworkSolverProbability of a SPECIFIC per-class job distribution at a station (current state). Returns P(n1 jobs of class 1, n2 jobs of class 2, ...).Compare with
NetworkSolver.getProbMarg(int, int, jline.util.matrix.Matrix): returns queue-length distribution for a single class, i.e., P(n jobs of class r) for n=0,1,...,N(r).- Overrides:
getProbAggrin classNetworkSolver- Parameters:
node- the node index for which to compute probabilities- Returns:
- scalar probability in [0,1]
-
getProbSysAggr
Description copied from class:NetworkSolverReturns aggregated joint state probabilities for the entire system. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
getProbSysAggrin classNetworkSolver- Returns:
- result containing aggregated joint state probabilities
-
sample
Description copied from class:NetworkSolverSamples state trajectories for a specific node. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
samplein classNetworkSolver- Parameters:
node- the node index to sample fromnumEvents- the number of events to sample- Returns:
- result containing sampled state trajectories
-
sampleAggr
Description copied from class:NetworkSolverSamples aggregated state trajectories for a specific node. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
sampleAggrin classNetworkSolver- Parameters:
node- the node index to sample fromnumEvents- the number of events to sample- Returns:
- result containing sampled aggregated state trajectories
-
sampleSys
Description copied from class:NetworkSolverSamples joint system state trajectories. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
sampleSysin classNetworkSolver- Parameters:
numEvents- the number of events to sample- Returns:
- result containing sampled joint system state trajectories
-
sampleSysAggr
Description copied from class:NetworkSolverSamples aggregated joint system state trajectories. This is an abstract method that must be implemented by concrete solver subclasses.- Overrides:
sampleSysAggrin classNetworkSolver- Parameters:
numEvents- the number of events to sample- Returns:
- result containing sampled aggregated joint system state trajectories
-