Add evaluate/rule constriant for test criteria evaluation
There is a strong need from our users to do online evaluations of scenarios. A very simplified example may be the following:
scenario long_duration_run:
ego_vehicle: vehicle
do ego_vehicle.drive() with:
evaluate(ego_vehicle.speed > 10 kmh && ego_vehicle.speed < 10 kmh)
Here, the keep statement can not be used, since it is not about trace rejection (We definitely want to have the trace): "Trace acceptance is not related to passing or failing tests. If an ASAM OpenSCENARIO model does not accept a trace, it means that the behavior is outside the scope of the ASAM OpenSCENARIO model. Test criteria can only be evaluated for accepted traces, meaning, if the behaviors are within the scope of the ASAM OpenSCENARIO model." https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/language-reference/Semantics.html#sec-lc-semantics-semantic-foundations
One could use the record
statement, however it is not always practicable.
Therefore we suggest to add the evaluate
constraint to measure if test criteria are met:
ego_vehicle.drive() with:
evaluate(ego_vehicle.speed > 10 kmh)
Other suggestions for naming: rule/test_criteria/evaluation/...