Skip to main content
Skip table of contents

Valis and Calculations

Valis are design parameters of components, requirements 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 “+” symbol in the bottom right-hand corner of the screen. Then, continue by filling in a name (which can be any name or a Valitype name - 1), a Formula and Unit (mandatory - 2), a Display Unit (optional - 3), and hit “Create” or “Create & add New” (see Figure Adding a Vali). For a guide on Units and their conversion please refer to Units and Automatic Unit Conversion.

Additionally, you can decide on which components you want to add this Vali (4).

Pro-tip: In the Formula and Unit field hit “\“ to get a list of possible calculation types.

image-20240320-125054.png

Adding a Vali - Pop-up window to add different types of Valis.

Note that while creating a property, the user can create different Valis, e.g., normal Vali, Matrix, Text Vali, Datevali, or Dataset.

Type

Use-case

Vali

Property of the component which has only one single value, e.g., mass, cost, density e.g..

Matrix

A matrix is a group of individual Valis ordered in rows and columns. A matrix Vali is commonly used when the property of the components has different modes. E.g. Powerconsumption during different modes, inertia values on a different axis.

Text Vali

A Vali which stores strings/text e.g.,

DateVali

A Vali which stores the date information e.g.,

image-20240320-152411.png

Dataset

Here, the user can import or add the dataset values, create a graph, and use their values in the calculation of other values.

Adding Formulas

A Vali can be calculated with a formula using common mathematical expressions or by adding constants or functions. A formula can also contain other Valis.

Within the Formula and Unit field, the user can reference Valis that are available either within the project or also in other projects. To do so, they can go to “Formula and Unit” and Type “$”, a small dialogue box opens up with Valis inside (see Figure Calling Valis). Users can type keywords to get the Vali easily.

image-20240320-130116.png

Calling Valis - Anywhere in Valispace you can use the dollar symbol “$“ to open a dropdown that shows you any referencable object (e.g. Valis, Requirements etc.).

In case the user wants to use the Valis from a different project, they can scroll down to the end of the dialogue box to select the option “show other projects”.

Pro-Tipp: Create your own “Constants” project, where you store frequently used Valis so you can call them at any time for calculations

The formula editor uses Latex syntax to display the formulas nicely. This means that typing sqrt() will automatically transform to a square root symbol as the user types. The editor also includes automatic parenthesis completion.

Common Formula types

You can either

  • use a fixed value, such as 42.7kg

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

  • use other Valis, using the $ sign: $car.speed+5

Math operations available in formulas are:

  • +-*/

  • %(modulo operation)

  • ^

  • 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

  • poc() = "Product of children": product 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 inbuilt functions:

  • soc(): stands for "sum of children", sums up all the Valis of the same type in the components one level below

  • rssoc(): Stands for “root sum squared of children” sqrt(x1^2+x2^2+⋯+xn^2). For example, if you have three masses 2kg, 5kg, and 6kg, the rssoc function gives you the result of 8.062257

  • aoc(): stands for "average of children", calculates the average value of the Valis of the same type in the components one level below

  • poc(): stands for "product of children", multiples all the Valis of the same type in the components one level below

  • average_of_datasets() or aod(): 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

  • sum_of_datasets() or sod(): 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

  • property($vali, property_name): Get a property of a Vali. Possibilities for property_name are:

    • min

    • max (to get the min and max requirements, respectively)

    • wc_minus

    • wc_plus (to get the minus and plus worst cases, respectively)

  • minoc(): Minimum of children. Returns the minimum value of all Valis with the same type in the subcomponents

  • maxoc(): Maximum of children. Returns the maximum value of all Valis with the same type in the subcomponents

  • round(): The built-in round( ) function follows the specifications of Python's round function in which the values are rounded to the closest multiple of 10 to the power minus ndigits


Example of formulas:

  • $SolarPanel.width * $SolarPanel.length

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

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

Vali Information

You can see more information about the Vali by clicking on its name. This will open a details view (1) and the user can find the information (2). See Figure Vali Information for more insights.

image-20240320-152847.png

Vali Information - By clicking on a Vali a window with additional information will open up. Here you can define more properties, add description and define impacts.

Within the information tab, users have several possibilities to add/change the margins/units and also add the requirements (min/max). The requirements (min/max) are the limits that you have for the particular property. Whenever the value or worst-case increases or decreases and if the values exceed/drop below the limits of your requirement, Valispace gives a warning next to the name of the Vali. Refer to the Warnings section for more information.

Note that the total margin presented in the Vali properties is the margin of the component and the total accumulated margins of the child component. For more info on Margins please visit our help page on Margins.

ID: the ID is a number that is random and automatically added by the Valiengine which is used in the Backend. You can enter the ID of a Vali in the search field of the Rest API to find the Vali. Please refer to the Rest API documentation.

Name: here you can enter and edit the name of the Vali.

Description: in the description field you can enter a description of the Vali. You can also format and edit tasks as shown below.

Other information that can be added/viewed here include References, Using and Used by and also Impacts of this Vali.

History of Valis

When a Vali is changed directly or indirectly, the changes are automatically saved in Valispace’s database. The history tab of the Vali shows the value before, the value after, and who changed the values. Valispace captures the changes even if the changed Vali is not directly referenced to the Vali.

To see the history of a Vali’s changes (see Figure Vali History), click on the name of the Vali (1) and the details tab opens (2). Select the icon “History” (2) and then below, the graph showing the changes concerning time can be found. In “Recent Changes” (3) the user can find a table filled with the ‘Time’, ‘Value before’, ‘Value after’ and ‘Reason’ data.

image-20240320-154208.png

Vali History - In the History tab a graphical and tabular representation for the change of a Vali over time is shown.

Notifications on Changes

To get a notification when a certain Vali changes, you can subscribe to it by clicking on Subscribe in the drop down of the Action button of the Vali. Check out Figure Subscribing to a Vali to see how.

image-20240321-101120.png

Subscribing to a Vali - By subscribing to a Vali automatic notifications will be displayed in the Notification tab (bell symbol on the upper right-hand corner) when the Vali changes.

You will see a new notification on the notification bell in the upper right-hand corner when someone changed a value you are subscribed to (4). Then you can click on the bell icon to check on the notifications.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.