Versions Compared

Key

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

...

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    Entity Deck

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

...

  • 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.

%%%%%%%%%%%%%%%%%%%%

...

  • Add the following relations (

...

  • an explanation

...

  • 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

...


  • 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 ; Weight_factor_area
  • Set the @HIDE attribute on itAdd 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 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 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:QEntityID 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 in a Taxonomy Entity 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_ID

...

  • as you did for

...

  • X_aft_

...

  • I.
  • 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

2.3.9.2     Provide @OBJECTTITLE to a multiple Entity like Deck

...