Tutorial 4 Telitabs and solution management | Learning goals
|
...
...
...
It is desirable to assign a stability and comfort rating to each of your ships. This rating, based on the rounded value of GM
, is available in TeLiTab format:0
...
The result of the above calculations contains a large amount of data that will not be necessary in further calculations. To clean up the solution, by removing the parameters we do not want to be displayed, we will use the function UNFOLD#(). This function can be used to change the hierarchy of a TeLiTab and to include or exclude parameters from a TeLiTab. We will adjust the relation that we used to calculate Stability_
check$check#
, to exclude parameters.
...
Stability_check#
to become:Stability_check# = UNFOLD#( SECTION#( Stability#, "", TEXTITEM$(1), "", 1), "", 1,"Ship_no","B","Lpp","T","DISP","Stab","Comf", "GM")
The meaning of this function can be found out by inspecting the documentation on UNFOLD#(). This function can be used to change the hierarchy of a TeLiTab and to include or exclude parameters. The mode of the function is 1 here, wich which means that only the parameters at the end of the syntax (Ship_no
to Comf
) are present in the telitabTeLiTab. Now, only the relevant data is displayed in the TeLiTab Stability_check#.
From the TeLiTab Stability_check#
we can now select the ship that scores best on both "Stab" as and "Comf" (Stability and comfort). To do so, we will use the function MATCHCASE().
...
Stability
:...
Best_ship_no = MATCHCASE( Stability_check#, 2, "Stab", "Comf", 10, 10, 1)
Worst_ship_no = MATCHCASE( Stability_check#, 2, "Stab", "Comf", 1, 1, 1)
These new parameters
...
are both dimensionless and System/Equation.
These functions return the case numbers of the ships that score either highest or lowest on stability and comfort. The function MATCHCASE() returns integer values, so the number of decimal places should be zero for these new parameters.
...
While working with a knowledgebase, it is convenient to have a small number of solutions that contain data in an organized way, rather than have a lot of solutions that contain separate results of calculations. In this paragraph, we will create one solution that contains the TeLiTab Stability#
Stability# as well as the best and worst ship numbers.
To add a parameter to a solution that will be calculated after a defined top goal, the attribute @SUBGOALS can be used. It should be placed in the dataslot Expression Data field of the expression editor of one of the relations that is used to calculate the top goal. We will address the sub goals in the relation for Stability_check#
.
...
...
Stability_Check#
in the Expression Editor, add the following attribute:See figure 3
@SUBGOALS: Best_ship_no, Worst_ship_no
Figure 3 Adding subgoals to a solution by using an attribute
The parameter Stability_check#
will now return an overview of all ship ships with stability and comfort rating. If this parameter is calculated, the best and worst ship number will be added to the solution because of the attribute above.
...
Stability_check#
using the ...
Ships
data.The result should be like shown in figure 4.Note: look like this:
Info |
---|
If Quaestor presents some parameters with an empty cell and waits to continue, these parameters may not be determined by System/Function or System/Expression. If you just press enter without changing something, the parameter will still be calculated though. If you'd like a fully-automatic solution, you'll have to change the determined by value in the |
...
Properties window of the pertaining parameter. |
...
As mentioned in a previous tutorial, by means of the @ORDER attribute in the data slot of a parameter, you can organise the order in which the end result is presented.
...
You can verify your results by comparing it to [Tutorial 4 Finished]