Valis
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 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, a unit in the top form, and hit 'Create' or “Create & add new”.
Note that while creating a property, the User can create different valis eg: normal vali, Matrix, Text vali, Datevali, or dataset
Type | Use case |
---|---|
Vali | Property of the component which has only one single input. eg. mass, density |
Matrix | A matrix is a group of individual Valis ordered in rows and columns. Commonly used the property of the components have different modes, matrix valis is used. Eg. Powerconsumption during different modes, inertia values on different axis |
Textvali | A vali which stores the strings/text eg : |
DateVali | A vali which stores the date information eg: |
Dataset | Here the user can import or add the dataset values and 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, the user has the possibility to reference other valis that are available within the project or also other projects. To do so, go to the formula and Type “$”, a small dialog box opens up with valis inside. Users can type the keywords to get the vali easily.
In case the user wants to use the valis from a different project, scroll down to the end of the dialog box to select the option “choose from other projects”
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.
Common Formula types
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 valuesoc()
="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 inbuilt functions:
soc()
: stands for "sum of children", sums up all the Valis of the same type in the components one level belowrssoc():
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, rssoc function gives you the result of 8.062257aoc()
: stands for "average of children", calculates the average value of the Valis of the same type in the components one level belowaverage_of_datasets()
oraod()
: 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 calculationssum_of_datasets()
orsod()
: 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 calculationsproperty($vali, property_name)
: Get a property of a Vali. Possibilities for property_name are:req_min
req_max (to get the min and max requirements respectively)
worstcase_minus
worstcase_plus (to get the minus and plus worstcases 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 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 the vali‘s name(1). On clicking the vali’s name, the details sidebar opens(2) and the user can find the information(3).
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 Warning 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.
There are few other properties that are used.
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. (refer to 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.
History of Valis
When a Vali is changed directly or indirectly, the changes are automatically saved in the valispace 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 vali change, click on the name of the vali(1) and the details tab opens on the right side(2). Select the icon “history”(3) and then below you have the graph showing the changes with respect to time and below you have the
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.