Expressions needed for "Stochastics Constraints from OSC1.1"
Expressions needed for "Stochastics Constraints from OSC1.1" Need expressions for describing:
1) ProbabilityDistributionSet with a probability given value and weight (or weighted probability).
2) NormalDistribution with a given: expected mean value, variance (stdev), min and max.
3) UniformDistribution with a given: min and max.
4) PoissonDistribution with a given: expected value, min and max.
5) Histogram with a given: binName, weight (or weighted probability) and min and max.
Describe the feature
Describe the solution you would like
keep( parameterName == probability with:
prob(value, weight)
prob(value, weight)
prob(value, weight)
prob(value, weight))
keep( parameterName == normal with:
expected_value(mean)
variance(stdev)
range(min,max))
keep( parameterName == uniform with: range(min, max) )
keep( parameterName == poisson with:
expected_value(value)
range(min, max))
keep( parameterName == histogram with:
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max)))
Syntax Proposal 1
Add to <keyword> : 'probability', 'normal', 'uniform', 'poisson', 'histogram', 'prob', 'expected_value', 'variance', 'bin'
Add the following syntax:
<probability-expression> ::= 'prob''('<value>',' <weight>')'
<expected-value-expression> ::= 'expected_value''('<mean>')'
<variance-expression> ::= 'variance''('<stdev>')'
<bin-expression> ::= 'bin''('<bin-identifier>, <weight>, <range>')'
<weight> :: = <number> #
<mean> ::= <number> #
<stdev> ::= <number> #
<with-declaration-for-stochastics> ::= 'with'':'
<with-member-for-stochastics>+
<with-member-for-stochastics> ::= <probability-expression> | <expected-value-expression>
| <variance-expression> | <bin-expression>
Respect This from Types Group:
<constraint-expression>::= (<bool-expression> [<bool-implication>]) | <stochastic-expression>
<bool-implication>::= '=>' <bool-expression>
<stochastic-expression> :: = <probability-constraint> | <normal-distribution-constraint> | <uniform-distribution-constraint>
| <poisson-distribution-constraint> | <histogram-constraint>
<probability-constraint> ::= <parameter-name> '==' 'probability' <with-declaration-for-stochastics>
#NOTE: Use <probability-expression> as <with-member-for-stochastics>
<normal-distribution-constraint> ::= <parameter-name> '==' 'normal' <with-declaration-for-stochastics>
#NOTE: Use <expected-value-expression>, <variance-expression>, <range> as <with-member-for-stochastics>
<uniform-distribution-constraint> ::= <parameter-name> '==' 'uniform' <with-declaration-for-stochastics>
#NOTE: Use <range> as <with-member-for-stochastics>
<poisson-distribution-constraint> ::= <parameter-name> '==' 'poisson' <with-declaration-for-stochastics>
#NOTE: Use <expected-value-expression>, <range> as <with-member-for-stochastics>
<histogram-constraint> ::= <parameter-name> '==' 'histogram' <with-declaration-for-stochastics>
#NOTE: Use <bin-expression> as <with-member-for-stochastics>
Create these as examples:
(<parameter-name> '==' <value>) | (<parameter-name> '>=' <value>) | (<parameter-name> '<=' <value>)
| (<parameter-name> '>' <value>) | (<parameter-name> '<' <value>)
| (<parameter-name> 'Undefined') | (<parameter-name> 'Abstract') | (<parameter-name> '==' 'None')
Create Examples for Stochastic Constraints, as above with numbers:
keep( parameterName == probability with:
prob(value, weight)
prob(value, weight)
prob(value, weight)
prob(value, weight))
keep( parameterName == normal with:
expected_value(mean)
variance(stdev)
range(min,max))
keep( parameterName == uniform with: range(min, max) )
keep( parameterName == poisson with:
expected_value(value)
range(min, max))
keep( parameterName == histogram with:
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max))
bin(binName, weight, range(min, max)))
Vote: Accept Proposal 1
Vote:
Yes-3-(Rich Heidtman, Rolf Magnus, Tjark Koopmann)
No-0
Abstain-0
No-Vote-0
NOTE: Should be revisited in 2.1 for possible corrections.
Describe alternatives you have considered
Describe the backwards compatibility
This is desired for compatibility with OpenSCENARIO v1.1. https://releases.asam.net/OpenSCENARIO/1.1.0/modelDocumentation/content/XsdTreeView.html
This may require use of sample() to define numberOfTestRuns and weither or not use a randomSeed.
Note: randomSeed is optional in OpenSCENARIO 1.1.0 and this should be integer (there is an error with this currently being double).