Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Scenario Application syntax



The built-in Scenario application allows to execute a scenario defined in an XLSX file. This article explains the syntax of the XLSX file.

Overview

The first line with a numeric value in Column C will signal the beginning of the scenario definition with the values for the times: Each Cell in the subsequent columns will specify one time step.

The next lines define the values for each of the time steps.
scenario2

Timeline

The first line with a numeric value in Column C signal the beginning of the scenario definition with the values for the times: Each Cell in the subsequent columns specify one time step.

  • Rows with nothing in Column B will be ignored, which allows to comment the content of the scenario
  • Time steps can be integer or float values
  • It is not necessary for time steps to be evenly distributed[1]
    For example, 0, 1.5, 10, 100 is allowed

Values

The lines after the first line define the values:
  • If a cell does not contain anything, it means that the value of the data did not change since the last defined time
  • If a cell contains a value, and corespond to a data in a publish Service:
    • If the data is an integer, a long, a short, a char, a float or a double, the scenario will interpolate the values between the two time steps
    • If the data is a string, a boolean or an enumerate, the scenario will affect the specified value
For example in the scenario presented in the overview:
  • "spd_value" will have the value 140 from 0 seconds to 3 seconds, then will be interpolated from 140 to 150 fron 3 seconds to 4 seconds, then will keep the value 150
  • "cmd_spd_state" will have the value "FMS" from 0 seconds to 3 seconds, then will have the value "MAN"
  • "mach_visible" will have the value "false" from 0 seconds to 3 seconds, then will have the value "true"

String values parsing

Cells which represents string values[2]
As simple values or elements of an array or a structure
can be represented as:
  • A String. For example MyName represents the String MyName
  • A quoted String. For example "MyName" also represents the String MyName
  • A numéric value. For example 2 (as a numeric value in Excel) also represents the String 2, and 2,5 (as a numeric value in Excel) also represents the String 2.5

Array values parsing

Cells which represent array values can be defined as list of elements separated by a new line or a ";" (semi-colon). Note that:
  • separating values by new lines is only allowed if the acceptNewLines property is set to true
  • Note that publish Services, arrays of integer, long, short, char, float or double elements will be interpolated as for simple type datas
It is also possible to define them with one element per each line, separated by new lines.

Example with semi-colon

For example, in the following case on time 0:
scenarioArray
  • The arrayInt int array has 3 elements: [1, 2, 3]
  • The arrayFloat float array has 3 elements: [1.2, 2.2, 3.2]
  • The arrayBool boolean array has 3 elements: [true, true, false]

Example with new lines

The following example is equivalent to the previous one:
scenarioArray2
  • The arrayInt int array has 3 elements: [1, 2, 3]
  • The arrayFloat float array has 3 elements: [1.2, 2.2, 3.2]
  • The arrayBool boolean array has 3 elements: [true, true, false]

Another way to define arrays

Arrays can also be define by specifying each of their elements. For example:
scenarioArray3

Defining structures

A structure can be defined by separating the name of the structure data from its fields by a "#" character. For example:
scenarioStruct

Defining arrays of structures

The values of an array of structures can be specified by combiing the syntax for an array using indexes with the fields names. For example:
scenarioStruct2

Notes

  1. ^ For example, 0, 1.5, 10, 100 is allowed
  2. ^ As simple values or elements of an array or a structure

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence