Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

As a child of entity Decks you have already included  included the multiple (select one of more) entity Deck (see Developing a ship design process).

Thw The entity Decks can contain one or more Deck entities, each containing the same parameters and relations. However, the user can provide different input values for every Deck.

During the computation, the user will be asked the number of Deck entities he/she 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, as explained in Some handy attributes.

  • Add a new class under Top Goals/Undefined: Excel.

The class Excel is a container for everything that will be calculated by Excel later on.

  • Add the following parameters in the Knowledge Browser:

Parameter name

Dimension

Determined by

Reference

In Class

Total_deck_area

[m^2]

USR: User or system/equation

Total deck area

ExcelDimensions

Deck_data#

[Telitab]

USL: User or system/function

Table of deck data

ExcelDimensions

Total_accommodation_area

[m^2]

USR: User or system/equation

Total accommodation deck area

Dimensions

Total_accommodation_area#

[Telitab]

USL: User or system/function

Table of all accommodation deck data

Dimensions

...

  • Include the following parameters in entity Decks: Nr, Total_deck_area, Deck_data#, Total_accommodation_area, Total_accommodation_area#, QEntityRef.
Info
titleTip

If you forgot in which class you put a parameter, use the seach box at the top of the Knowledge Browser to find it for you.

...

Relations for these parameters will be included at a later stage, because these will be clearer to you when you first have developed the entity Deck.

2.3.9      Entity “Deck”

2    Entity Deck

  • Create a new class: Mass calculation under Top goals/Undefined. This class will be used later on.
  • Add Create the following parameters in the Knowledge Browser.:

 

Parameter name

Dimension

Determined by

Reference

In Class

B

[m]

VR: User only

Width

Dimensions

Area

[m^2]

USR: User or system/equation

Area

Dimensions

Deck_function$

[

$

Str]

VR: User only

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

General

L

[m]

VR: User only

Length

Dimensions

Weight_area_factor

[t/m^2]

USR: User or system/equation

Weight factor per area

Mass calculation

X_aft

[m]

VR: User only

Aft deck position in X (longitudinal) direction

Dimensions

X_front

[m]

VR: User only

Front deck position in X (longitudinal) direction

Dimensions

X_aft_plane_ID

[ID]

VR: User only

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

Dimensions

X_front_plane_ID

[ID]

VR: User only

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

Dimensions

Z_plane_ID

[ID]

VR: User only

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

Dimensions

 

  • Include the following parameters in entity Deck: Name$, Area, B, Deck_function$, L, Next include the following parameters in Entity “Deck“: “Name$”, “Area”, “B”, “Deck_function$”, “L”, “Weight_area_factor, X_aft, X_aft_plane_ID, X_front, X_front_plane_ID, Z, and Z_plane_ID and “QEntityData.

...

  • Add the following relations (

...

  • an explanation

...

  • will follow):

B = ENTITY#(

...

12).Boa (

...

12 is the value of QEntityId of

...

entity MainDimensions

...

)

Area = L*B

L = X_front - X_aft

...


  • Set the attribute @SHOW on QEntityData

All parameters in entity Deck should be in list view and not in 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 “Deckand Name$ in entity Deck are automatically placed in the table view because you have provided set @MULTVAL attribute to on these parameters earlier. You can instantiate the

  • Localize ("instantiate") these parameters in

...

  • entity Deck

...

  • and remove the @MULTVAL attribute locally.

A second option is would be to provide set @NOMULTVAL attribute in on parameter QEntityDataof Entity “entity Deck. Now all @MULTVAL attributes within this Entity entity will be ignored.

The user (ship designer) has to indicate the starting position and end position of a deck in longitudinal direction of the ship, with the parameters X_aftand X_front. This determines the length “length Lof the ship. Next we assume

Furthermore, it is assumed that the width Bof a deck is equal to the width over all Boaof Entity “entity MainDimensions. To assume rectangular decks the area is calculated by L*B.

You might wonder why we have added the “there is a Weight_factor_area” parameter. Although we will come to this in section 2.4.1.2 of this part, parameter. This is explained later on, but the main reason is that this parameter is a property of the Deck and as such should be part of the Deck” Entity entity. However, hereafter we you will discover that we do not want to give the input for this value should not be given in this Entityentity, but as part of the Mass calculation” Entity entity. In order not to show the parameter in this Entity do the followingentity:

  • Instantiate Localize ("instantiate") the parameter ;Add the @HIDE attribute to hide is Weight_factor_area
  • Set the @HIDE attribute on it.

We will come back to this last parameter in Mass calculation.

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 to position deck

3    Create a selection list

Now, you will We want to create a selection list from available data to position a deck according with respect to specified reference planes in the reference Entities.

The way to do this will be explained by determining the aft position of a deck.Include

  • Add the following attributes

...

  • to parameter

...

  • X_aft_plane_ID

...

  • :@SELECTENTITY
  • ; the value or string Entity attribute @SELECTENTITY:14 (QEntityID of Transverse planes).The entity Transverse planes 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).

Image Removed

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

  • with the other attributes.
  • @SELECTENTITYKEY:CaseID. The parameter CaseID is the parameter (of entity Transverse planes) whose values must be listed for selection.
  • @SELECTENTITYKEYTEXTPAR:Name$. The parameter Name$ defines the case description that must be displayed in the selection list.
  • @EQEXPLAIN. This results in the display of description rather than value, e.g. in a combobox.

Image Added

Note that you may have a different value than 14 herePlease 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 entities in a Taxonomy Entity the tree!

By including the attributes as described above, the user can select a reference plane from a drop down list, containing the names of all defined transverse reference planes. The result of the selection is a value of parameter CaseID, but the value of parameter Name$is presented shown to the user instead.

The value of parameter X_aftshould be the value of Xfrom the selected transverse plane. This can be done by

  • Add the following relation:

X_aft = ENTITY#(14).X.X_aft_plane_ID

This means the following: Entity “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 “of X_aft_ID” = will be 2 (although “although Name$” is was presented to the user). So, the value of X_aft” equals to will become the second “X” value from the table within Entity “entity Transverse planes”: (X_aft = ENTITY#(14).X.2)Next, include

  • Include exactly the same attributes for parameter

...

  • X_front_plane_ID

...

  • as you did for

...

  • X_aft_

...

  • plane_ID.
  • Add the following relation

...

  • :

X_front = ENTITY#(14).X.X_front_plane_ID

...

  • Do the same for

...

  • Z_plane_ID

...

  • .

...

  • Here, you have to refer to the QEntityID of

...

  • entity Horizontal planes, in our example

...

  • 15

...

  • .
  • Create the following relation:

Z = ENTITY#(15).Z.Z_plane_ID

...

4    Provide a name for a multiple entity

Image Added

As shown in Figure 21the calculation result above, each Entity Deck entity node name of a Deck contains the name and height of a deck. This can be developed accomplished by using the attribute @OBJECTTITLE in parameter QEntityDataof Entity “entity Deck. Behind this value you You can provide a flexible string, for example.:

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

In here 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 And, if you also want to present a the value of a parameter ( which is not a string by itself) within the node name of an Entity of the string type, you first have to make convert it to a string of it, for example STR$(Z). See help function of Quaestor or STR$().To add

  • Add the @OBJECTTITLE attribute to QEntityData. For this, double click on the parameter value. The content will open in a

...

  • larger editor

...

  • window.

5    Combine data from child entities

You now will

2.3.9.3     End result Entity “Deck”

The end result of Entity “Deck” is presented in Figure 77.

Image Removed

Figure 77: 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$”.

2.3.10   Create relations in Entity “Decks” which combines data from child Entities below

We want to create a table with a subset of parameter values of all defined decks.

The QEntity() expression collects  expression collects parameters of all child entities.

  • Create the following relation in

...

  • entity Decks

...

  • :

Deck_data# = QEntity(@Name$, @Deck_function$, @Z, @X_aft, @X_front, @Area)

We want to present the The total accommodation area will be shown separately. ThereforeFor this, parameter “Total_accommodation_area#” is introduced that should be a table (Telitab) that only contains data of decks with a "Deck_function$" = "Accommodation". We use the QUERY# , which is a Telitab (as its name ends with #). It should only contain data of decks for which Deck_function$ returns Accommodation. Use the QUERY# function, which returns a Telitab subset on the basis of a set of search criteria.

  • Create the following relation in entity Decks:

Total_accommodation_area# = QUERY#(Deck_data#, "NullString",

...

"Accommodation":"Deck_function$")

Next sums of the datasets are will be made using the SUM SUM function.

  • Create the following relations:

Total_deck_area = SUM(Deck_data#, 1, "Area")

Total_accommodation_area = INCASE(Total_accommodation_area# = "0" + Qcrlf, THEN, 0, ELSE, SUM(Total_accommodation_area#, 1, "Area"))

You see that the The second relation has a condition (the INCASE() function). If Total_accommodation_area#is an empty table (which is possible if the user do does 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 be: "0" + Qcrlf (in which Qcrlf is a Carriage return-line feed string constant) this should be the value to test the parameter on.Please note see in the rest of the wiki for more detailed information about functions used aboveagainst.

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

2.3.11   Entity “Bulkheads”

  • to QEntityRef
  • Set the @SHOW attribute on QEntityData

Image Added

6    Entity Bulkheads

As mentioned in Developing a ship design processAs mentioned in the first part, this ship configurator uses a different Entity entity structure for defining (transverse) bulkheads in comparison with defining decks. Of course the same Entity entity structure could be used, but it is more instructive to present (and develop) a different approach.

The development of the Bulkhead Entity Bulkheads entity is comparable to the Decks Entity entity. However, in the previous paragraphs we used a multiple Entity entity was used to enable the user to define one or more decks. Now we will develop an Entity Here an entity is developed where the user can create one table to define one or more transverse bulkheads instead of several Deck entities. Create another child Entity “Bulkheads” below the existing Entity “Bulkheads”.

Bulkheads child of “Bulkheads” Entity type: singular obligatory

Image RemovedContrary to Deck (child of Decks), which is multiple, the child entity Bulkheads (child of Bulkheads) is singular.

  • Create the following parameters in the Knowledge Browser.:

 

Parameter name

Dimension

Determined by

Reference

In Class

H

[m]

USR: User or system/equation

Height

Dimensions

X_plane_ID

[ID]

VR: User only

Define X position of bulkhead by selecting a transverse reference plane

Dimensions

Z_bottom

[m]

VR: User only

Bottom position bulkhead in Z (vertical) direction

Dimensions

Z_top

[m]

VR: User only

Top position bulkhead in Z (vertical) direction

Dimensions

Z_bottom_plane_ID

[ID]

VR: User only

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

Dimensions

Z_top_plane_ID

[ID]

VR: User only

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

Dimensions

 

  • Include the following parameters in last child entity Bulkheads: Nr, Name$, Area, B, H, Next include the following parameters in last created Entity “Bulkheads“: “Nr”, “Name$”, “Area”, “B”, “H”, “Weight_area_factor, X, X_plane_ID, Z_bottom, Z_bottom_plane_ID, Z_top, and Z_top_plane_ID and “QEntityData.

Take care that with With exception of parameter Nr” and “QEntityDataand the QEntity* parameters all parameters are must be placed within the table view (if not, instantiate view.

  • Localize ("instantiate") the relevant parameters and

...

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

Again, Again we want to create a selection list must be created from data in the reference Entities entities to position , in this case, position a bulkhead. In section 2.3.9.1 of this part we section 3 it was explained how to achieve this for decks.

  • Use this method for the new parameters

...

  • X_plane_ID

...

  • ,

...

  • Z_bottom_plane_ID

...

  • , and

...

  • Z_top_plane_ID

...

  • .
  • Next create the following relations:

Area = B*H

B = ENTITY#(

...

12).Boa (

...

12 is the value of QEntityId of

...

entity MainDimensions)

H = Z_top - Z_bottom

X = ENTITY#(

...

14).X.X_plane_ID (

...

14 is the value of QEntityId of

...

entity Transverse planes

...

)

Z_bottom = ENTITY#(

...

15).Z.Z_bottom_plane_ID (

...

15 is the value of QEntityId of

...

entity Horizontal planes

...

)

...

Z

...

_

...

top = ENTITY#(

...

15).Z.Z_top_plane_ID (

...

15 is the value of QEntityId of

...

entity Horizontal planes

...

)

Image Added

...

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.

The end result of Entity “Bulkheads” is presented in Figure 78.

Image Removed

Figure 78: Entity "Bulkheads"

  1. Back to content 

...

  1. | << Previous | Next >>