Valis are design parameters of components or analyses which can be used in calculations and documentation. A Vali has a numerical value and also contains additional information such as type, unit, formula, description and min/max requirements.

## Create Valis

You can create Valis in a component by first clicking the plus symbol in the bottom right corner of the screen. Then continue by filling in a name (should be a type name for Valis with a type), a formula and a unit in the top form and hitting 'Save'.

You can see more information about the Vali by clicking on the arrow to the left of the name.

Any text or number that is underlined is editable. Just click on the text/number to change the value.

You can access a Vali in any text field by starting to type a '$' sign and you will get a list of all existing Valis to choose from.

## Editing Valis

To edit a formula of a Vali, either click on the number in the Value row and a popup will open.

You can even **add another Vali to your formula**. Simply start typing $ into the formula editor to access them.

Or open the Vali details with the arrow on the right in the table, and click on the formula to edit it in our formula editor:

The formula editor uses Latex syntax to display the formulas in a nice way. This means that typing sqrt() will automatically transform to a square root symbol as the user types. The editor also includes automatic parenthesis completion. In the formula, Valis are accessed as with a dollar sign `$`

, however, when a Vali is selected a shorter form will be displayed to make the formula more readable.

## Formula

A Vali can be calculated with a formula using common mathematical expressions. A formula can also contain other Valis.

You can either

- use a fixed value, such as
`42.7`

- use a formula, such as
`5/(3+17.3*9)`

- use other Valis, using the
`$`

sign:`$car.speed+5`

Start typing a `$`

to get a list of all available Valis.

Math operations available in formulas are:

`+`

,`-`

,`*`

,`/`

`^`

`sqrt()`

`exp()`

`log10()`

,`ln()`

,`log()`

`sin()`

,`cos()`

,`tan()`

`asin()`

,`acos()`

,`atan()`

`sinh()`

,`cosh()`

,`tanh()`

`fabs()`

: returns the absolute value`soc()`

="Sum of children": sum of all Valis of the same type in subcomponents

You can also use the following logical functions in formulas:

`if(condition, formula_if_true, formula_if_false)`

`max(formula1, formula2)`

`min(formula1, formula2)`

Valispace custom formulas:

: stands for "sum of children", sums up all the Valis of the same type in the components one level below**soc()**: stands for "average of children", calculates the average value of the Valis of the same type in the components one level below`aoc()`

or`average_of_datasets()`

: the result of the Vali is the average for each point of the datasets belonging to that Vali. If there is only one dataset, that dataset is the result and is used in further calculations**aod()**

or**sum_of_datasets()**

: the result of the Vali is the sum for each point of the datasets belonging to that Vali. If there is only one dataset, that dataset is the result and is used in further calculations**sod()**

: Get a property of a Vali. Possibilities for property_name are:**property($vali, property_name)**- req_min
- req_max (to get the min and max requirements respectively)
- worstcase_minus
- worstcase_plus (to get the minus and plus worstcases respectively)

: Minimum of children. Returns the minimum value of all Valis with the same type in the subcomponents.**minoc()**: Maximum of children. Returns the maximum value of all Valis with the same type in the subcomponents.`maxoc()`

Example formulas:

`$SolarPanel.width * $SolarPanel.length`

`max(soc(), $SolarPanel.lowest_mass)`

`if($SolarPanel.width*2 > $SolarPanel.length, 10, 5)`

## History of Valis

When a Vali is changed its previous state is saved in a history. The evolution of a Vali can be seen in the history graph:

## Notifications on Changes

To get a notification when a certain Vali changes, you can subscribe to it by clicking on the subscribe button to the right of the Vali.

You will see a new notification in the navigation bar when someone has changed a value you are subscribing to.

## Matrix

A matrix is a group of individual Valis ordered in rows and columns. To add a matrix, choose 'add matrix' in the dropdown and fill in the fields.