For each model variable the user can chose one of the distribution below:
Distribution | Distribution Parameters | Optional Param. | Return datatype | Remark |
Uniform | min, max | DOUBLE | ||
Normal | mean, sigma | min, max | DOUBLE | |
Exponential | lambda | min, max | DOUBLE | |
Poisson | lambda | min, max | INT | |
Binomial | n, p | min, max | INT | n has to be of type INT |
Choice | values | frequencies | any | Choses randomly a value from a list. Values have to be an array of the same type as the cal variable |
If min and max are specified and the generated value exceeds them, new random numbers are generated until one fits the interval. The number of trials is limited to cMaxAttemptsOutOfRange. If no number is found, the parameter set is skipped.
Generated parameter sets can be further restricted by constraints.
Arbitrary number of calibration variables (either INT or DOUBLE, depending on distribution used). When using the distribution Choice, then the datatype can be additionally CHAR, DATE or BOOLEAN.
| <cal id="VariableName" target="vModuleName">
For each calibration variable the distribution and it's parametrization as in the table above.
| <cal id="VariableName" target="vModelParameter" datatype="DOUBLE"> | <input id="distribution" datatype="CHAR">DISTRIBUTION</input> | <input id="PARAMETER1" datatype="DOUBLE">3.0</input> | <input id="PARAMETER2" datatype="DOUBLE">.5</input> | </cal>
Name | DATATYPE | Description |
cCount | INT | the number of parameter sets to be generated, mandatory |
cRandomSeed | CHAR | optional random seed for the generator. Can be a long integer, therefore it has datatype CHAR |
cMaxAttemptsOutOfRange | INT | maximum number of trials to re-generate a random number if it's value is outside min/max range |
A constraint prohibits the creation of invalid variable values.
| <constraint rule="${Generator.TsumMaturity} > ${Generator.TsumAnthesis}+100">
The number of created simulations can be smaller than Count.
The random seed is set only on initialization of the generator. That means, that a subsequent iteration or a subsequent project can not set it's individual random seed.
|<generator id="Generator" class="net.simplace.sim.control.generators.RandomSimGenerator"> | | <cal id="TsumAnthesis" datatype="DOUBLE" target="vTsumAnt"> | <input id="distribution" datatype="CHAR">Uniform</input> | <input id="min" datatype="DOUBLE">0</input> | <input id="max" datatype="DOUBLE" source="vTsumMax" /> | </cal> | | <cal id="TsumMat" datatype="DOUBLE" target="vTsumMat"> | <input id="distribution" datatype="CHAR">Normal</input> | <input id="sigma" datatype="DOUBLE" source="Iterator.TsumMat.sigma" /> | <input id="mean" datatype="DOUBLE" source="Iterator.TsumMat.mean" /> | <input id="min" datatype="DOUBLE">0</input> | <input id="max" datatype="DOUBLE" source="vTsumMax" /> | </cal> | | <cal id="Soiltype" datatype="CHAR" target="vSoiltype"> | <input id="distribution" datatype="CHAR">Choice</input> | <input id="values" datatype="CHARARRAY">{loam,sand,sandyloam}</input> | <input id="frequencies" datatype="DOUBLEARRAY" >{2,9,6}</input> | </cal> | | <input id="cRandomSeed" datatype="CHAR">342345734</input> | <input id="cCount" datatype="INT">100</input> | | <constraint rule="${Generator.TsumMaturity} > ${Generator.TsumAnthesis}+100"> | |</generator>