The purpose of this PAK Tip is to present one of the features of the “PAK Arithmetic” module implemented in PAK 6.0.
This one allows to use conditional statements IF / ELSE / WHILE in the formulas of the "PAK Arithmetic" module.
We display an APS for two different vehicles. These two vehicles have their own descriptive data.
We want to compare their levels to a specification, which is different depending on the year of the model for example (this information is given in the descriptive data for each vehicle).
The use of conditional instructions in the "Arithmetic" module makes it possible to directly use the specifications corresponding to the year of the model and to display its template curve, without having to load it manually for each case
The descriptive data (PAKVehicle) of the vehicles are filled in:
In the "Arithmetic" module, we will create the template curves for the specifications (model year before 2000 and after 2000) and set up the "Variables" and "Formula" tabs:
► Step 1: "Variables"
► Step 2: "Formula"
Details of the formula:
- Creation of dataset calling the curves parameterized in " Tools / Edit Curve ".
- Recovery of the descriptive information " MODYEAR " of the " TestCandidate PAKVehicle ", contained in the data linked to the variable " car " declared in the tab " Variables ".
- Declaration of the conditional instruction which will assign the template corresponding to the year of the model (>2000 or <2000), according to what was read in @PAKVehicle.MODYEAR.
- Display of the result (the result is assigned a "measurement position" / PAK variable "POS" to call it "Template").
Bonus: to graphically compare the displayed data with the template, you can use a "Graphic Definition" feature.