LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
config_schema.h
Go to the documentation of this file.
1#pragma once
2/**
3 * @file config_schema.h
4 * @brief The keys a LINE solver accepts under options.config, in all four codebases.
5 *
6 * GENERATED by doc/generate-config-schema.py from doc/line-config.schema.json. Do not edit.
7 *
8 * The C++ engine takes no options.config map: a key reaches it only as the
9 * line-cli flag named in `cpp` (empty when the engine does not implement it).
10 * The other columns let a C++ caller say which codebase does.
11 */
12
13#include <array>
14#include <cstring>
15
16namespace line {
17namespace solvers {
18
19/** One options.config key; an empty placement means "not implemented there". */
20struct ConfigKey {
21 const char* name;
22 const char* matlab;
23 const char* java;
24 const char* python;
25 const char* cpp;
26 const char* aliases; ///< comma-separated
27 const char* values; ///< comma-separated admissible values; empty when any string is taken
29};
30
31inline const std::array<ConfigKey, 174>& config_schema() {
32 static const std::array<ConfigKey, 174> keys = {{
33 {"aghq_nodes", "config", "config", "config", "", "", "", false},
34 {"algorithm", "config", "", "config", "--cdf-algorithm", "", "exact,rd", false},
35 {"alpha", "config", "", "", "", "", "", false},
36 {"aoi_preemption", "config", "config", "option:aoi_preemption", "", "", "", false},
37 {"bgaggr", "config", "config", "config", "", "", "", false},
38 {"bgenv", "config", "", "", "", "", "lump,full", false},
39 {"bgstates_max", "config", "config", "config", "", "", "", false},
40 {"censor_level", "config", "config", "config", "--censor-level", "", "", false},
41 {"censor_states_max", "config", "config", "config", "", "", "", false},
42 {"chain_aggregation", "config", "config", "config", "", "", "", false},
43 {"cimethod", "config", "option:LDESOptions.cimethod", "option:cimethod", "--ldes-cimethod", "", "obm,bm,spectral,none", false},
44 {"ciminbatch", "config", "option:LDESOptions.ciminbatch", "option:ciminbatch", "", "", "", false},
45 {"ciminobs", "config", "option:LDESOptions.ciminobs", "option:ciminobs", "", "", "", false},
46 {"cnvgbatch", "config", "option:LDESOptions.cnvgbatch", "option:cnvgbatch", "", "", "", false},
47 {"cnvgchk", "config", "option:LDESOptions.cnvgchk", "option:cnvgchk", "", "", "", false},
48 {"cnvgon", "config", "option:LDESOptions.cnvgon", "option:cnvgon", "--ldes-cnvgon", "", "", false},
49 {"cnvgtol", "config", "option:LDESOptions.cnvgtol", "option:cnvgtol", "--ldes-cnvgtol", "", "", false},
50 {"compress", "config", "config", "config", "", "", "default,none,mixture,mixture.order1,mixture.order2,mamap2,mamap2.fb,m3pp.approx_cov,m3pp.approx_ag,m3pp.exact_delta,m3pp.approx_delta", false},
51 {"container", "config", "option:container", "option:container", "", "", "", false},
52 {"ctmc_tv_ngrid", "config", "config", "config", "--ctmc-tv-ngrid", "", "", false},
53 {"da", "config", "config", "config", "", "", "courtois,kms,takahashi,multi", false},
54 {"da_damping", "config", "", "config", "", "", "", false},
55 {"da_iter", "config", "config", "config", "", "", "", false},
56 {"da_miniter", "config", "", "config", "", "", "", false},
57 {"da_nanstop", "config", "", "config", "", "", "", false},
58 {"da_norm", "config", "", "", "", "", "", false},
59 {"dae_maxcov", "config", "config", "config", "", "", "", false},
60 {"dae_maxstate", "config", "config", "config", "", "", "", false},
61 {"decomp", "config", "", "", "", "", "", false},
62 {"dep_scv", "config", "config", "", "", "", "qna,etaqa", false},
63 {"dt_maxlevel", "config", "config", "config", "", "", "", false},
64 {"endpoints", "config", "option:AGOptions.endpoints", "config", "", "", "", false},
65 {"env_alpha", "config", "config", "", "", "", "", false},
66 {"env_init", "config", "config", "config", "--env-init", "", "", false},
67 {"etaqa_trunc", "config", "config", "config", "", "", "", false},
68 {"eventcache", "config", "config", "", "", "", "", false},
69 {"exec", "config", "option:AGOptions.exec", "config", "", "", "", false},
70 {"fau_delta", "config", "config", "config", "--fau-delta", "", "", false},
71 {"fau_epsilon", "config", "config", "config", "--fau-epsilon", "", "", false},
72 {"fau_ngrid", "config", "config", "", "", "", "", false},
73 {"fes_solver", "config", "config", "config", "", "", "mva,ctmc,ssa,jmt,ldes", false},
74 {"fes_stations", "config", "config", "config", "", "", "", false},
75 {"fj_accuracy", "config", "", "", "--fj-accuracy", "", "", false},
76 {"fj_sync_q_len", "config", "config", "config", "", "", "", false},
77 {"fj_tmode", "config", "", "", "--fj-tmode", "", "NARE,Sylvester", false},
78 {"fj_warmstart", "config", "config", "config,option:fj_warmstart", "", "", "", false},
79 {"fluid_boundary", "config", "config", "config", "--fluid-boundary", "", "reflect,diffusion", false},
80 {"fluid_earlystop", "config", "config", "config", "", "", "", false},
81 {"fluid_warmstart", "config", "", "", "", "", "", false},
82 {"fork_join", "config", "config", "option:fork_join", "--fork-join", "", "default,mmt,fjt,ht,heidelberger-trivedi", false},
83 {"gd_max_entries", "config", "", "", "", "", "", false},
84 {"gmres_restart", "config", "config", "", "", "", "", false},
85 {"hide_immediate", "config", "config", "config,option:hide_immediate", "", "", "", false},
86 {"highvar", "config", "config", "config", "", "", "default,none,hvmva,interp", false},
87 {"immediate_tol", "config", "config", "config", "", "", "", false},
88 {"init_cov", "config", "config", "config", "", "", "", false},
89 {"init_qcov", "config", "config", "config", "", "", "", false},
90 {"init_qlen", "config", "config", "config", "", "", "", false},
91 {"interlock", "config", "config", "config", "", "", "", true},
92 {"interlock_chain", "config", "config", "config", "", "", "", true},
93 {"interlock_maxpaths", "config", "config", "config", "--interlock-maxpaths", "", "", false},
94 {"interlock_method", "config", "config", "config", "--interlock-method", "", "ilrate,refpath,none", false},
95 {"interlock_refpath_scope", "config", "config", "config", "--interlock-refpath-scope", "", "merging,all", false},
96 {"interlocking", "config", "config", "config", "--no-interlocking", "", "", false},
97 {"ispn_maxlevel", "config", "config", "config", "--ispn-maxlevel", "", "", false},
98 {"ispn_place", "config", "config", "config", "--ispn-place", "", "", false},
99 {"kp_init_sol", "config", "config", "config", "", "", "", false},
100 {"layer_init", "config", "config", "config", "", "", "none,bound,boxbound,mw", false},
101 {"layering", "config", "config", "config", "--method", "", "srvn,flat,squashed", false},
102 {"linsolver", "config", "", "", "", "", ",gmres,bicgstab,power,jacobi,gaussseidel,sor,gth,direct", false},
103 {"lld", "config", "config", "config", "--lld", "", "", false},
104 {"ln_transient", "config", "config", "config", "--ln-transient", "", "coupled,decoupled", false},
105 {"ln_transient_channels", "config", "config", "config", "--ln-transient-channels", "", "", false},
106 {"ln_transient_iter_max", "config", "config", "config", "", "", "", false},
107 {"ln_transient_tol", "config", "config", "config", "", "", "", false},
108 {"lsoda_retry", "config", "", "", "", "", "", true},
109 {"map_env", "config", "config", "config", "--map-env", "", "auto,off,default", false},
110 {"map_env_maxstages", "config", "config", "config", "--map-env-maxstages", "", "", false},
111 {"map_env_method", "config", "config", "config", "--map-env-method", "", "auto,meanfield,dec,avg", false},
112 {"mapmsg_quantization", "config", "config", "config", "--mapmsg-quantization", "", "", false},
113 {"maxStates", "config", "option:AGOptions.maxStates", "config", "--max-states", "", "", false},
114 {"mcmc_batches", "config", "config", "config", "", "", "", false},
115 {"mcmc_burnin", "config", "config", "config", "", "", "", false},
116 {"mdd_maxiter", "config", "config", "config", "--mdd-maxiter", "", "", false},
117 {"mdd_tol", "config", "config", "config", "--mdd-tol", "", "", false},
118 {"mem_maxiter", "config", "", "config", "", "", "", false},
119 {"mem_tol", "config", "", "config", "", "", "", false},
120 {"mem_verbose", "config", "", "config", "", "", "", false},
121 {"merge", "config", "config", "config", "", "", "default,super,mixture,interpos", false},
122 {"mol_iter_max", "config", "config", "config", "--mol-iter-max", "", "", false},
123 {"mol_iter_tol", "config", "config", "config", "--mol-iter-tol", "", "", false},
124 {"mol_relax_factor", "config", "config", "config", "--mol-relax-factor", "", "", false},
125 {"moment_cov", "config", "config", "config", "", "", "", true},
126 {"moment_maxstate", "config", "config", "config", "", "", "", false},
127 {"moment_sigma2", "config", "config", "config", "", "", "", false},
128 {"mserbatch", "config", "option:LDESOptions.mserbatch", "option:mserbatch", "", "", "", false},
129 {"multiserver", "config", "config", "config", "--multiserver", "", "default,seidmann,softmin,suri,conway,erlang,krzesinski,rolia,reiser,zhou,schmidt,bruell,reiser-ps,rolia-ps,lld,exact,loaddep,load-dependent", false},
130 {"nhpp_sched", "config", "config", "config", "", "", "", false},
131 {"nlp_alpha", "config", "config", "config", "--nlp-alpha", "", "", false},
132 {"nlp_fork", "config", "config", "config", "--nlp-fork", "", "", false},
133 {"nlp_maxiter", "config", "config", "config", "--nlp-maxiter", "", "", false},
134 {"nlp_source", "", "", "config", "", "", "", false},
135 {"nlp_warm", "config", "config", "config", "--nlp-warm", "", "", false},
136 {"nonmkv", "config", "config", "config", "--nonmkv", "", "bernstein,none", false},
137 {"nonmkvorder", "config", "config", "config", "", "", "", false},
138 {"np_priority", "config", "config", "config", "", "", "default,cl,shadow", false},
139 {"nreplicas", "config", "config", "config", "", "", "", false},
140 {"num_cdf_pts", "config", "config", "config", "", "", "", false},
141 {"numthreads", "config", "option:LDESOptions.numThreads", "option:numthreads", "--ldes-numthreads", "", "", false},
142 {"nworkers", "config", "option:AGOptions.nworkers", "config", "", "", "", false},
143 {"obmoverlap", "config", "option:LDESOptions.obmoverlap", "option:obmoverlap", "", "", "", false},
144 {"orbit_maxlevel", "config", "config", "config", "", "", "", false},
145 {"orbit_tailtol", "config", "config", "config", "", "", "", false},
146 {"passage_method", "config", "config", "config", "--passage-method", "", "expm,lt", false},
147 {"phfit", "config", "config", "config", "", "", "cme,ph,hyperexp", false},
148 {"preserveDet", "config", "config", "config", "", "", "", false},
149 {"pstar", "config", "config", "config,option:pstar", "--pstar", "", "", false},
150 {"qbdphases_max", "config", "config", "config", "", "", "", false},
151 {"qrf_alpha", "config", "option:qrfAlpha", "config", "--qrf-alpha", "", "", false},
152 {"qrf_maxvars", "config", "", "config", "", "", "", false},
153 {"qrf_params", "config", "option:qrfParams", "config", "--qrf-params", "", "", false},
154 {"rate_sched", "config", "config", "config", "--rate-sched", "", "", false},
155 {"rate_traj", "config", "config:rate_traj_tgrid+rate_traj_mmat", "config", "", "", "", false},
156 {"relax", "config", "config", "config", "", "", "auto,fixed,adaptive,none", false},
157 {"relax_factor", "config", "config", "config", "", "", "", false},
158 {"relax_history", "config", "config", "config", "", "", "", false},
159 {"relax_min", "config", "config", "config", "", "", "", false},
160 {"remote", "config", "config", "option:remote", "--remote", "", "", false},
161 {"remote_url", "config", "config", "option:remote_url", "--remote-url", "", "", false},
162 {"replications", "config", "option:LDESOptions.replications,config", "config,option:replications", "--jmt-replications", "", "", false},
163 {"rqna_alpha", "config", "config", "config", "", "", "", false},
164 {"rqna_beta", "config", "config", "config", "", "", "", false},
165 {"rqna_feedback_elim", "config", "config", "config", "", "", "", false},
166 {"rqt_alpha_a", "config", "config", "config", "", "", "", false},
167 {"rqt_alpha_s", "config", "config", "config", "", "", "", false},
168 {"rqt_exact", "config", "config", "config", "", "", "", false},
169 {"rqt_regime", "config", "config", "config", "", "", "independent,default,normal,pareto", false},
170 {"runLengthPlan", "config", "config", "config", "", "", "", false},
171 {"sjn_lattice_max", "config", "config", "config", "", "", "", false},
172 {"sjn_lfactor", "config", "config", "config", "", "", "", false},
173 {"sjn_ns", "config", "config", "config", "", "", "", false},
174 {"sjn_umax", "config", "config", "config", "", "", "", false},
175 {"slotlength", "config", "option:LDESOptions.slotLength,config", "config,option:slot_length", "--slotlength", "slot_length", "", false},
176 {"slotted", "config", "option:LDESOptions.slotted,config", "config,option:slotted", "--slotted", "", "", false},
177 {"space_max", "config", "config", "config,option:space_max", "", "", "", false},
178 {"spectrallowfreqfrac", "config", "option:LDESOptions.spectralLowFreqFrac", "option:spectral_low_freq_frac", "", "spectralLowFreqFrac", "", false},
179 {"spn_bound", "config", "", "config", "", "", "", false},
180 {"spnlp_assumelive", "config", "", "config", "", "", "", false},
181 {"spnlp_init", "config", "", "config", "", "", "", false},
182 {"state_space_gen", "config", "config", "config", "", "", "", false},
183 {"stochiter", "config", "config", "config", "", "", "auto,rm,crn,off", false},
184 {"stochiter_a0", "config", "config", "config", "", "", "", false},
185 {"stochiter_alpha", "config", "config", "config", "", "", "", false},
186 {"stochiter_burnin", "config", "config", "config", "", "", "", false},
187 {"stochiter_conseq", "config", "config", "config", "", "", "", false},
188 {"symbolic", "config", "config", "config", "--symbolic", "", "", false},
189 {"symbolic_timeout", "config", "config", "config", "", "", "", false},
190 {"sync_phases", "config", "config", "config", "--sync-phases", "", "", false},
191 {"tbi_cells", "config", "config", "config", "", "", "", false},
192 {"tbi_cellsize", "config", "config", "config", "", "", "", false},
193 {"tbi_iter_max", "config", "config", "config", "", "", "", false},
194 {"tbi_iteration", "config", "", "", "", "", "", false},
195 {"tbi_parallel", "config", "", "", "", "", "", false},
196 {"tbi_tol", "config", "config", "config", "", "", "", false},
197 {"timescale", "config", "config", "config", "--timescale", "", "auto,discrete,continuous", false},
198 {"tranfilter", "config", "option:LDESOptions.tranfilter", "option:tranfilter", "--ldes-tranfilter", "", "mser5,fixed,none", false},
199 {"tranobs", "config", "option:LDESOptions.tranobs", "option:tranobs", "", "", "", false},
200 {"transform", "config", "config", "config", "", "", "", false},
201 {"transform_depth", "config", "config", "config", "", "", "", true},
202 {"transient_method", "config", "config", "config", "--transient-method", "", "ode,fau", false},
203 {"warmstart", "config", "config", "config", "--warmstart", "", "", false},
204 {"warmup", "", "config", "", "", "", "", false},
205 {"warmupfrac", "config", "option:LDESOptions.warmupfrac,config", "option:warmupfrac", "--warmupfrac", "", "", false},
206 {"worker_timeout", "config", "option:AGOptions.workerTimeout", "config", "", "", "", false},
207 }};
208 return keys;
209}
210
211/** The key spelled `name`, by its canonical name or an alias; nullptr when unknown. */
212inline const ConfigKey* config_key(const char* name) {
213 const std::size_t n = std::strlen(name);
214 for (const ConfigKey& k : config_schema()) {
215 if (std::strcmp(k.name, name) == 0) return &k;
216 for (const char* a = k.aliases; *a;) {
217 const char* e = std::strchr(a, ',');
218 const std::size_t len = e ? static_cast<std::size_t>(e - a) : std::strlen(a);
219 if (len == n && std::strncmp(a, name, n) == 0) return &k;
220 a = e ? e + 1 : a + len;
221 }
222 }
223 return nullptr;
224}
225
226/** Whether `value` is admissible for `k`: always true when the key lists no values. */
227inline bool config_value_ok(const ConfigKey& k, const char* value) {
228 if (!*k.values) return true;
229 const std::size_t n = std::strlen(value);
230 for (const char* a = k.values; *a;) {
231 const char* e = std::strchr(a, ',');
232 const std::size_t len = e ? static_cast<std::size_t>(e - a) : std::strlen(a);
233 if (len == n && std::strncmp(a, value, n) == 0) return true;
234 a = e ? e + 1 : a + len;
235 }
236 return false;
237}
238
239/**
240 * The config key a line-cli flag carries; nullptr when the flag carries none.
241 * --method carries the solver method: a key placed there (layering) only folds into it,
242 * so its values never constrain the flag.
243 */
244inline const ConfigKey* config_key_for_flag(const char* flag) {
245 if (std::strcmp(flag, "--method") == 0) return nullptr;
246 for (const ConfigKey& k : config_schema()) {
247 if (std::strcmp(k.cpp, flag) == 0) return &k;
248 }
249 return nullptr;
250}
251
252} // namespace solvers
253} // namespace line
const std::array< ConfigKey, 174 > & config_schema()
bool config_value_ok(const ConfigKey &k, const char *value)
Whether value is admissible for k: always true when the key lists no values.
const ConfigKey * config_key(const char *name)
The key spelled name, by its canonical name or an alias; nullptr when unknown.
const ConfigKey * config_key_for_flag(const char *flag)
The config key a line-cli flag carries; nullptr when the flag carries none.
Conservation laws of a layered queueing network, enumerated from its structure.
Definition aoi_dist2ph.h:51
One options.config key; an empty placement means "not implemented there".
const char * aliases
comma-separated
const char * values
comma-separated admissible values; empty when any string is taken