Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tutorial 4
Telitabs and solution management

Learning goals

  1. Modifying a dataset
  2. Performing string operations on telitabs
  3. Learn about more Quaestor funtions
  4. Managing solutions

1    Objective

In this Tutorial, we will evaluate the values of GM for each ship on the criteria stability and comfort for the crew. These criteria will be used to decide which ship is the most ideal, based on GM. Finally, we will generate one solution in which all the results of the previous tutorials are presented.

...

Note that our rating TeLiTab should be included in the dataslot of the relation, as described in tutorial 3. Make sure the syntax is valid, the data slot should contain:

TEXTITEM1=|0
3 "GM_rounded" "Stab" "Comf"
"1" 0.0 1 1
"2" 0.1 1 2
"3" 0.2 1 4
"4" 0.3 2 6
"5" 0.4 5 8
"6" 0.5 6 9
"7" 0.6 7 8
"8" 0.7 8 6
"9" 0.8 9 4 
"10" 0.9 9 2 
"11" 1.0 9 1 |

If you run a calculation now with Stability_check# as top goal (and select Data as dataset), you will obtain a solution in whichStability_check# using object Ships, augmented with: GMGM_roundedShip_noStabComfKBKGBM and Moment_of_Inertia

...

   Edit the relation for Stability_check# toStability_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 means that only the parameters at the end of the syntax (Ship_no to Comf) are present in the telitab. Now, only the relevant data is displayed in the TeLiTab Stability_check#

...

   Add the following relations to the class 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)

Which are both dimensionless and System/Equation. 

...