LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
line_ack.m
1function line_ack(toolName, verbose, msg, cite)
2% LINE_ACK(TOOLNAME, VERBOSE, MSG, CITE)
3%
4% Print, once per session, the acknowledgement of the external tool that a
5% wrapper solver delegates to, together with the pointer to its official
6% website and the canonical paper to cite. The acknowledgement is pull-based,
7% like the library attribution: nothing is printed at the default verbosity,
8% and only a caller that asks for it explicitly, by running at
9% VerboseLevel.DEBUG, gets the line. It is printed at most once per TOOLNAME
10% per session. SOLVER.CITATIONS and LINE_CITATION are the quiet ways to obtain
11% the same reference.
12%
13% MSG and CITE supply the acknowledgement text and the reference for a solver
14% that lives outside this tree; when omitted both come from the table below,
15% which covers the in-tree wrapper solvers only. Mirror any edit to that table
16% in the Java (jline.io.InputOutput.line_ack) and Python
17% (line_solver.api.io.logging.line_ack) tables.
18%
19% The machine-readable form of the same reference is LINE_CITATION(TOOLNAME),
20% which returns the BibTeX entry.
21%
22% See also LINE_CITATION.
23
24% Copyright (c) 2012-2026, Imperial College London
25% All rights reserved.
26
27if nargin < 2
28 verbose = GlobalConstants.Verbose;
29end
30
31if verbose ~= VerboseLevel.DEBUG || GlobalConstants.Verbose == VerboseLevel.SILENT
32 return
33end
34
35if GlobalConstants.isToolAckShown(toolName)
36 return
37end
38
39if nargin < 3 || isempty(msg)
40 msg = ackText(toolName);
41end
42if nargin < 4
43 cite = '';
44end
45if isempty(cite)
46 cite = ackCitation(toolName);
47end
48if isempty(msg)
49 return
50end
51
52line_printf('%s\n', msg);
53if ~isempty(cite)
54 line_printf(' Cite: %s\n', cite);
55end
56GlobalConstants.setToolAckShown(toolName);
57end
58
59function msg = ackText(toolName)
60% Attribution strings verified against each upstream project's own pages.
61% Do not reword an author list or a URL from memory.
62switch upper(toolName)
63 case 'JMT'
64 msg = ['SolverJMT delegates to Java Modelling Tools (JMT), by M. Bertoli, ', ...
65 'G. Casale, G. Serazzi (Politecnico di Milano, Imperial College London). ', ...
66 'Please acknowledge the JMT authors: http://jmt.sourceforge.net/'];
67 case 'LQNS'
68 msg = ['SolverLQNS delegates to LQNS/LQSIM, by G. Franks, M. Woodside et al. ', ...
69 '(Real-Time and Distributed Systems Group, Carleton University). ', ...
70 'Please acknowledge the LQNS authors: http://www.layeredqueues.org/'];
71 case 'QNS'
72 msg = ['SolverQNS delegates to qnsolver, part of the LQNS distribution by ', ...
73 'G. Franks, M. Woodside et al. (Real-Time and Distributed Systems Group, ', ...
74 'Carleton University). Please acknowledge the LQNS authors: ', ...
75 'http://www.layeredqueues.org/'];
76 otherwise
77 % Out-of-tree wrapper solvers supply their own text through MSG: their
78 % tools must not be named in this codebase.
79 msg = '';
80end
81end
82
83function cite = ackCitation(toolName)
84% One-line reference to the canonical paper of each tool. It describes the same
85% work as the BibTeX entry returned by LINE_CITATION (keys BerCS07 and
86% fran.ea09 in doc/latex/biblio.bib), which is where the citation key belongs:
87% the printed line is for the reader, not for a .bib file.
88switch upper(toolName)
89 case 'JMT'
90 cite = ['M. Bertoli, G. Casale, G. Serazzi. "The JMT Simulator for ', ...
91 'Performance Evaluation of Non-Product-Form Queueing Networks". ', ...
92 'Proc. of the 40th Annual Simulation Symposium (ANSS), pp. 3-10, 2007.'];
93 case {'LQNS','QNS'}
94 cite = ['G. Franks, T. Al-Omari, M. Woodside, O. Das, S. Derisavi. ', ...
95 '"Enhanced Modeling and Solution of Layered Queueing Networks". ', ...
96 'IEEE Trans. Software Engineering, 35(2):148-161, 2009.'];
97 otherwise
98 cite = '';
99end
100end