# A Model-Driven Approach for Conducting Simulation Experiments
## 3 Model-Driven Approach for Conducting Simulation Experiments
### Composition of Modeling Domains and Experiment Types  
The meta models describe the structure and ingredients of simulation experiment specifications. We distinguish _base_ meta models and _experiment type_ meta models. Base meta models describe simple experiments (i.e., runs with single-parameter configurations) in a specific domain or modeling approach. Meta models for experiment types, on the other hand, allow for supporting complex experiments where parameters are varied and specific analyses are conducted on the outputs.  
A base meta model for a fictive domain can be seen in Listing 1 (meta models for experiment types can be created analogously). The meta model is defined using JSON Schema and contains all the necessary information in one, hierarchically structured file. It structures simulation experiments of the fictive domain into a model component, a simulation component, and an observation component. Each component encloses various other input properties, characterized by type, information, choices, default values, and constraints. For example, the constraint exclusiveMinimum: 0 was added inside the property replications. To express which inputs are required for specifying a valid simulation experiment, the keyword required can be used. Furthermore, default values can be expressed explicitly, e.g., for setting the stochastic simulation algorithm (SSA) as the standard simulator type of the domain. Moreover, to express alternatives, the keyword oneOf is used, as in the case of stopCondition, which can be given by (a) a specific stop time or (b) an expression on the model output. To build a valid simulation experiment that conforms to the meta model, exactly one of these alternatives needs to be applied. However, to keep the example short, we do not specify these options further and omit the details of the observation component.  
For specifying a simulation experiment, at least a base meta model needs to be selected and filled with concrete input values by a user. However, the base meta models can also be flexibly composed with the various meta models for experiment types to create a meta model for the current experimentation task at hand. Using the composition mechanism, complex simulation experiments (such as statistical model checking, parameter estimation, steady state analysis, etc.) can be supported for any modeling approach or domain. This is possible due to the orthogonality of the base experiment specification and the experiment type specification. Note that in this paper, we focus on the main experiment types and their methods and do not discuss further analyses (i.e., post-processing or plotting of the results). However, this could be added as another component in the meta models. The language SED-ML [9], for instance, allows the specification of various plot types including axis labels, etc.  
1 {
2 *Sid* = \"BaseExpExample\",
3 \"properties\": {
4 *model*: {
5 \"properties\": {
6 \"modelPath\": {\"type\": \"string\"}
7 }.
8 \"required\": [modelPath\"]
9 }.
10 \"simulation\": {
11 \"properties\": {
12 \"simulator\": {
13 \"type\": \"string\"}
14 \"num\": [\"SSA\", \"Hybrid\"],
15 \"default\": \"SSA\"
16 }.
17 \"replications\": {
18 \"type\": \"integer\",
19 \"exclusiveWishimum\": 0
20 },
21 \"stopCondition\": {
22 \"properties\": {
23 \"oneOf\": {
24 \"stopTime\": {
25...
26 }.
27 \"required\": [\"simulator\", \"replications\", \"stopCondition\"]
28 }.
29 \"observation\": {
30... ```
**Listing 1**. A base meta model of a fictive modeling domain defined in JSON Schema.