Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can type a name in the window and select whether it is a Value, String, Object, Function or a Document. Type in here “Loa” andselect ValuePlease note a valid name should not contain special characters and spaces. The created parameter “Loa” is placed in thethe Knowledge Browser with a red cross behind.

When you have experience with creating Quaestor knowledge creating Quaestor knowledge bases (see Knowledge engineering getting started course Part 1 (PDF document) and the Tutorials on Quaestor basics ) you will know that a parameter should always have a unique name, dimension and the system should “know” how to determine the value of the parameter.

...

A special remark has to be made concerning the “Determined by” field for use with Taxonomies. When you are sure that parameters should be requested as input, change the “Determined by” field to VR. When you add an Entity-relation or connect a relation to a parameter (see section2.3.3.2 below) leave the “Determined by” field to “USR” or “USL”. Quaestor will  Quaestor will make sure the added or connected relation is used and the red cross for the parameter will disappear the moment the relation is added or connected.

...

You can create tree nodes in the Knowledge Browserin order to group parameters, objects and relations. This is only a way to order your knowledge and has no functional meaning during the use of knowledge.

...

Now we have created parameters in the Knowledge BrowserThe next step is to include these parameters in Entity “Main Dimensions”. Two ways are available to include parameters in an Entity:

  1. Include parameters by a drag/drop action between Knowledge Browser and Workbase.
  2. Use option “include parameters from knowledge base” while creating a new Entity.

The first method is to include parameters in an Entity with the drag/drop functionality from the Knowledge Browser into thethe Workbase. This method will be explained by including the parameter “Loa” in the Entity “Main Dimensions”.

Select the Entity “Main Dimensions” in the Workbase to put the focus in the Workbase on the content of this Entity. Then you have toselect the parameter “Loa” in the Knowledge Browserhold the left mouse button and move the mouse to parameter list of the Entity “Main Dimensions” in the Workbase, see Figure 53. Now the Entity “Main Dimensions” contains the parameter “Loa”.

...

The second method to include parameters in an Entity is by means of the select option “include parameters from knowledge base” while in the Entity Editor. After closing the Entity Editor Quaestor presents  Quaestor presents a list of parameters that are defined in the knowledge base. All selected parameters will be included in the newly created Entity. This is especially convenient when a lot of parameters are already available in the knowledge base the moment you create a particular Entity.

...

It can be desirable to affect the sequence of parameters presented in the Workbase list during a dialogue. Normally Quaestor presents Normally Quaestor presents parameters in an alphabetical sequence. An @ORDER attribute in the Data Slot of a parameter defines the relative position of a parameter in the Workbase list. Define this position by: @ORDER:RelativePosition, in which RelativePosition is an integer. The higher the value of RelativePosition, the later the value is placed in the list. The @ORDER values of parameters to be presented need not to be subsequent values. Parameters are sorted on RelativePosition. Values with no @ORDER attribute are placed behind parameters with thethe @ORDER attribute.

We will explain this option only by placing parameter “Loa” at the top of the list. It is up to you to order the other parameters. First select parameter “Loa” in the right field of the Knowledge Browser and switch the radio button of the Frame Viewer to the data mode. In here you have to type “@ORDER:1”, see Figure 55 and Figure 56.

Please note figures in this tutorial can present the sequence of parameters different in comparison with your knowledge base. In that case probably parameters are ordered with @ORDER attributes. It is up to you to do the same.

...

Figure 55: Order parameters with @ORDER attribute in Data Slot of parameter

...

Figure 56: Loa on top of the list because of @ORDER: 1 in Data Slot of parameter

...

Parameter name

Dimension

Reference

Cb

[-]

Block coefficient

Displacement

[t]

Displacement of vessel at design draft

Rho

[t/m^3]

Density of water. Select water type;
1.025<EQ>Saltwater
1.000<EQ>Freshwater

T_design

[m]

Design draft of ship

Volume

[m^3]

Hull volume at design draft

...

Next drag and drop the parameters: “LppBoaCb, “DisplacementRhoT_design and Volume from the Knowledge Browser into the Entity “Hydrostatics”, see Figure 57.

...

First select the parameter Boa in Entity Hydrostatics in the Workbase. Move your mouse outside the input field and Select the right mouse button menu Taxonomy>Choose/create relation or press Ctrl+T (please note that you should right click on the right side of the input field in order to initiate the right mouse menu. When you right click above the selected input field, you will get a small menu with undo, copy, paste, etc. which is meant for copy/paste of values in this field).

...

Because the most common action of an Entity-relation is to refer to other Entities (see also paragraph 2.3.4 below), the expression editor for Entity relations start with the ENTITY#() function already placed by default at the right hand side of the expression. If you do not want to use this function you can always delete it.

By providing the unique and correct QEntityId within the ENTITY#() function, you can refer to information in other Entities. We want to refer to information in “Main Dimensions”. For that we have to know the unique QEntityId.

...

Please note that the value of QEntityID of Entity “Main Dimensions” as presented in this tutorial could differ  from your knowledge base, because it depends on the sequence in which you have created Entities in a Taxonomy Entity tree!

So, Quaestor returns  Quaestor returns QEntityNames of Entity objects at the moment you start within the Entity#() function (method 2). This functionality supports the Knowledge Engineer by searching for the right QEntityID. After selecting the ID (press enter after selecting the relevant Entity), placing the closing bracket and placing the dot, Quaestor will  Quaestor will show all available parameters in the selected Entity. With the cursors you can scroll to the correct parameter and press enter to select the parameter.

In this way we have to write and save the following relation:

This means “Boa is equal to the “Boa” of the Entity with QEntityID = 12.

Hereafter the cell colour of “Boa” in “Hydrostatics” has turned to yellow. So, cells of parameters with relations in Entities are coloured yellow. To reset the parameter back to an input value, select this parameter in the Workbase and select the right mouse button menu Taxonomy>Value = Input or Ctrl+T.

To edit an encapsulated relation, select in the Workbase this parameter and select the right mouse button menu Taxonomy>Edit relation or Ctrl+M.

Please note that the Entity relation is something special. When you have experience with creating Quaestor knowledge creating Quaestor knowledge bases (see the Tutorials on Quaestor basics ) you will know that normally, relation will be visible in the Knowledge Browser. Entity-relations however, will only be visible when you select the parameter in the Entity of the taxonomy tree. Furthermore, these type of relations are shown with a new Entity relation icon:. See also paragraph 2.3.4 below.

Create the Entity relation for “Lpp” in Entity “Hydrostatics” in the same with. This parameter must be equal to the value of “Lpp” in Entity “Main Dimensions”:

Finally we will provide relation to calculate “Displacement” and “Volume” in Entity “Hydrostatics”. The following calculation should be made:

...

  1. Add the relations to the Taxonomy as already done for the other parameters using the mouse button menu Taxonomy>Choose/create relation or Ctrl+T. Now you will have to delete the ENTITY#() function and add the expression. Or,
  2. Add the relations to the Knowledge Browser and include these for the parameters in an Entity.

...

2.3.3.3     Connect relation in Knowledge Browser to in Knowledge Browser to a parameter in an Entity

Start with creating one or more relations in the Knowledge Browser.

...

To connect the relation, in the Workbase select the parameter “Displacement” in Entity ‘Hydrostatics”. Then, select the right mouse button menu Taxonomy>Choose/create relation or press Ctrl+T. A window will open showing the available relations for the selected parameter in the Knowledge Browser.

...

Figure 67: Include relation from Knowledge Browser in Entity

Furthermore, please note that it is still possible to create a new taxonomy relation by selecting the first option in presented window.

...

In the first part of the tutorial, with parameter “Volume”, it was shown that it is possible to enable the user to modify calculated values after they are determined by the system. We can enable this functionality by adding a @MODIFY attribute to the data slot of the parameter.

First select parameter Volume in the right field of the Knowledge Browser and switch the radio button of the Frame Viewer to the data mode. In here you have to type @MODIFY, see Figure 68.

Figure 68: Provide parameter "Volume" with a @MODIFY attribute

2.3.3.5     Define minimum and maximum values for parameters

...

As an example we want to define a minimum and a maximum for the parameter “Cb”. This value must be between 0 – 1.0 [-].The system should issue a warning if the computed or input value is not within the indicated boundaries. This is done by means of the attributesattributes @MAXVAL and @MINVAL.

When you want to make sure that this range cannot be superseded you also have to add the attribute @HARDRANGE.

Thus, the following attributes have to be added to the parameter “Cb” (how to add attributes to a parameter is described in 2.3.3.4.):

@MAXVAL:1.0
@MINVAL:0
@HARDRANGE

2.3.3.6     Show computed values during the dialogue

To show computed values during a dialogue you have to include the standard Quaestor parameterstandard Quaestor parameter “QEntityData (with the drag and drop functionality) from the Knowledge Browser in Entity Hydrostatics”. You will find the parameter by either typing its name in the search box of the Knowledge Browser (field 1 of Figure 32). Or go to the top node of the tree in the Knowledge Browser (with the name of your knowledge base) and search in the list on the right side.

After dragging and dropping the parameter to the Entity, write @SHOW” within the value of this parameter. Now, computed values in this Entity will always be shown during a dialogue. Figure 69 presents the result for Entity “Hydrostatics”.

...

  1. The general approach is to create Entity relations when you are developing a Taxonomy type of knowledge base. 
    Only used normal relations when you want to use the modeling/reasoning functionality of Quaestorof Quaestor. You might want to use the modeler when you want to execute complex models which make use of reasoning an advantage over a normal traditional fully hardcoded model (which a Taxonomy is to some extent). This is the case when you want the structure (network of relations) of a model to be dependent on the choices made and input provided by the user.
  2. The main reason to use normal relations and connecting them to parameters in an Entity is when you know that the relation will be used on multiple positions in the Taxonomy. In that case you rather create one relation and connect it to the parameters in the relevant Entities.
  3. Use the ENTITY# function only in combination with Entity relations. You can use this function in normal relations but this is not advisable. The reason for use only in Entity relations is that, in case of an Entity relations, the EntityID in the ENTITY# function will be renumbered when modifications are made to the Taxonomy that cause Entities to be renumbered. This renumbering in the relation will not take place for normal relations.

...

Provide parameter “Nr” with the special attribute @NRINST in the Data Slot of the parameter. The @NRINST attribute tells Quaestorthat  tells Quaestor that the value given/calculated for this parameter indicates the number of instances/cases in an object (in this case an Entity).

Furthermore it is useful to provide “Nr” also with the attribute @INTEGER, see Figure 71. The @INTEGER attribute limits input or computed values of the parameter to integer values. If other than integer values are either computed or provided, the system issues a warning and prompts for other input or for other input of the related input.

...

Normally, any single (constant) value is placed in the list view, see Figure 4.

The @MULTVAL attribute forces single value parameter to present itself in the table of an Object/Entity. The @MULTVAL attribute is used in parameters if you wish to obtain a table which includes all values of these parameters whether they are single (constant) values or not. Figure 17 in chapter 4.6 of the first part shows an example.

We want the following parameters to be shown in the table: “Name$”, “CaseID”, “Frame_Nr” and “X”. So you have to provideprovide @MULTVAL attribute in the Data Slot of these four parameters. By doing this you can see the location of these parameters are moved from list view to table view (you might have to force Quaestor to force Quaestor to review the Workbase by switch between Entities). Please notice the differences between Figure 70 and Figure 72.

...

Figure 72: Parameters with @MULTVAL attribute in Entity Transverse planes

...

Select parameter X in Entity “Transverse planes” in the WorkbaseSelect the right mouse button menu Taxonomy>Choose/create relation or press Ctrl+T. Create the following relation:

...

For each case, representing a transverse reference plane, this relation will be calculated. Parameter “Frame_spacing” does not contain a@MULTVAL attribute, thus the value provided for “Frame_spacing” will be constant for each case.

...

It is possible to provide a proposed default value for “Frame_spacing” in the solution that can be overruled by the user by simply providing this value for the parameter in the Entity. For example, type 700 in the value cell of Frame_spacing”.

2.3.6.5     Use of ORCA

...

() function to calculate numbers for each case: CaseID

Select parameter “CaseID” in Entity “Transverse planes” in the WorkbaseSelect the right mouse button menu Taxonomy>Choose/create relation or press Ctrl+T. Create the following relation:

  • CaseID = ORCA(1)

The function ORCA(1) returns the current case number which is now being executed. Later on we will use this calculated value to refer to one of these transverse reference planes.

Please note that you also could have made a relation in the Knowledge Browser and connect it to the parameter (the second method for Entity relations, see 2.3.3.2) because you will use the same relation for the horizontal reference planes.

2.3.6.6     Include standard Quaestor parametersstandard Quaestor parameters: QEntityData, QEntityDoc and QEntityRef to illustrate and describe the Entity

Include (with the drag and drop functionality) from the Knowledge Browser the standard Quaestor parametersstandard Quaestor parameters “QEntityData,QEntityDoc and QEntityRef in Entity Transverse planes”. These parameters will not be visible for users of your knowledge base.

  • To show the computed values for this Entity “Transverse planes” during a dialogue write “@SHOW’ behind “QEntityData”.
  • You can add a picture in “QEntityDoc”, which explains definitions of reference planes and the coordinate system of the vessel to the user in the Explanation window. 
    Select QEntityDoc in Entity “Transverse planes” and select the right mouse button menu Taxonomy>Include Binary Data
     orCtrl+B, see Figure 73. Browse to the file you want to include, we propose the provided picture “reference_planes.bmp”.

...

Figure 73: Include Binary data in standard Quaestor parameter standard Quaestor parameter QEntityDoc

  • Comparable to assigning reference to a parameter, you can assign a reference to an Entity. Behind the included “QEntityRef” you can assign an unlimited Entity reference text, which will be shown in the html Explanation window. For example; “Define number of transverse reference planes”

2.3.6.7     Define a Entity specific presentation name for a parameter

You can use a @WBNAME parameter attribute to define a presentation name to the user. For example, you want to define a presentation name “Number of transverse reference planes” for “Nr”.

...

After instantiating parameter “Nr” in Entity “Transverse planes” you can provide the following attribute in the Data Slot of the frame viewer@WBNAME:Number of transverse reference planes. Furthermore you can change locally the reference text for “Nr” which is more applicable to Entity “Transverse planes”. For example, “Number of transverse reference planes” instead of “Number of instances”. Again note the text is written cursive, because you have instantiated the parameter “Nr”.

The same you can perform for parameter “Name$”. First instantiate parameter “Name$” in Entity Transverse planes” and provide the following attribute in the Data Slot of the frame viewer@WBNAME: Name of reference plane. Again you can change locally the reference text for “Name$” which is more applicable to Entity “Transverse planes”. For example, “Name of transverse reference plane” instead of “Name of object”.

Please note, you are able to define a presentation sequence of parameters (within a specific Entity) by providing @ORDER attributes forinstantiated parametersSee 2.3.2.4, for the explanation of @ORDER attribute.

Finally Entity “Transverse planes” should more or less look like Figure 74.

...

  • Provide parameter “Z” also with an attribute @MULTVAL in the Data Slot of the parameter.
  • Next include the following parameters in Entity “Horizontal planes“: “Nr”, “Name$”, “CaseID”, “Z”, “QEntityDataQEntityDocand QEntityRef”.
  • Parameters “Nr”, “Name$ and “Z” will be requested to the user (so all are VR parameters). Instantiate the parameters “Nr” and “Name$” in Entity “Horizontal planes” and provide for both parameters a @WBNAME attribute to define a presentation name for the user.
  • Create the following relation CaseID = ORCA(1)
  • To show computed values during a dialogue write “@SHOW” behind “QEntityData”.
  • Add picture “reference_planes.bmp” as Binary to “QEntityDoc”.
  • Assign the following text for “QEntityRef”; “Define number of horizontal reference planes

...

During the dialogue the user will be asked the number of Deck Entities he wants to include. If you include the “Nr” parameter in the “container” Entity “Decks” this will be the parameter which determines the number of “Deck” Entities that will be placed, because “Nr” contains an @NRINST attribute in the Data Slot, as explained in 2.3.6.1.

...

Please note “#” behind a parameter name automatically indicates this will be a Telitab in Quaestorin Quaestor, which mean this parameter can contain Text, a List or a Table. We now will use it to create a Table. For more detailed information about a TeLiTab see TeLiTab.

  • Next include the following parameters in Entity “Decks“: “Nr”, “Total_deck_area”, “Deck_data#”, “Total_accommodation_area”, “Total_accommodation_area#”, “QEntityRef and QEntityData”.

...

Parameter name

Dimension

Reference

B

[m]

Width

Area

[m^2]

Area

Deck_function$

[$]

Define function of deck
Accommodation<EQ>
Cargo deck<EQ>
RoRo<EQ
Tanktop<EQ
Other<EQ>

L

[m]

Length

Weight_area_factor

[t/m^2]

Weight factor per area

X_aft

[m]

Aft deck position in X (longitudinal) direction

X_front

[m]

Front deck position in X (longitudinal) direction

X_aft_plane_ID

[ID]

Define aft (longitudinal) position of deck by selecting a transverse reference plane

X_front_plane_ID

[ID]

Define front (longitudinal) position of deck by selecting a transverse reference plane

Z_plane_ID

[ID]

Define Z (vertical) position of deck by selecting a horizontal reference plane

...

Provide the following relations (the explanation of the relations will follow):

  • B = ENTITY#(xx).Boa (for xx fill in the value of QEntityId of Entity “MainDimensions
  • Area = L*B
  • L = X_front - X_aft
  • To show computed values during a dialogue write “@SHOW” behind “QEntityData”.

Please note all parameters in Entity “Deck” should be in the list View and not in the table view, because all values are constant single values. So, parameters “Z" and Name$ “in Entity “Deck” are automatically placed in the table view because you have provided a @MULTVAL attribute to these parameters earlier. You can instantiate the parameters in Entity “Deck” and remove the @MULTVAL attribute locally.

A second option is to provide @NOMULTVAL attribute in parameter “QEntityData” of Entity “Deck”. Now all @MULTVAL attributes within this Entity will be ignored.

...

  • Instantiate the parameter;
  • Add the @HIDE attribute to hide is.

How to connect the start and end position to the reference planes will be discussed next.

2.3.9.1    Create selection list of reference planes with @SELECTENTITY attribute with @SELECTENTITY attribute to position deck

We want to create a selection list from available data to position a deck according to specified reference planes in the reference Entities.

...

Include the following attributes in the Data Slot of parameter “X_aft_plane_ID”, see Figure 76:

  • @SELECTENTITY; the value or string Entity attribute @SELECTENTITY:QEntityID is used to create a selection list from data available in other Entities. You have to replace QEntityID with the value of QEntityID you want to refer to, in this case Entity ““Transverse planes”.
  • @SELECTENTITYKEY; the value or string parameter attribute @SELECTENTITYKEY:PAR is used to define the key parameter for the selection in a table of the Entity selection list (created by @SELECTENTITY). You have to replace PAR with the parameter you want to select. In this case we want to select the value of parameter “CaseID”.
  • @SELECTENTITYKEYTEXTPAR; the value or string parameter attribute @SELECTENTITYKEYTEXTPAR:PAR is used to define the parameter for selection in the Entity in the Entity selection list, a pointer to a sub Entity. In this case we want to select the value of parameter “Name$
  • @EQEXPLAIN; the value or string parameter attribute @EQEXPLAIN is used to show the description instead of the values (for instance in a combo box).

...

Figure 76: Create selection list of transverse reference planes with @SELECTENTITY attribute

Please note that the value “14” of Entity “Transverse planes” as presented in this tutorial can differ from your knowledge base, because it depends on the sequence of creating Entities in a Taxonomy Entity tree!

...

The value of parameter “X_aft” should be the value of “X” from the selected transverse plane. This can be done by the following relation:

  • X_aft = ENTITY#(14).X.X_aft_plane_ID

This means the following: Entity “Transverse planes” (in this example Entity#(14)) contains a table of transverse planes, in which each column (case) represents a transverse plane. When the user has selected the second name from the table, the value of “X_aft_ID” = 2 (although “Name$” is presented to the user). So the value of “X_aft” equals to the second “X” value from the table within Entity “Transverse planes”:

Next, include exactly the same attributes for parameter “X_front_ID” as you did for “X_aft_ID” and provide the following relation.

  • X_front = ENTITY#(14).X.X_front_plane_ID

And finally do the same for “Z_plane_ID”. Please note now you have to refer to the QEntityID of Entity “Horizontal planes, in our example “15”. Create the following relation:

2.3.9.2     Provide @OBJECTTITLE to Provide @OBJECTTITLE to a multiple Entity like Deck

As shown in Figure 21, each Entity node name of a Deck contains the name and height of a deck. This can be developed by using the attribute @OBJECTTITLE in parameter “QEntityData” of Entity “Deck”. Behind this value you can provide a flexible string, for example.

  • @OBJECTTITLE:"Deck_" + Name$ + "; deck height = " + STR$(Z) + " m"

In here everything place between quotes will be presented as text. The value of a string parameter like “Name$” will also be shown as text. Finally if you also want to present a value of parameter (which is not a string by itself) within the node name of an Entity you first have to make a string of it, for example STR$(Z). See help function of Quaestor or of Quaestor or STR$().

To add the @OBJECTTITLE attribute to QEntityData, double click on the parameter value. The content will open in a larger Quaestor text larger Quaestor text editor.

2.3.9.3     End result Entity “Deck”

...

Please note that you can always change the presentation sequence of parameters by using a @ORDER attribute, see section 2.3.2.4 of this part. You can include presentation names for parameters which differ from the parameter name itself as explained in section 2.3.6.7. In Figure 77 this is done for parameter “Name$”.

...

  • Total_accommodation_area# = QUERY#(Deck_data#, "NullString", “Accommodation":"Deck_function$")

...

You see that the second relation has a condition (the INCASE() function). If “Total_accommodation_area#” is an empty table (which is possible if the user do not create decks with "Deck_function$" = "Accommodation") then the total accommodation deck area is 0 [m2]. Because the content of an empty table in Quaestor will in Quaestor will be: "0" + Qcrlf (in which Qcrlf is a Carriage return-line feed string constant) this should be the value to test the parameter on.

...

  • Add the “QEntityRef” and “QEntityData” parameters to “Decks”;
  • Assign the following text for “QEntityRef”; “Combined data of all decks” as explanation to the user.
  • To show computed values during a dialogue write “@SHOW” behind “QEntityData”.

2.3.11   Entity “Bulkheads”

...

Take care that with exception of parameter “Nr” and “QEntityData” all parameters are placed within the table view (if not, instantiate the relevant parameters and provide attribute @MULTVAL in Data Slot). 

  • To show computed values during a dialogue write “@SHOW” behind “QEntityData”

Again we want to create a selection list from data in the reference Entities to position in this case a bulkhead. In section 2.3.9.1 of this part we explained how to achieve this.

...

Next create the following relations:

  • Area = B*H
  • B = ENTITY#(xx).Boa (for xx fill in the value of QEntityId of Entity “MainDimensions”, or navigate with your arrow keys
  • H = Z_top - Z_bottom
  • X = ENTITY#(xx).X.X_plane_ID (for xx fill in the value of QEntityId of Entity “Transverse planes”)
  • Z_bottom = ENTITY#(xx).Z.Z_bottom_plane_ID (for xx fill in the value of QEntityId of Entity “Horizontal planes”)
  • ENTITY#(xx).Z.Z_bottom_plane_ID (for xx fill in the value of QEntityId of Entity “Horizontal planes”)
  • Z_top = ENTITY#(xx).Z.Z_top_plane_ID (for xx fill in the value of QEntityId of Entity “Horizontal planes”)

As for the parameter in Deck, the parameter “Weight_factor_area” show be instantiated and be provided with the @HIDE attribute. We will come back to this parameter in section 2.4.1.3 of this part.

...

Figure 78: Entity "Bulkheads"

...

Back to content | Continue with Mass calculation >>