asam-oss / OSC-ALKS-scenarios

ALKS scenario interpretation in OpenSCENARIO
Other
111 stars 20 forks source link

"rule" constraint #69

Open yhamadi75 opened 1 week ago

yhamadi75 commented 1 week ago

Hi, I need a clarification with respect to multiple ConstraintGroups. The standard says that multiple constraint groups are combined by an OR. (like below for "Ego_InitPosition_LaneId" in "alks_scenario_4_5_1_cut_out_fully_blocking_template.xosc").

At contrary when there is just one group, it's an AND, like for "Ego_InitSpeed_Ve0_kph" below.

Now is it possible to have nested ConstraintGroups with associated generalizing of the previous semantic? Or can we just have siblings constraint groups? I did not find this information in the XML doc.

Thanks for clarifying.

<ParameterDeclaration name="Ego_InitSpeed_Ve0_kph" parameterType="double" value="60.0">
  <ConstraintGroup>
    <!--The scenarios are meant to be run with a positive ego speed up to 60 kph.-->
    <ValueConstraint rule="greaterThan" value="0.0" />
    <ValueConstraint rule="lessOrEqual" value="60.0" />
  </ConstraintGroup>
</ParameterDeclaration>
arauschert commented 1 week ago

Hi! From XML schema perspective it is not possible to nest ConstraintGroups. If you have more specific value constraints for the parameters you could try to use expressions for the "value" attribute. If you have a requirement to support more complex value constraints please raise an issue in the OSC XML repository: https://code.asam.net/simulation/openscenario/openscenario-xml/-/issues Best regards