1 /* _______________________________________________________________________
2
3 DAKOTA: Design Analysis Kit for Optimization and Terascale Applications
4 Copyright 2014-2020 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
5 This software is distributed under the GNU Lesser General Public License.
6 For more information, see the README file in the top Dakota directory.
7 _______________________________________________________________________ */
8
9 //- Class: DataVariables
10 //- Description:
11 //-
12 //-
13 //- Owner: Mike Eldred
14 //- Version: $Id: DataVariables.hpp 7024 2010-10-16 01:24:42Z mseldre $
15
16 #ifndef DATA_VARIABLES_H
17 #define DATA_VARIABLES_H
18
19 #include "dakota_system_defs.hpp"
20 #include "dakota_global_defs.hpp" // for Cerr
21 #include "dakota_data_types.hpp"
22 #include "MPIPackBuffer.hpp"
23
24 namespace Dakota {
25
26 // special values for domain: Relaxed or Mixed
27 enum { DEFAULT_DOMAIN=0, RELAXED_DOMAIN, MIXED_DOMAIN };
28 // special values for active view: All, Design, {A+E,A,E} Uncertain, or State
29 enum { DEFAULT_VIEW=0, ALL_VIEW, DESIGN_VIEW, UNCERTAIN_VIEW,
30 ALEATORY_UNCERTAIN_VIEW, EPISTEMIC_UNCERTAIN_VIEW, STATE_VIEW };
31 // special values for active and inactive views include EMPTY_VIEW plus the
32 // 12 combinations of All, Design, {A+E,A,E} Uncertain, or State active view
33 // [6 total] and Relaxed or Mixed domain [2 total].
34 enum { EMPTY_VIEW=0, RELAXED_ALL, MIXED_ALL,
35 RELAXED_DESIGN, RELAXED_UNCERTAIN, RELAXED_ALEATORY_UNCERTAIN,
36 RELAXED_EPISTEMIC_UNCERTAIN, RELAXED_STATE,
37 MIXED_DESIGN, MIXED_UNCERTAIN, MIXED_ALEATORY_UNCERTAIN,
38 MIXED_EPISTEMIC_UNCERTAIN, MIXED_STATE };
39
40 /// values differentiating subsets of variables for I/O
41 enum { ALL_VARS=0, ACTIVE_VARS, INACTIVE_VARS};
42
43 // special values for SharedVariablesData::variablesComponents and
44 // SharedVariablesData::all*Types (Note: these differ from the
45 // pecos_global_defs.hpp enumeration, which is focused on ranVarTypesX/U)
46 enum { EMPTY_TYPE=0, CONTINUOUS_DESIGN, DISCRETE_DESIGN_RANGE,
47 DISCRETE_DESIGN_SET_INT, DISCRETE_DESIGN_SET_STRING,
48 DISCRETE_DESIGN_SET_REAL, NORMAL_UNCERTAIN, LOGNORMAL_UNCERTAIN,
49 UNIFORM_UNCERTAIN, LOGUNIFORM_UNCERTAIN, TRIANGULAR_UNCERTAIN,
50 EXPONENTIAL_UNCERTAIN, BETA_UNCERTAIN, GAMMA_UNCERTAIN, GUMBEL_UNCERTAIN,
51 FRECHET_UNCERTAIN, WEIBULL_UNCERTAIN, HISTOGRAM_BIN_UNCERTAIN,
52 POISSON_UNCERTAIN, BINOMIAL_UNCERTAIN, NEGATIVE_BINOMIAL_UNCERTAIN,
53 GEOMETRIC_UNCERTAIN, HYPERGEOMETRIC_UNCERTAIN,
54 HISTOGRAM_POINT_UNCERTAIN_INT, HISTOGRAM_POINT_UNCERTAIN_STRING,
55 HISTOGRAM_POINT_UNCERTAIN_REAL, CONTINUOUS_INTERVAL_UNCERTAIN,
56 DISCRETE_INTERVAL_UNCERTAIN, DISCRETE_UNCERTAIN_SET_INT,
57 DISCRETE_UNCERTAIN_SET_STRING, DISCRETE_UNCERTAIN_SET_REAL,
58 CONTINUOUS_STATE, DISCRETE_STATE_RANGE, DISCRETE_STATE_SET_INT,
59 DISCRETE_STATE_SET_STRING, DISCRETE_STATE_SET_REAL };
60
61 // special values for indexing of SharedVariablesData::variablesCompsTotals;
62 // last value is used for sizing arrays of vars_comps_totals
63 enum { TOTAL_CDV=0, TOTAL_DDIV, TOTAL_DDSV, TOTAL_DDRV,
64 TOTAL_CAUV, TOTAL_DAUIV, TOTAL_DAUSV, TOTAL_DAURV,
65 TOTAL_CEUV, TOTAL_DEUIV, TOTAL_DEUSV, TOTAL_DEURV,
66 TOTAL_CSV, TOTAL_DSIV, TOTAL_DSSV, TOTAL_DSRV,
67 NUM_VC_TOTALS };
68
69
70 /// Body class for variables specification data.
71
72 /** The DataVariablesRep class is used to contain the data from a
73 variables keyword specification. Default values are managed in
74 the DataVariablesRep constructor. Data is public to avoid
75 maintaining set/get functions, but is still encapsulated within
76 ProblemDescDB since ProblemDescDB::dataVariablesList is private. */
77
78 class DataVariablesRep
79 {
80 //
81 //- Heading: Friends
82 //
83
84 /// the handle class can access attributes of the body class directly
85 friend class DataVariables;
86
87 //private:
88 public:
89
90 ~DataVariablesRep(); ///< destructor
91
92 //
93 //- Heading: Data
94 //
95
96 /// string identifier for the variables specification data set
97 /// (from the \c id_variables specification in \ref VarSetId)
98 String idVariables;
99 /// user selection/override of variables view: {DEFAULT,ALL,DESIGN,
100 /// UNCERTAIN,ALEATORY_UNCERTAIN,EPISTEMIC_UNCERTAIN,STATE}_VIEW
101 short varsView;
102 /// user selection/override of variables domain:
103 /// {DEFAULT,MIXED,RELAXED}_DOMAIN
104 short varsDomain;
105 /// flag indicating user specification of initial points (for local
106 /// optimization-based UQ methods) for at least one uncertain variable type
107 bool uncertainVarsInitPt;
108 /// number of continuous design variables (from the \c continuous_design
109 /// specification in \ref VarDV)
110 size_t numContinuousDesVars;
111 /// number of discrete design variables defined by an integer range
112 /// (from the \c discrete_design_range specification in \ref VarDV)
113 size_t numDiscreteDesRangeVars;
114 /// number of discrete design variables defined by a set of integers
115 /// (from the \c discrete_design_set integer specification in \ref VarDV)
116 size_t numDiscreteDesSetIntVars;
117 /// number of discrete design variables defined by a set of strings
118 /// (from the \c discrete_design_set string specification in \ref VarDV)
119 size_t numDiscreteDesSetStrVars;
120 /// number of discrete design variables defined by a set of reals
121 /// (from the \c discrete_design_set real specification in \ref VarDV)
122 size_t numDiscreteDesSetRealVars;
123 /// number of normal uncertain variables (from the \c normal_uncertain
124 /// specification in \ref VarAUV)
125 size_t numNormalUncVars;
126 /// number of lognormal uncertain variables (from the \c lognormal_uncertain
127 /// specification in \ref VarAUV)
128 size_t numLognormalUncVars;
129 /// number of uniform uncertain variables (from the \c uniform_uncertain
130 /// specification in \ref VarAUV)
131 size_t numUniformUncVars;
132 /// number of loguniform uncertain variables (from the \c
133 /// loguniform_uncertain specification in \ref VarAUV)
134 size_t numLoguniformUncVars;
135 /// number of triangular uncertain variables (from the \c
136 /// triangular_uncertain specification in \ref VarAUV)
137 size_t numTriangularUncVars;
138 /// number of exponential uncertain variables (from the \c
139 /// exponential_uncertain specification in \ref VarAUV)
140 size_t numExponentialUncVars;
141 /// number of beta uncertain variables (from the \c beta_uncertain
142 /// specification in \ref VarAUV)
143 size_t numBetaUncVars;
144 /// number of gamma uncertain variables (from the \c gamma_uncertain
145 /// specification in \ref VarAUV)
146 size_t numGammaUncVars;
147 /// number of gumbel uncertain variables (from the \c gumbel_uncertain
148 /// specification in \ref VarAUV)
149 size_t numGumbelUncVars;
150 /// number of frechet uncertain variables (from the \c frechet_uncertain
151 /// specification in \ref VarAUV)
152 size_t numFrechetUncVars;
153 /// number of weibull uncertain variables (from the \c weibull_uncertain
154 /// specification in \ref VarAUV)
155 size_t numWeibullUncVars;
156 /// number of histogram bin uncertain variables (from the \c
157 /// histogram_bin_uncertain specification in \ref VarAUV)
158 size_t numHistogramBinUncVars;
159 /// number of Poisson uncertain variables (from the \c
160 /// poisson_uncertain specification in \ref VarAUV)
161 size_t numPoissonUncVars;
162 /// number of binomial uncertain variables (from the \c
163 /// binomial_uncertain specification in \ref VarAUV)
164 size_t numBinomialUncVars;
165 /// number of negative binomial uncertain variables (from the \c
166 /// negative_binomial_uncertain specification in \ref VarAUV)
167 size_t numNegBinomialUncVars;
168 /// number of geometric uncertain variables (from the \c
169 /// geometric_uncertain specification in \ref VarAUV
170 size_t numGeometricUncVars;
171 /// number of hypergeometric uncertain variables (from the \c
172 /// hypergeometric_uncertain specification in \ref VarAUV))
173 size_t numHyperGeomUncVars;
174 /// number of integer-valued histogram point uncertain variables (from the \c
175 /// histogram_point_uncertain specification in \ref VarAUV)
176 size_t numHistogramPtIntUncVars;
177 /// number of string-valued histogram point uncertain variables (from the \c
178 /// histogram_point_uncertain specification in \ref VarAUV)
179 size_t numHistogramPtStrUncVars;
180 /// number of real-valued histogram point uncertain variables (from the \c
181 /// histogram_point_uncertain specification in \ref VarAUV)
182 size_t numHistogramPtRealUncVars;
183 /// number of continuous epistemic interval uncertain variables (from
184 /// the \c continuous_interval_uncertain specification in \ref VarEUV)
185 size_t numContinuousIntervalUncVars;
186 /// number of discrete epistemic interval uncertain variables (from the
187 /// \c discrete_interval_uncertain specification in \ref VarEUV)
188 size_t numDiscreteIntervalUncVars;
189 /// number of discrete epistemic uncertain integer set variables (from
190 /// the \c discrete_uncertain_set integer specification in \ref VarEUV)
191 size_t numDiscreteUncSetIntVars;
192 /// number of discrete epistemic uncertain string set variables (from
193 /// the \c discrete_uncertain_set string specification in \ref VarEUV)
194 size_t numDiscreteUncSetStrVars;
195 /// number of discrete epistemic uncertain real set variables (from
196 /// the \c discrete_uncertain_set real specification in \ref VarEUV)
197 size_t numDiscreteUncSetRealVars;
198 /// number of continuous state variables (from the \c continuous_state
199 /// specification in \ref VarSV)
200 size_t numContinuousStateVars;
201 /// number of discrete state variables defined by an integer range
202 /// (from the \c discrete_state_range specification in \ref VarDV)
203 size_t numDiscreteStateRangeVars;
204 /// number of discrete state variables defined by a set of integers
205 /// (from the \c discrete_state_set integer specification in \ref VarDV)
206 size_t numDiscreteStateSetIntVars;
207 /// number of discrete state variables defined by a set of strings
208 /// (from the \c discrete_state_set string specification in \ref VarDV)
209 size_t numDiscreteStateSetStrVars;
210 /// number of discrete state variables defined by a set of reals
211 /// (from the \c discrete_state_set real specification in \ref VarDV)
212 size_t numDiscreteStateSetRealVars;
213
214 // Design arrays
215
216 /// initial values for the continuous design variables array (from
217 /// the \c continuous_design \c initial_point specification in \ref VarDV)
218 RealVector continuousDesignVars;
219 /// lower bounds array for the continuous design variables (from the
220 /// \c continuous_design \c lower_bounds specification in \ref VarDV)
221 RealVector continuousDesignLowerBnds;
222 /// upper bounds array for the continuous design variables (from the
223 /// \c continuous_design \c upper_bounds specification in \ref VarDV)
224 RealVector continuousDesignUpperBnds;
225 /// scale types array for the continuous design variables (from the
226 /// \c continuous_design \c scale_types specification in \ref VarDV)
227 StringArray continuousDesignScaleTypes;
228 /// scales array for the continuous design variables (from the
229 /// \c continuous_design \c scales specification in \ref VarDV)
230 RealVector continuousDesignScales;
231
232 /// initial values for the discrete design variables defined by an
233 /// integer range (from the \c discrete_design_range \c initial_point
234 /// specification in \ref VarDV)
235 IntVector discreteDesignRangeVars;
236 /// lower bounds array for the discrete design variables defined by an
237 /// integer range (from the \c discrete_design_range \c lower_bounds
238 /// specification in \ref VarDV)
239 IntVector discreteDesignRangeLowerBnds;
240 /// upper bounds array for the discrete design variables defined
241 /// by an integer range(from the \c discrete_design_range \c
242 /// upper_bounds specification in \ref VarDV)
243 IntVector discreteDesignRangeUpperBnds;
244 /// is each ddr var strictly categorical (true) or relaxable (false)
245 BitArray discreteDesignRangeCat;
246
247 /// initial values for the discrete design variables defined by an
248 /// integer set (from the \c discrete_design_set integer \c initial_point
249 /// specification in \ref VarDV)
250 IntVector discreteDesignSetIntVars;
251 /// initial values for the discrete design variables defined by a
252 /// string set (from the \c discrete_design_set string \c initial_point
253 /// specification in \ref VarDV)
254 StringArray discreteDesignSetStrVars;
255 /// initial values for the discrete design variables defined by a
256 /// real set (from the \c discrete_design_set real \c initial_point
257 /// specification in \ref VarDV)
258 RealVector discreteDesignSetRealVars;
259 /// complete set of admissible values for each of the discrete design
260 /// variables defined by an integer set (from the
261 /// \c discrete_design_set integer \c set_values specification in \ref VarDV)
262 IntSetArray discreteDesignSetInt;
263 /// complete set of admissible values for each of the discrete design
264 /// variables defined by a string set (from the
265 /// \c discrete_design_set string \c set_values specification in \ref VarDV)
266 StringSetArray discreteDesignSetStr;
267 /// complete set of admissible values for each of the discrete design
268 /// variables defined by a real set (from the \c discrete_design_set real
269 /// \c set_values specification in \ref VarDV)
270 RealSetArray discreteDesignSetReal;
271
272 /// is each ddsi var strictly categorical (true) or relaxable (false)
273 BitArray discreteDesignSetIntCat;
274 /// is each ddsr var strictly categorical (true) or relaxable (false)
275 BitArray discreteDesignSetRealCat;
276
277 /// Adjacency matrices for each of the discrete design variables defined
278 /// by an integer set (from the \c discrete_design_set integer
279 /// \c categorical \c adjacency specification in \ref VarDV
280 RealMatrixArray discreteDesignSetIntAdj;
281 /// Adjacency matrices for each of the discrete design variables defined
282 /// by a string set (from the \c discrete_design_set string
283 /// \c adjacency specification in \ref VarDV
284 RealMatrixArray discreteDesignSetStrAdj;
285 /// Adjacency matrices for each of the discrete design variables defined
286 /// by a real set (from the \c discrete_design_set real
287 /// \c categorical \c adjacency specification in \ref VarDV
288 RealMatrixArray discreteDesignSetRealAdj;
289
290 /// labels array for the continuous design variables (from the
291 /// \c continuous_design \c descriptors specification in \ref VarDV)
292 StringArray continuousDesignLabels;
293 /// labels array for the discrete design variables defined by an
294 /// integer range (from the \c discrete_design_range \c descriptors
295 /// specification in \ref VarDV)
296 StringArray discreteDesignRangeLabels;
297 /// labels array for the discrete design variables defined by an
298 /// integer set (from the \c discrete_design set int \c descriptors
299 /// specification in \ref VarDV)
300 StringArray discreteDesignSetIntLabels;
301 /// labels array for the discrete design variables defined by a
302 /// string set (from the \c discrete_design_set string \c descriptors
303 /// specification in \ref VarDV)
304 StringArray discreteDesignSetStrLabels;
305 /// labels array for the discrete design variables defined by a
306 /// real set (from the \c discrete_design_set real; \c descriptors
307 /// specification in \ref VarDV)
308 StringArray discreteDesignSetRealLabels;
309
310 // Aleatory uncertain arrays
311
312 /// means of the normal uncertain variables (from the \c means
313 /// specification in \ref VarCAUV_Normal)
314 RealVector normalUncMeans;
315 /// standard deviations of the normal uncertain variables (from
316 /// the \c std_deviations specification in \ref VarCAUV_Normal)
317 RealVector normalUncStdDevs;
318 /// distribution lower bounds for the normal uncertain variables
319 /// (from the \c lower_bounds specification in \ref VarCAUV_Normal)
320 RealVector normalUncLowerBnds;
321 /// distribution upper bounds for the normal uncertain variables
322 /// (from the \c upper_bounds specification in \ref VarCAUV_Normal)
323 RealVector normalUncUpperBnds;
324 /// initial values of the normal uncertain variables (from the \c
325 /// initial_point specification in \ref VarCAUV_Normal)
326 RealVector normalUncVars;
327 /// lambdas (means of the corresponding normals) of the lognormal uncertain
328 /// variables (from the \c lambdas specification in \ref VarCAUV_Lognormal)
329 RealVector lognormalUncLambdas;
330 /// zetas (standard deviations of the corresponding normals) of the
331 /// lognormal uncertain variables (from the \c zetas specification
332 /// in \ref VarCAUV_Lognormal)
333 RealVector lognormalUncZetas;
334 /// means of the lognormal uncertain variables (from the \c
335 /// means specification in \ref VarCAUV_Lognormal)
336 RealVector lognormalUncMeans;
337 /// standard deviations of the lognormal uncertain variables (from
338 /// the \c std_deviations specification in \ref VarCAUV_Lognormal)
339 RealVector lognormalUncStdDevs;
340 /// error factors for the lognormal uncertain variables (from
341 /// the \c error_factors specification in \ref VarCAUV_Lognormal)
342 RealVector lognormalUncErrFacts;
343 /// distribution lower bounds for the lognormal uncertain variables
344 /// (from the \c lower_bounds specification in \ref VarCAUV_Lognormal)
345 RealVector lognormalUncLowerBnds;
346 /// distribution upper bounds for the lognormal uncertain variables
347 /// (from the \c upper_bounds specification in \ref VarCAUV_Lognormal)
348 RealVector lognormalUncUpperBnds;
349 /// initial values of the lognormal uncertain variables (from the \c
350 /// initial_point specification in \ref VarCAUV_Lognormal)
351 RealVector lognormalUncVars;
352 /// distribution lower bounds for the uniform uncertain variables
353 /// (from the \c lower_bounds specification in \ref VarCAUV_Uniform)
354 RealVector uniformUncLowerBnds;
355 /// distribution upper bounds for the uniform uncertain variables
356 /// (from the \c upper_bounds specification in \ref VarCAUV_Uniform)
357 RealVector uniformUncUpperBnds;
358 /// initial values of the uniform uncertain variables (from the \c
359 /// initial_point specification in \ref VarCAUV_Uniform)
360 RealVector uniformUncVars;
361 /// distribution lower bounds for the loguniform uncertain variables
362 /// (from the \c lower_bounds specification in \ref VarCAUV_Loguniform)
363 RealVector loguniformUncLowerBnds;
364 /// distribution upper bounds for the loguniform uncertain variables
365 /// (from the \c upper_bounds specification in \ref VarCAUV_Loguniform)
366 RealVector loguniformUncUpperBnds;
367 /// initial values of the loguniform uncertain variables (from the \c
368 /// initial_point specification in \ref VarCAUV_Loguniform)
369 RealVector loguniformUncVars;
370 /// modes of the triangular uncertain variables (from the \c modes
371 /// specification in \ref VarCAUV_Triangular)
372 RealVector triangularUncModes;
373 /// distribution lower bounds for the triangular uncertain variables
374 /// (from the \c lower_bounds specification in \ref VarCAUV_Triangular)
375 RealVector triangularUncLowerBnds;
376 /// distribution upper bounds for the triangular uncertain variables
377 /// (from the \c upper_bounds specification in \ref VarCAUV_Triangular)
378 RealVector triangularUncUpperBnds;
379 /// initial values of the triangular uncertain variables (from the \c
380 /// initial_point specification in \ref VarCAUV_Triangular)
381 RealVector triangularUncVars;
382 /// beta factors for the exponential uncertain variables (from
383 /// the \c betas specification in \ref VarCAUV_Exponential)
384 RealVector exponentialUncBetas;
385 /// initial values of the exponential uncertain variables (from the \c
386 /// initial_point specification in \ref VarCAUV_Exponential)
387 RealVector exponentialUncVars;
388 /// alpha factors for the beta uncertain variables (from
389 /// the \c means specification in \ref VarCAUV_Beta)
390 RealVector betaUncAlphas;
391 /// beta factors for the beta uncertain variables (from
392 /// the \c std_deviations specification in \ref VarCAUV_Beta)
393 RealVector betaUncBetas;
394 /// distribution lower bounds for the beta uncertain variables
395 /// (from the \c lower_bounds specification in \ref VarCAUV_Beta)
396 RealVector betaUncLowerBnds;
397 /// distribution upper bounds for the beta uncertain variables
398 /// (from the \c upper_bounds specification in \ref VarCAUV_Beta)
399 RealVector betaUncUpperBnds;
400 /// initial values of the beta uncertain variables (from the \c
401 /// initial_point specification in \ref VarCAUV_Beta)
402 RealVector betaUncVars;
403 /// alpha factors for the gamma uncertain variables (from
404 /// the \c alphas specification in \ref VarCAUV_Gamma)
405 RealVector gammaUncAlphas;
406 /// beta factors for the gamma uncertain variables (from
407 /// the \c betas specification in \ref VarCAUV_Gamma)
408 RealVector gammaUncBetas;
409 /// initial values of the gamma uncertain variables (from the \c
410 /// initial_point specification in \ref VarCAUV_Gamma)
411 RealVector gammaUncVars;
412 /// alpha factors for the gumbel uncertain variables (from the \c
413 /// alphas specification in \ref VarCAUV_Gumbel)
414 RealVector gumbelUncAlphas;
415 /// beta factors for of the gumbel uncertain variables (from
416 /// the \c betas specification in \ref VarCAUV_Gumbel)
417 RealVector gumbelUncBetas;
418 /// initial values of the gumbel uncertain variables (from the \c
419 /// initial_point specification in \ref VarCAUV_Gumbel)
420 RealVector gumbelUncVars;
421 /// alpha factors for the frechet uncertain variables (from
422 /// the \c alphas specification in \ref VarCAUV_Frechet)
423 RealVector frechetUncAlphas;
424 /// beta factors for the frechet uncertain variables (from
425 /// the \c betas specification in \ref VarCAUV_Frechet)
426 RealVector frechetUncBetas;
427 /// initial values of the frechet uncertain variables (from the \c
428 /// initial_point specification in \ref VarCAUV_Frechet)
429 RealVector frechetUncVars;
430 /// alpha factors for the weibull uncertain variables (from
431 /// the \c alphas specification in \ref VarCAUV_Weibull)
432 RealVector weibullUncAlphas;
433 /// beta factors for the weibull uncertain variables (from
434 /// the \c betas specification in \ref VarCAUV_Weibull)
435 RealVector weibullUncBetas;
436 /// initial values of the weibull uncertain variables (from the \c
437 /// initial_point specification in \ref VarCAUV_Weibull)
438 RealVector weibullUncVars;
439
440 /// An array for each real-valued bin-based histogram uncertain variable.
441 /// Each array entry is a map from a real value to its probability (from the
442 /// \c histogram_bin_uncertain specification in \ref VarCAUV_Bin_Histogram;
443 /// see also continuous_linear variable type in LHS manual). Note: bin
444 /// widths may be unequal and any (x,c) count specifications are converted
445 /// to (x,y) ordinates (probability densities) within Vchk_HistogramBinUnc()
446 /// in the NIDR parser.
447 RealRealMapArray histogramUncBinPairs;
448 /// initial values of the histogram bin uncertain variables (from the
449 /// \c initial_point specification in \ref VarCAUV_Bin_Histogram)
450 RealVector histogramBinUncVars;
451
452 // discrete types
453
454 /// lambdas (rate parameter) for the poisson uncertain variables (from
455 /// the \c lambdas specification in \ref VarDAUV_Poisson)
456 RealVector poissonUncLambdas;
457 /// initial values of the poisson uncertain variables (from the \c
458 /// initial_point specification in \ref VarDAUV_Poisson)
459 IntVector poissonUncVars;
460 /// is each poisson var strictly categorical (true) or relaxable (false)
461 BitArray poissonUncCat;
462
463 /// probabilities per each trial (p) for the binomial uncertain variables
464 /// from the \c prob_per_trial specification in \ref VarDAUV_Binomial)
465 RealVector binomialUncProbPerTrial;
466 /// Number of trials (N) for the binomial uncertain variables
467 /// from the \c num_trials specification in \ref VarDAUV_Binomial)
468 IntVector binomialUncNumTrials;
469 /// initial values of the binomial uncertain variables (from the \c
470 /// initial_point specification in \ref VarDAUV_Binomial)
471 IntVector binomialUncVars;
472 /// is each binomial var strictly categorical (true) or relaxable (false)
473 BitArray binomialUncCat;
474
475 /// probabilities per each trial (p) for the negative binomial
476 /// uncertain variables from the \c prob_per_trial specification in
477 /// \ref VarDAUV_Negative_Binomial)
478 RealVector negBinomialUncProbPerTrial;
479 /// Number of trials (N) for the negative binomial uncertain variables
480 /// from the \c num_trials specification in \ref VarDAUV_Negative_Binomial)
481 IntVector negBinomialUncNumTrials;
482 /// initial values of the negative binomial uncertain variables (from the
483 /// \c initial_point specification in \ref VarDAUV_Negative_Binomial)
484 IntVector negBinomialUncVars;
485 /// is each negbinomial var strictly categorical (true) or relaxable (false)
486 BitArray negBinomialUncCat;
487
488 /// probabilities per each trial (p) for the geometric uncertain variables
489 /// from the \c prob_per_trial specification in \ref VarDAUV_Geometric)
490 RealVector geometricUncProbPerTrial;
491 /// initial values of the geometric uncertain variables (from the \c
492 /// initial_point specification in \ref VarDAUV_Geometric)
493 IntVector geometricUncVars;
494 /// is each geometric var strictly categorical (true) or relaxable (false)
495 BitArray geometricUncCat;
496
497 /// Size of total populations (N) for the hypergeometric uncertain variables
498 /// from the \c total_population specification in \ref VarDAUV_Hypergeometric)
499 IntVector hyperGeomUncTotalPop;
500 /// Size of selected populations for the hypergeometric uncertain
501 /// variables from the \c selected_population specification in \ref
502 /// VarDAUV_Hypergeometric)
503 IntVector hyperGeomUncSelectedPop;
504 /// Number failed in the selected populations for the hypergeometric variables
505 /// from the \c num_drawn specification in \ref VarDAUV_Hypergeometric)
506 IntVector hyperGeomUncNumDrawn;
507 /// initial values of the hypergeometric uncertain variables (from the
508 /// \c initial_point specification in \ref VarDAUV_Hypergeometric)
509 IntVector hyperGeomUncVars;
510 /// is each hypergeom var strictly categorical (true) or relaxable (false)
511 BitArray hyperGeomUncCat;
512
513 /// An array for each integer-valued point-based histogram uncertain
514 /// variable. Each array entry is a map from an integer value to its
515 /// probability. (See discrete histogram in LHS manual; from the \c
516 /// histogram_point_uncertain specification in \ref
517 /// VarDAUV_Point_Histogram)
518 IntRealMapArray histogramUncPointIntPairs;
519 /// initial values of the real-valued histogram point uncertain
520 /// variables (from the \c initial_point specification in \ref
521 /// VarDAUV_Point_Histogram)
522 IntVector histogramPointIntUncVars;
523 /// is each hupi var strictly categorical (true) or relaxable (false)
524 BitArray histogramUncPointIntCat;
525
526 /// An array for each string-valued point-based histogram uncertain
527 /// variable. Each array entry is a map from a string value to its
528 /// probability. (See discrete histogram in LHS manual; from the \c
529 /// histogram_point_uncertain specification in \ref
530 /// VarDAUV_Point_Histogram)
531 StringRealMapArray histogramUncPointStrPairs;
532 /// initial values of the real-valued histogram point uncertain
533 /// variables (from the \c initial_point specification in \ref
534 /// VarDAUV_Point_Histogram)
535 StringArray histogramPointStrUncVars;
536 // string variables cannot be relaxed, no categorical option
537
538 /// An array for each real-valued point-based histogram uncertain
539 /// variable. Each array entry is a map from a real value to its
540 /// probability. (See discrete histogram in LHS manual; from the \c
541 /// histogram_point_uncertain specification in \ref
542 /// VarDAUV_Point_Histogram)
543 RealRealMapArray histogramUncPointRealPairs;
544 /// initial values of the real-valued histogram point uncertain
545 /// variables (from the \c initial_point specification in \ref
546 /// VarDAUV_Point_Histogram)
547 RealVector histogramPointRealUncVars;
548 /// is each hupr var strictly categorical (true) or relaxable (false)
549 BitArray histogramUncPointRealCat;
550
551 /// correlation matrix for all uncertain variables (from the \c
552 /// uncertain_correlation_matrix specification in \ref
553 /// VarAUV_Correlations). This matrix specifies rank correlations
554 /// for LHS sampling and correlation coefficients (rho_ij =
555 /// normalized covariance matrix) for other methods.
556 RealSymMatrix uncertainCorrelations;
557
558 // Epistemic uncertain arrays
559
560 /// Probability values per interval cell per epistemic interval uncertain
561 /// variable (from the \c continuous_interval_uncertain \c interval_probs
562 /// specification in \ref VarCEUV_Interval)
563 RealRealPairRealMapArray continuousIntervalUncBasicProbs;
564 /// initial values of the continuous interval uncertain variables
565 /// (from the \c initial_point specification in \ref VarCEUV_Interval)
566 RealVector continuousIntervalUncVars;
567
568 /// Probability values per interval cell per epistemic interval uncertain
569 /// variable (from the \c discrete_interval_uncertain \c interval_probs
570 /// specification in \ref VarDIUV)
571 IntIntPairRealMapArray discreteIntervalUncBasicProbs;
572 /// initial values of the discrete interval uncertain variables
573 /// (from the \c initial_point specification in \ref VarDIUV)
574 IntVector discreteIntervalUncVars;
575 /// is each diu var strictly categorical (true) or relaxable (false)
576 BitArray discreteIntervalUncCat;
577
578 /// complete set of admissible values with associated basic probability
579 /// assignments for each of the discrete epistemic uncertain variables
580 /// defined by an integer set (from the \c discrete_uncertain_set integer
581 /// \c set_values specification in \ref VarDUSIV)
582 IntRealMapArray discreteUncSetIntValuesProbs;
583 /// initial values of the discrete uncertain set integer variables
584 /// (from the \c initial_point specification in \ref VarDUSIV)
585 IntVector discreteUncSetIntVars;
586 /// is each dusi var strictly categorical (true) or relaxable (false)
587 BitArray discreteUncSetIntCat;
588
589 /// complete set of admissible values with associated basic probability
590 /// assignments for each of the discrete epistemic uncertain variables
591 /// defined by a string set (from the \c discrete_uncertain_set string
592 /// \c set_values specification in \ref VarDUSIV)
593 StringRealMapArray discreteUncSetStrValuesProbs;
594 /// initial values of the discrete uncertain set integer variables
595 /// (from the \c initial_point specification in \ref VarDUSIV)
596 StringArray discreteUncSetStrVars;
597
598 /// complete set of admissible values with associated basic probability
599 /// assignments for each of the discrete epistemic uncertain variables
600 /// defined by a real set (from the \c discrete_uncertain_set_ eal
601 /// \c set_values specification in \ref VarDUSRV)
602 RealRealMapArray discreteUncSetRealValuesProbs;
603 /// initial values of the discrete uncertain set real variables
604 /// (from the \c initial_point specification in \ref VarDUSRV)
605 RealVector discreteUncSetRealVars;
606 /// is each dusr var strictly categorical (true) or relaxable (false)
607 BitArray discreteUncSetRealCat;
608
609 // State arrays
610
611 /// initial values for the continuous state variables array (from
612 /// the \c continuous_state \c initial_point specification in \ref VarSV)
613 RealVector continuousStateVars;
614 /// lower bounds array for the continuous state variables (from the
615 /// \c continuous_state \c lower_bounds specification in \ref VarSV)
616 RealVector continuousStateLowerBnds;
617 /// upper bounds array for the continuous state variables (from the
618 /// \c continuous_state \c upper_bounds specification in \ref VarSV)
619 RealVector continuousStateUpperBnds;
620
621 /// initial values for the discrete state variables defined by an
622 /// integer range (from the \c discrete_state_range \c initial_point
623 /// specification in \ref VarSV)
624 IntVector discreteStateRangeVars;
625 /// lower bounds array for the discrete state variables defined by an
626 /// integer range (from the \c discrete_state_range \c lower_bounds
627 /// specification in \ref VarSV)
628 IntVector discreteStateRangeLowerBnds;
629 /// upper bounds array for the discrete state variables defined
630 /// by an integer range(from the \c discrete_state_range \c
631 /// upper_bounds specification in \ref VarSV)
632 IntVector discreteStateRangeUpperBnds;
633 /// is each dsr var strictly categorical (true) or relaxable (false)
634 BitArray discreteStateRangeCat;
635
636 /// initial values for the discrete state variables defined by an
637 /// integer set (from the \c discrete_state_set integer \c initial_point
638 /// specification in \ref VarSV)
639 IntVector discreteStateSetIntVars;
640 /// initial values for the discrete state variables defined by a
641 /// string set (from the \c discrete_state_set string \c initial_point
642 /// specification in \ref VarSV)
643 StringArray discreteStateSetStrVars;
644 /// initial values for the discrete state variables defined by a
645 /// real set (from the \c discrete_state_set real \c initial_point
646 /// specification in \ref VarSV)
647 RealVector discreteStateSetRealVars;
648
649 /// complete set of admissible values for each of the discrete state
650 /// variables defined by an integer set (from the
651 /// \c discrete_state_set integer \c set_values specification in \ref VarSV)
652 IntSetArray discreteStateSetInt;
653 /// complete set of admissible values for each of the discrete state
654 /// variables defined by a string set (from the \c discrete_state_set string
655 /// \c set_values specification in \ref VarSV)
656 StringSetArray discreteStateSetStr;
657 /// complete set of admissible values for each of the discrete state
658 /// variables defined by a real set (from the \c discrete_state_set real
659 /// \c set_values specification in \ref VarSV)
660 RealSetArray discreteStateSetReal;
661
662 /// is each dssi var strictly categorical (true) or relaxable (false)
663 BitArray discreteStateSetIntCat;
664 /// is each dssr var strictly categorical (true) or relaxable (false)
665 BitArray discreteStateSetRealCat;
666
667 /// labels array for the continuous state variables (from the
668 /// \c continuous_state \c descriptors specification in \ref VarSV)
669 StringArray continuousStateLabels;
670 /// labels array for the discrete state variables defined by an
671 /// integer range (from the \c discrete_state_range \c descriptors
672 /// specification in \ref VarSV)
673 StringArray discreteStateRangeLabels;
674 /// labels array for the discrete state variables defined by an
675 /// integer set (from the \c discrete_state_set \c descriptors
676 /// specification in \ref VarSV)
677 StringArray discreteStateSetIntLabels;
678 /// labels array for the discrete state variables defined by a
679 /// string set (from the \c discrete_state_set \c descriptors
680 /// specification in \ref VarSV)
681 StringArray discreteStateSetStrLabels;
682 /// labels array for the discrete state variables defined by a
683 /// real set (from the \c discrete_state_set \c descriptors
684 /// specification in \ref VarSV)
685 StringArray discreteStateSetRealLabels;
686
687 // Inferred arrays
688
689 /// discrete design integer set lower bounds inferred from set values
690 IntVector discreteDesignSetIntLowerBnds;
691 /// discrete design integer set upper bounds inferred from set values
692 IntVector discreteDesignSetIntUpperBnds;
693 /// discrete design string set lower bounds inferred from set values
694 StringArray discreteDesignSetStrLowerBnds;
695 /// discrete design stinr set upper bounds inferred from set values
696 StringArray discreteDesignSetStrUpperBnds;
697 /// discrete design real set lower bounds inferred from set values
698 RealVector discreteDesignSetRealLowerBnds;
699 /// discrete design real set upper bounds inferred from set values
700 RealVector discreteDesignSetRealUpperBnds;
701 /// array of values for all continuous aleatory uncertain variables
702 RealVector continuousAleatoryUncVars;
703 /// distribution lower bounds for all continuous aleatory uncertain variables
704 /// (collected from \c nuv_lower_bounds, \c lnuv_lower_bounds,
705 /// \c uuv_lower_bounds, \c luuv_lower_bounds, \c tuv_lower_bounds,
706 /// and \c buv_lower_bounds specifications in \ref VarAUV, and derived
707 /// for gamma, gumbel, frechet, weibull and histogram bin specifications)
708 RealVector continuousAleatoryUncLowerBnds;
709 /// distribution upper bounds for all continuous aleatory uncertain variables
710 /// (collected from \c nuv_upper_bounds, \c lnuv_upper_bounds,
711 /// \c uuv_upper_bounds, \c luuv_upper_bounds, \c tuv_lower_bounds,
712 /// and \c buv_upper_bounds specifications in \ref VarAUV, and derived
713 /// for gamma, gumbel, frechet, weibull and histogram bin specifications)
714 RealVector continuousAleatoryUncUpperBnds;
715 /// labels for all continuous aleatory uncertain variables
716 /// (collected from \c nuv_descriptors, \c lnuv_descriptors, \c
717 /// uuv_descriptors, \c luuv_descriptors, \c tuv_descriptors, \c
718 /// buv_descriptors, \c gauv_descriptors, \c guuv_descriptors, \c
719 /// fuv_descriptors, \c wuv_descriptors, and \c hbuv_descriptors
720 /// specifications in \ref VarAUV)
721 StringArray continuousAleatoryUncLabels;
722
723 /// array of values for all discrete integer aleatory uncertain variables
724 IntVector discreteIntAleatoryUncVars;
725 /// distribution lower bounds for all discrete integer aleatory
726 /// uncertain variables
727 IntVector discreteIntAleatoryUncLowerBnds;
728 /// distribution upper bounds for all discrete integer aleatory
729 /// uncertain variables
730 IntVector discreteIntAleatoryUncUpperBnds;
731 /// labels for all discrete integer aleatory uncertain variables
732 StringArray discreteIntAleatoryUncLabels;
733
734 /// array of values for all discrete string epistemic uncertain variables
735 StringArray discreteStrAleatoryUncVars;
736 /// distribution lower bounds for all discrete string epistemic
737 /// uncertain variables
738 StringArray discreteStrAleatoryUncLowerBnds;
739 /// distribution upper bounds for all discrete string epistemic
740 /// uncertain variables
741 StringArray discreteStrAleatoryUncUpperBnds;
742 /// labels for all discrete string epistemic uncertain variables
743 StringArray discreteStrAleatoryUncLabels;
744
745 /// array of values for all discrete real aleatory uncertain variables
746 RealVector discreteRealAleatoryUncVars;
747 /// distribution lower bounds for all discrete real aleatory
748 /// uncertain variables
749 RealVector discreteRealAleatoryUncLowerBnds;
750 /// distribution upper bounds for all discrete real aleatory
751 /// uncertain variables
752 RealVector discreteRealAleatoryUncUpperBnds;
753 /// labels for all discrete real aleatory uncertain variables
754 StringArray discreteRealAleatoryUncLabels;
755
756 /// array of values for all continuous epistemic uncertain variables
757 RealVector continuousEpistemicUncVars;
758 /// distribution lower bounds for all continuous epistemic uncertain variables
759 RealVector continuousEpistemicUncLowerBnds;
760 /// distribution upper bounds for all continuous epistemic uncertain variables
761 RealVector continuousEpistemicUncUpperBnds;
762 /// labels for all continuous epistemic uncertain variables
763 StringArray continuousEpistemicUncLabels;
764
765 /// array of values for all discrete integer epistemic uncertain variables
766 IntVector discreteIntEpistemicUncVars;
767 /// distribution lower bounds for all discrete integer epistemic
768 /// uncertain variables
769 IntVector discreteIntEpistemicUncLowerBnds;
770 /// distribution upper bounds for all discrete integer epistemic
771 /// uncertain variables
772 IntVector discreteIntEpistemicUncUpperBnds;
773 /// labels for all discrete integer epistemic uncertain variables
774 StringArray discreteIntEpistemicUncLabels;
775
776 /// array of values for all discrete string epistemic uncertain variables
777 StringArray discreteStrEpistemicUncVars;
778 /// distribution lower bounds for all discrete string epistemic
779 /// uncertain variables
780 StringArray discreteStrEpistemicUncLowerBnds;
781 /// distribution upper bounds for all discrete string epistemic
782 /// uncertain variables
783 StringArray discreteStrEpistemicUncUpperBnds;
784 /// labels for all discrete string epistemic uncertain variables
785 StringArray discreteStrEpistemicUncLabels;
786
787 /// array of values for all discrete real epistemic uncertain variables
788 RealVector discreteRealEpistemicUncVars;
789 /// distribution lower bounds for all discrete real epistemic
790 /// uncertain variables
791 RealVector discreteRealEpistemicUncLowerBnds;
792 /// distribution upper bounds for all discrete real epistemic
793 /// uncertain variables
794 RealVector discreteRealEpistemicUncUpperBnds;
795 /// labels for all discrete real epistemic uncertain variables
796 StringArray discreteRealEpistemicUncLabels;
797
798 /// discrete state integer set lower bounds inferred from set values
799 IntVector discreteStateSetIntLowerBnds;
800 /// discrete state integer set upper bounds inferred from set values
801 IntVector discreteStateSetIntUpperBnds;
802 /// discrete state string set lower bounds inferred from set values
803 StringArray discreteStateSetStrLowerBnds;
804 /// discrete state string set upper bounds inferred from set values
805 StringArray discreteStateSetStrUpperBnds;
806 /// discrete state real set lower bounds inferred from set values
807 RealVector discreteStateSetRealLowerBnds;
808 /// discrete state real set upper bounds inferred from set values
809 RealVector discreteStateSetRealUpperBnds;
810
811 // Linear constraints
812
813 /// coefficient matrix for the linear inequality constraints (from
814 /// the \c linear_inequality_constraint_matrix specification in \ref
815 /// MethodIndControl)
816 RealVector linearIneqConstraintCoeffs;
817 /// lower bounds for the linear inequality constraints (from the \c
818 /// linear_inequality_lower_bounds specification in \ref MethodIndControl)
819 RealVector linearIneqLowerBnds;
820 /// upper bounds for the linear inequality constraints (from the \c
821 /// linear_inequality_upper_bounds specification in \ref MethodIndControl)
822 RealVector linearIneqUpperBnds;
823 /// scaling types for the linear inequality constraints (from the \c
824 /// linear_inequality_scale_types specification in \ref MethodIndControl)
825 StringArray linearIneqScaleTypes;
826 /// scaling factors for the linear inequality constraints (from the \c
827 /// linear_inequality_scales specification in \ref MethodIndControl)
828 RealVector linearIneqScales;
829 /// coefficient matrix for the linear equality constraints (from
830 /// the \c linear_equality_constraint_matrix specification in \ref
831 /// MethodIndControl)
832 RealVector linearEqConstraintCoeffs;
833 /// targets for the linear equality constraints (from the \c
834 /// linear_equality_targets specification in \ref MethodIndControl)
835 RealVector linearEqTargets;
836 /// scaling types for the linear equality constraints (from the \c
837 /// linear_equality_scale_types specification in \ref MethodIndControl)
838 StringArray linearEqScaleTypes;
839 /// scaling factors for the linear equality constraints (from the \c
840 /// linear_equality_scales specification in \ref MethodIndControl)
841 RealVector linearEqScales;
842
843 private:
844
845 //
846 //- Heading: Private functions
847 //
848
849 DataVariablesRep(); ///< default constructor
850
851 /// write a DataVariablesRep object to an std::ostream
852 void write(std::ostream& s) const;
853
854 /// read a DataVariablesRep object from a packed MPI buffer
855 void read(MPIUnpackBuffer& s);
856 /// write a DataVariablesRep object to a packed MPI buffer
857 void write(MPIPackBuffer& s) const;
858
859 //
860 //- Heading: Private data members
861 //
862
863 };
864
865
~DataVariablesRep()866 inline DataVariablesRep::~DataVariablesRep()
867 { }
868
869
870 /// Handle class for variables specification data.
871
872 /** The DataVariables class is used to provide a memory management
873 handle for the data in DataVariablesRep. It is populated by
874 IDRProblemDescDB::variables_kwhandler() and is queried by the
875 ProblemDescDB::get_<datatype>() functions. A list of
876 DataVariables objects is maintained in
877 ProblemDescDB::dataVariablesList, one for each variables
878 specification in an input file. */
879
880 class DataVariables
881 {
882 //
883 //- Heading: Friends
884 //
885
886 // the problem description database
887 friend class ProblemDescDB;
888 // the NIDR derived problem description database
889 friend class NIDRProblemDescDB;
890
891 public:
892
893 /// compares the idVariables attribute of DataVariables objects
id_compare(const DataVariables & dv,const std::string & id)894 static bool id_compare(const DataVariables& dv, const std::string& id)
895 { return id == dv.dataVarsRep->idVariables; }
896
897 //
898 //- Heading: Constructors, destructor, operators
899 //
900
901 DataVariables(); ///< constructor
902 DataVariables(const DataVariables&); ///< copy constructor
903 ~DataVariables(); ///< destructor
904
905 DataVariables operator=(const DataVariables&); ///< assignment operator
906 bool operator==(const DataVariables&); ///< equality operator
907
908 //
909 //- Heading: Member methods
910 //
911
912 /// write a DataVariables object to an std::ostream
913 void write(std::ostream& s) const;
914
915 /// read a DataVariables object from a packed MPI buffer
916 void read(MPIUnpackBuffer& s);
917 /// write a DataVariables object to a packed MPI buffer
918 void write(MPIPackBuffer& s) const;
919
920 /// return dataVarsRep
921 std::shared_ptr<DataVariablesRep> data_rep();
922
923 // Get Functions (composite variable counts only):
924
925 /// return total number of design variables
continuous_design()926 size_t continuous_design() { return dataVarsRep->numContinuousDesVars; }
927 /// return total number of design variables
discrete_design()928 size_t discrete_design() { return dataVarsRep->numDiscreteDesRangeVars +
929 dataVarsRep->numDiscreteDesSetIntVars +
930 dataVarsRep->numDiscreteDesSetStrVars +
931 dataVarsRep->numDiscreteDesSetRealVars; }
932 /// return total number of continuous aleatory uncertain variables
continuous_aleatory_uncertain()933 size_t continuous_aleatory_uncertain()
934 { return dataVarsRep->numNormalUncVars +
935 dataVarsRep->numLognormalUncVars + dataVarsRep->numUniformUncVars +
936 dataVarsRep->numLoguniformUncVars + dataVarsRep->numTriangularUncVars +
937 dataVarsRep->numExponentialUncVars + dataVarsRep->numBetaUncVars +
938 dataVarsRep->numGammaUncVars + dataVarsRep->numGumbelUncVars +
939 dataVarsRep->numFrechetUncVars + dataVarsRep->numWeibullUncVars +
940 dataVarsRep->numHistogramBinUncVars; }
941 /// return total number of continuous aleatory uncertain variables
discrete_aleatory_uncertain()942 size_t discrete_aleatory_uncertain()
943 { return dataVarsRep->numPoissonUncVars + dataVarsRep->numBinomialUncVars +
944 dataVarsRep->numNegBinomialUncVars + dataVarsRep->numGeometricUncVars +
945 dataVarsRep->numHyperGeomUncVars + dataVarsRep->numHistogramPtIntUncVars +
946 dataVarsRep->numHistogramPtStrUncVars +
947 dataVarsRep->numHistogramPtRealUncVars; }
948 /// return total number of epistemic uncertain variables
continuous_epistemic_uncertain()949 size_t continuous_epistemic_uncertain()
950 { return dataVarsRep->numContinuousIntervalUncVars; }
951 /// return total number of epistemic uncertain variables
discrete_epistemic_uncertain()952 size_t discrete_epistemic_uncertain()
953 { return dataVarsRep->numDiscreteIntervalUncVars +
954 dataVarsRep->numDiscreteUncSetIntVars +
955 dataVarsRep->numDiscreteUncSetStrVars +
956 dataVarsRep->numDiscreteUncSetRealVars; }
957 /// return total number of state variables
continuous_state()958 size_t continuous_state() { return dataVarsRep->numContinuousStateVars; }
959 /// return total number of state variables
discrete_state()960 size_t discrete_state() { return dataVarsRep->numDiscreteStateRangeVars +
961 dataVarsRep->numDiscreteStateSetIntVars +
962 dataVarsRep->numDiscreteStateSetStrVars +
963 dataVarsRep->numDiscreteStateSetRealVars; }
964 /// return total number of design variables
design()965 size_t design() { return continuous_design() + discrete_design(); }
966 /// return total number of aleatory uncertain variables
aleatory_uncertain()967 size_t aleatory_uncertain()
968 { return continuous_aleatory_uncertain() + discrete_aleatory_uncertain(); }
969 /// return total number of epistemic uncertain variables
epistemic_uncertain()970 size_t epistemic_uncertain()
971 { return continuous_epistemic_uncertain() + discrete_epistemic_uncertain(); }
972 /// return total number of uncertain variables
uncertain()973 size_t uncertain() { return aleatory_uncertain() + epistemic_uncertain(); }
974 /// return total number of state variables
state()975 size_t state() { return continuous_state() + discrete_state(); }
976 /// return total number of continuous variables
continuous_variables()977 size_t continuous_variables() { return continuous_design() +
978 continuous_aleatory_uncertain() + continuous_epistemic_uncertain() +
979 continuous_state(); }
980 /// return total number of discrete variables
discrete_variables()981 size_t discrete_variables()
982 { return discrete_design() + discrete_aleatory_uncertain() +
983 discrete_epistemic_uncertain() + discrete_state(); }
984 /// return total number of variables
total_variables()985 size_t total_variables() { return design() + uncertain() + state(); }
986
987 private:
988
989 //
990 //- Heading: Data
991 //
992
993 /// pointer to the body (handle-body idiom)
994 std::shared_ptr<DataVariablesRep> dataVarsRep;
995 };
996
997
data_rep()998 inline std::shared_ptr<DataVariablesRep> DataVariables::data_rep()
999 {return dataVarsRep; }
1000
1001
operator ==(const DataVariables & data_vars)1002 inline bool DataVariables::operator==(const DataVariables& data_vars)
1003 {
1004 Cerr << "Warning: This is not a full equality operator for the "
1005 << "DataVariables class" << std::endl;
1006 return (data_vars.dataVarsRep->idVariables == dataVarsRep->idVariables);
1007 }
1008
1009
1010
1011 /// MPIPackBuffer insertion operator for DataVariables
operator <<(MPIPackBuffer & s,const DataVariables & data)1012 inline MPIPackBuffer& operator<<(MPIPackBuffer& s, const DataVariables& data)
1013 { data.write(s); return s;}
1014
1015
1016 /// MPIUnpackBuffer extraction operator for DataVariables
operator >>(MPIUnpackBuffer & s,DataVariables & data)1017 inline MPIUnpackBuffer& operator>>(MPIUnpackBuffer& s, DataVariables& data)
1018 { data.read(s); return s;}
1019
1020
1021 /// std::ostream insertion operator for DataVariables
operator <<(std::ostream & s,const DataVariables & data)1022 inline std::ostream& operator<<(std::ostream& s, const DataVariables& data)
1023 { data.write(s); return s;}
1024
1025
write(std::ostream & s) const1026 inline void DataVariables::write(std::ostream& s) const
1027 { dataVarsRep->write(s); }
1028
1029
read(MPIUnpackBuffer & s)1030 inline void DataVariables::read(MPIUnpackBuffer& s)
1031 { dataVarsRep->read(s); }
1032
1033
write(MPIPackBuffer & s) const1034 inline void DataVariables::write(MPIPackBuffer& s) const
1035 { dataVarsRep->write(s); }
1036
1037 } // namespace Dakota
1038
1039 #endif
1040