Tutorial 2 TeLiTab Objects and ObjectsTeLiTabs | Learning goals
| Prior knowledge |
In this tutorial, you will create the shape of a ship's waterline in a table of frame numbers and relative, dimensionless widths. The dataset containing variations of the main dimensions of a ship from tutorial 1 is stored in a data object Ships in the dataset of the knowledge base, so it can be easily used in further calculations. This dataset combined with the dimensionless width table is used to calculate the width at the waterline at every other frame number 2 for every variation.
Note |
---|
Note that the word frame is used here as a ship's frame, not as a frame in Quaestor. |
Start
For this tutorial, the knowledgebase from tutorial 1 is used. You can either use your own (verified) knowledgebase, or download it here: [Tutorial 2 Start]
...
TeLiTab is an abbreviation of Text, List, Table (see TeLiTab for more detail). It is the standard format in which data is stored inside Quaestor, the easiest way to use data inside a knowledge based systems and the easiest way to exchange data with external applications (see also Use of external or satellite programs). An example of a telitab is given below, the black text to the right is comment and is not present in the actual telitab.
...
1 "Ship" { 3 "Lpp" 100 "B" 20 "Resistance" { 0 2 "R" "V" "1" 1000 10 "2" 1200 11 "3" 1300 12 "4" 1400 13 "5" 1500 14 "6" 1600 15 } } |
|
Every level of a TeLiTab contains list items and an optional table. The table can be omitted, but if there are no list items present at a certain level, a '0' is required (like above in the resistance telitab). Parameters and case numbers are written between double quotes (""). Numerical values are not written between quotes, strings that contain spaces are written between double quotes. For all syntax aspects please go to: TeLiTab
A Quaestor Object contains a set of data, either static (only data, e.g. a speed power curve or a list of components) or dynamic, and is represented as TeLiTab. An object can operate as a computational model, (requesting input and providing output) fulfilling the role of a function or subroutine in an assembled model (a ‘Solution’ in the Quaestor workbase).
The use of the TeLiTab format and Quaestor objects is covered in this tutorial.
In order to create the geometry of your ship, you will need an object that contains frame numbers and relative, dimensionless widths. To keep the knowledgebase arranged logically, create a new class:
Geometry
directly below Top Goals/Undefined.Creating classes is covered in tutorial 1.
The ship is defined mathematically, which makes it convenient to generate. The relation between the frame number (0 to 20) and relative width is:
Rel_B = 0.5 - 0.005 * (Frame - 10)^2
The shape of the
...
The use of the TeLiTab format and Quaestor objects is covered in this tutorial.
In order to create the geometry of your ship, you will need an object that contains frame numbers and relative, dimensionless widths. To keep the knowledgebase arranged logically, we will create a new class: “Geometry”.
Geometry
directly below Top Goals/Undefined.Creating classes is covered in tutorial 1.
The ship is defined mathematically, which makes it convenient to generate. The relation between the Frame number (0 to 20) and relative width is:
Rel_B = 0.5 - 0.005 * (Frame - 10)^2
The shape of the waterline is a polynomial (a parabola). You can enter this function in the Geometry class in the same way as in tutorial 1.
...
StartFrame
is an Object. Say no;StartFrame
is a Goal parameter or Input. Say no, because you want to provide this as input for the Waterline
object;FrameStep
and EndFrame
. Say no to the Object question and no to the Goal parameter question. These values are input to the object....
In this paragraph, an object is created that will be given contents later on. We will create the object Ships.
:
Ships
and select the type: Object....
Ships
is now a valid object in the knowledge base, but is not yet present in the dataset in the Workbase. WeYou'll have to add it.
Ships
parameter in the Knowledge Browser to the Dataset
node in the Workbase....
Our data object should contain all the ship variations produced in tutorial 1. Therefore, we will you are going to copy the results of the DISP
solution (with the variations) to the object Ships
using the clipboard.
DISP
solution and select All to Clipboard (or press F4). The Workbase Clipboard now pops up. Click on Preview. The contents of the DISP
solution are now displayed. You temporarily have to use a workaround now, because the Paste function is not yet implemented. Press Ctrl+A followed by Ctrl+C to copy the contents to the Windows clipboard. Click Cancel and close the clipboard. No need to save the values in there. Then right-click on the Ships
object in the Dataset and select Database Input or press Shift+F3. In the pop-up window that appears, select Use Editor and click Continue. In the window that appears next, press Ctrl+V to paste the data in the object. Click OK. Select Yes to All and click Continue....
This function states that the width of the ship at a certain frame number equals the relative width at that frame number multiplied with the total width of the ship. Notice that the frame number is no direct input in this relation, but Quaestor will still ask for it in a solution as Rel_B depends on that parameter.
We'll use
There is an alternative way of creating solutions. First we will , you need to add some attributes to the Ships
object. Attributes are used to direct the behaviour of Quaestor in solutions. All available attributes are described here. We will apply two attributesTwo attributes are needed: @DBENTRY and @DBOBJECT.
...
The main procedure to create solutions with an existing dataset is through the use of the Process Manager. In the Process Manager, datasets and top goals can be selected to create new solutions. Furthermore, existing solutions, macros or scenarios (these terms will be explained in another tutorial) can be restarted. First, we'll make sure our the top goal B_Frame
can be selected in the Process Manager.
B_Frame
to the class Top Goals/Undefined.Noteinfo |
---|
Parameters can always be exchanged between classes, there is no influence on the behaviour of Quaestor except that parameters in the Top Goals/Undefined class are visible in the process manager. |
...
The Process Manager starts. The left hand side shows all available datasets, in this case only our your Ships
object. The right hand side shows the available tasks. The parameters in the Top Goals class are shown here, as well as existing solutions.
B_Frame[Ships: #1]
is created.Frame
and click Next. PressB_Frame[Ships: #1]
is created.The purpose of all this is to create a table with values of However, we do want to create a case matrix (calculate all possible combinations, see tutorial 1), and continue with the calculation. Therefore, after the solution is finished, restart in and provide a range for Frame: 0(2)20. The result of the calculation is a table with B_Frame
for every ship of in the dataset over the full length (frame Frame
0 to 20).
The process manager can also be used to just select a dataset, and top goals can be selected in the knowledge browser. We will start the same solution, but add the displacement to the table.
In the Process Manager, just select Ships:#1. Click the Select Ships button. In the class Main Dimensions of the Knowledge Browser, double click the parameter Disp to make it a top goal. In the class Top Goals/undefined also double click the parameter B_Frame (remember that multiple top goals are possible in Quaestor). Start a solution. Accept all proposed values (by pressing enter), for Frame first give a value and continue. Restart the solution and provide for Frame 0(2)20. Make a case matrix again and continue.
Now, the parameter Disp is shown in the output table too, together with its case depending parameter Lpp.
For a first run of a solution, no range use is allowed, except when you specifically tell Quaestor that it is:
Top Goals/Undefined
class.B
and in the Properties window, select the Parameter tab. In the Data field, enter: @RANGEALLOWED
.Frame
parameter.B
, enter as value 9(0.5)11
and for Frame
, enter as value: 0(2)20
, then click Next. Answer Yes to the question about the case matrix.The result of the calculation is a table with B_Frame
for every ship of the dataset over the full length (frames 0 to 20).
Finally, let's explain the attributes used. The @DBENTRY and @DBOBJECT are used to configure access to the Dataset containing objects. This is best experience experienced by the difference in behaviour of the process manager.
The dataset of Quaestor can only containt contain objects on its top level (below the Dataset node). When you want to use the data in the Dataset, you can either select the object or define the object as database entry so that the Process manager will show it's content. @DBENTRY defines this entry point for selection of data by Quaestor (and thus in the process manager).
@DBOBJECT is an addition to the entry point definition and defines that an object may be available in the Dataset as multi case value. For instance several ships.
Try running the process manager without @DBOBJECT. It's now possible to select the cases within the Ships object, instead of the whole object (all cases). The reason is that Quaestor now expects there is only one relevant object, being the one specified as @DBENTRY, so only selections within this object are relevant to be shown in the process manager.
Please note that @DBOBJECT is an addition to @DBENTRY. So @DBENTRY should always be in the multi case object you want to use as entry point for your data in combination with @DBOBJECT.
Furthermore, at this moment it is not possible to do calculations for serveral several multi case objects at once (this behaviour is suggested in earlier Quaestor version earlier Quaestor versions in situation situations where you use @DBOBJECT without @DBENTRY and as a result are able to select several or All Ships...).
...
You can verify your results by comparing it to [Tutorial 2 Finished]