solvers.wrappers.LQNS

lqns_method_refusal(model, method)

[OK, REASON] = LQNS_METHOD_REFUSAL(MODEL, METHOD) Whether lqns or lqsim can serve this LayeredNetwork under METHOD, as a predicate. METHOD ‘’ asks the method-neutral half only.

ONE PREDICATE, TWO CALLERS. SolverLQNS.supportsModelMethod asks it, so model.help and SolverAUTO never offer a pair that dies at run time, and runAnalyzer asks it again before the .lqnx is written, so a caller naming the method by hand gets LINE’s own sentence rather than the binary’s parse error.

WHY NOT A FEATURE SET. SolverLQNS.supports used to compare the per-layer Networks that SolverLN builds against a flat set naming Queue, Exp and FCFS. Every LN layer carries a Delay(‘Clients’) under INF with PROB routing, which that set did not declare, so the comparison refused every layered model there is, and it never saw an LQN-level construct at all. lqns reads the .lqnx and not the layers, so the rules are stated on the LayeredNetwork itself.

THE RULES. (1) The constructs neither binary models, named one by one by SolverLQNS.unsupportedLNConstructs. (2) The scheduling vocabulary: writeXML writes SchedStrategy.toText verbatim (FCFSPRPRIO as ‘pri’), and the LQN schema names fcfs, ps, inf, hol, pri and ref only, so any other discipline reaches lqns as a syntax error for what is a modelling limit. (3) Under ‘sim’/’lqsim’, a replicated processor or task, which lqsim refuses to simulate.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

findlqnelem(lqn, name, elemType)

IDX = FINDLQNELEM(LQN, NAME, ELEMTYPE) Index of the layered element called NAME whose lqn.type is ELEMTYPE, or -1 when the struct carries no such element. ELEMTYPE is a LayeredNetworkElement constant (HOST, TASK, ENTRY, ACTIVITY, CALL).

THE KIND IS PART OF THE KEY, and has to be. A LINE-generated layered model routinely gives a processor, its task and that task’s entry the SAME name, and lqn.names holds all three, so findstring(lqn.names,name) returns EVERY match and an assignment indexed by it writes one element’s result into all of them: the processor row ends up carrying the task’s numbers and then the entry’s, so one .lqxo yields three different wrong answers. The result file states which kind each row describes – it is the tag being read – so the ambiguity does not have to exist. On a model whose names are unique this agrees with findstring element for element.

Copyright (c) 2012-2026, Imperial College London All rights reserved.