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