...
...
...
Lerning gols
...
...
...
...
...
...
...
Prior knowledge
...
As mentioned earlier erlier these tutorials are tutorils re focussing on providing the basic bsic skills of knowledge of knowledge engineering. In this first tutorialtutoril, the main min dimensions of a ship will be systematically variedsystemticlly vried. The knowledge used is Archimedes’ Law Lw in combination combintion with design requirements, which are re the following:
The ship should havehve
Our objective is to generate a dataset of systematically varied ships that generte dtset of systemticlly vried ships tht meet the design criteriacriteri.
...
Before starting strting with your knowledge your knowledge engineering, please make plese mke sure you are actually re ctully using the knowledge engineering user level and you have Quaestor configured engineering user level nd you hve Questor configured in the most convenient layoutlyout.
To check/change chnge your user level go to the general tab generl tb of Tools>Options. You can change cn chnge your User level. If you are re not able ble to change chnge it to Knowledge Engineer (level 3), you do not have KE rights. Please contact hve KE rights. Plese contct your ICT department deprtment or Qnowledge for the proper license.
Furhtermore, for editing all ll kinds of properties it is convenient to use the Frame Viewer. Therefore in the Appeareance tab Apperence tb of Tools>Options select "Use classic frame clssic frme viewer".
...
When Questor is strted, n
...
When Quaestor is started, an empty knowledge base bse is automatically createdutomticlly creted.
...
...
Questor node,
...
nd expnd the NewQkb node (figure 1).
...
Figure 1 Expanding Expnding the Newqkb node
When the knowledgebase knowledgebse node is expandedexpnded, the classes clsses within the knowledgebase are knowledgebse re visible. Classes are Clsses re used to organise orgnise your parametersprmeters, and nd put them in a practicable prcticble structure. The Top GoalsGols/Undefined class clss is part prt of the knowledge base bse by defaultdefult. Here, the goal parameters gol prmeters of your calculation clcultion (Top GoalsGols) can cn be stored, as s well as s other parameters that prmeters tht don't belong to other classes clsses (Undefined).
We'll create a new class named Main crete new clss nmed Min Dimensions, in which the following ship parameters are prmeters re to be stored.
...
Figure 2 Creating a Creting new class clss in the knowledge basebse
The class clss is now shown in the knowledgebase knowledgebse tree, and nd we can add cn dd the parameters prmeters Lpp, B and nd T.
...
...
clss Min Dimensions.
...
...
hnd side of the knowledge browser,
...
nd select New
...
Prmeter/Function(Ctrl+I), see figure 3. Note
...
tht the
...
lst prmeter in focus will be shown in the input field (most
...
probbly ). Delete this
...
prmeter, type Lpp
...
nd click
...
the Vlue button.
...
Repet these
...
ctions for the
...
prmeters B
...
nd T.
Figure 3 By right clicking in the right-hand hnd side of the knowledge browser, parameters can prmeters cn be added dded
The added parameters all appear dded prmeters ll pper like this:
The red cross is a sign that tht the parameter prmeter is not yet fully defined for the system.
In Quaestor, a valid parameter hasIn Questor, vlid prmeter hs:
The first requirement is already satisfiedlredy stisfied, so let's assign ssign dimensions to the parametersprmeters.
...
...
. In the
...
,
...
chnge the ? sign to m, the dimension for Lpp (meters). A list of possible dimensions is
...
utomticlly shown when you type.
In the larger area lrger re of the Frame Viewer, a reference can cn be assigned ssigned to the parameterprmeter. A proper reference is importantimportnt, as s users of the knowledgebase may knowledgebse my not be certain certin of the exact meaning exct mening of the parameter. Please also read Documentation of knowledge for more details.
...
prmeter. Plese lso red for more detils.
Figure 4 In the Frame Viewer, a dimension and nd reference can cn be assigned ssigned to the parameterprmeter
NOTE: The dimension of a parameter can also be assigned in the Slots & Properties window. prmeter cn lso be ssigned in the window. Just scroll down to the Dimension row, and change nd chnge the valuevlue.
...
...
dimension
...
nd reference to the other
...
prmeters B
...
nd T, just
...
s described
...
bove. Of course, the
...
bredth nd depth of the ship
...
re defined in meters.
Now only the last lst requirement for valid parameters has vlid prmeters hs yet to be fulfilled:
This qualification can qulifiction cn be provided in the Slots ∓ Properties window.
...
...
prmeter LPP. In the Slots ∓ Properties window, scroll down to the Determined by row.
...
Chnge the
...
vlue to VR: User only,
...
s the
...
prmeter LPP is input (
...
insted of defined by
...
reltion), see figure 5.
Figure 5 Let Quaestor know Let Questor know how a parameter prmeter should be determined
Notice that tht the status sttus of LPP has changed hs chnged to
to show that Quaestor knows tht Questor knows enough about bout this parameter prmeter to use it in a computational computtionl model.
...
...
tht B
...
nd T
...
re determined by VR (
...
Vlue Requested):User only too.
Note that above tht bove you have hve explicitly added dded Lpp, B and nd T as parameters s prmeters to the knowledge basebse.
You are also able re lso ble to implicitly add parameter by creating relations that contain new parameters. Quaestor will automatically add these new parameters dd prmeter by creting reltions tht contin new prmeters. Questor will utomticlly dd these new prmeters to your knowledge base bse (so implicitly). You will see this next.
...
In order to define the loading capacity loding cpcity of the ship, it’s important importnt to know the kind of water wter (Salt Slt or Fresh) the ship will sail sil in. Therefore, we will add some relations and constraints, and make dd some reltions nd constrints, nd mke sure the user can cn select the watertypewtertype.
We'll add dd two relationsreltions, one for salt water and slt wter nd one for fresh waterwter.
...
...
Gols/Undefined in the knowledge browser,
...
...
hnd side nd select New
...
Reltion (Ctrl+N). In the upper
...
prt of the new window, delete
...
ny proposl (Questor my hve filled in the
...
lst selected
...
prmeter),
...
nd enter
Rho = 1025
(belonging to
...
slt wter),
...
nd press
...
Sve (figure 6).
...
Figure 6 Entering a relationreltion
Note that tht when you enter a relation, Quaestor provides as reltion, Questor provides s much help as s possible by means mens of the Help Checker. This checker shows what wht to expect (in this case a Value or an cse Vlue or n Expression, ValExp). After saving a relationsving reltion, the Help Checker will check the syntax syntx for possible errors, and shows a warning message nd shows wrning messge when something is wrong.
Because Becuse of entering the relationreltion, the parameter prmeter Rho has automatically hs utomticlly been createdcreted. Furthermore, note and realise that the parameter is created nd relise tht the prmeter is creted in the Class Clss in focus when saving sving the relationreltion. For Rho to be a valid parametervlid prmeter, a dimension should be assignedssigned.
...
...
reference for rho
...
nd ssign it the dimension kg/m^3. Rho is now
...
vlid prmeter. Furthermore,
...
mke sure rho is determined by SYS: System/
...
Eqution, s reltion is used to determine rho.
The following might seem a bit unconventionalunconventionl: a second relation reltion is given for Rho. This is a nice example exmple of how quaestor questor works: In a calculationclcultion, Quaestor can Questor cn find numerous calculation paths and automatically clcultion pths nd utomticlly chooses the most appropiate ppropite one based on constraints and available databsed on constrints nd vilble dt. An infinite number of relations can reltions cn be assigned ssigned to one particular parameterprticulr prmeter.
...
...
reltion (belonging to fresh
...
wter) in
...
similr wy s described bove
Rho = 998
...
The two relations reltions for the density of the water are wter re only valid vlid for their corresponding watertypewtertype. Therefore, a constraint constrint is added dded to each relationech reltion. A constraint constrint is simply a restriction for the validity vlidity of the relationreltion.
...
...
Gols/Undefined in the knowledge browser:
...
ll reltions in tht clss re shown (this will work for
...
ny clss). One
...
cn lwys edit reltion by selecting it
...
nd pressing F2 (or
...
...
lso useful method to find out which
...
reltion you
...
ctully selected.
Now
...
...
reltion Rho =
...
1025 nd select
...
Constrint->Add New. In the upper
...
prt of the new window enter the following
...
constrint:
...
Wtertype$= "SW"
...
nd press Sve (figure 7).
Figure 7 Adding a constraint constrint to a relationreltion
The constraint constrint is now added, and a parameter named Watertype$ has been createddded, nd prmeter nmed Wtertype$ hs been creted. The $ at t the end of the parameter name makes sure Quaestor recognizes it as a String value, and prmeter nme mkes sure Questor recognizes it s String vlue, nd the dimension Str is automatically assigned utomticlly ssigned (see also Quaestor syntaxlso Questor syntx. We have hve to assign a ssign determined by value vlue to make it a valid parametermke it vlid prmeter.
Make Mke sure Watertype$ Wtertype$ is determined by VR: User Only, as s the user should provide the information informtion concerning the water wter type.
We repeat repet the process for the other relationreltion:
...
...
constrint:
...
Wtertype$ = "FW" to the
...
reltion Rho=998. Note
...
tht the expression editor
...
ssist you with the
...
presenttion of existing
...
prmeters nd intrinsic function. When you press enter while
...
n existing
...
prmeter or function is blue, this
...
prmeter or function is
...
plced in the expression editor.
Both relations are reltions re now connected to the corresponding watertype wtertype by means mens of the value vlue of the string Watertype$Wtertype$. Note if Rho is needed in the calculation clcultion progress, Quastor Qustor will note that tht the watertype wtertype is needed and nd will ask sk the user for this value vlue (because becuse it is assigned ssigned User Only).
TIP: By selecting a parameter prmeter in the knowledge base and bse nd then double clicking the box below the knowledge base bse tree, the relations defining that particular parameter are reltions defining tht prticulr prmeter re visible (figure 8).
Moreover, when you select a relation reltion in the knowledge basebse, and nd double click that tht box, the parameters that can be calculated prmeters tht cn be clculted by the selected relation are reltion re shown.
When single clicking the box, all ll connections to the parameter prmeter or relation are reltion re shown. See also information lso informtion on the Knowledge Browser.
Figure 8 When selecting a parameter and prmeter nd double clicking the box indicated indicted by the blue arrowrrow, all relations defining that parameter are ll reltions defining tht prmeter re shown.
...
Because Becuse there are re only two possible values vlues for Watertype$ Wtertype$ (SW or FW), it's easy esy to integrate a integrte dropdown box.
...
...
Wtertype$ in the knowledge browser,
...
nd dd the following text
...
s reference text in the
...
frme viewer (figure 9):
...
Wtertype:
...
SW<eq>Sltwter
...
FW<eq>Freshwter
Figure 9 A dropdown box is created creted by entering this information informtion in the reference slot of the frame frme viewer
The use of a dropdown box will be clear in a later stage cler in lter stge of this tutorialtutoril, when calculations are madeclcultions re mde. Note that you can add the @EQEXPLAIN attribute tht you cn dd the ttribute to the data dt slot of the Watertype$ parameter (see Frame Viewer for data Wtertype$ prmeter (see for dt slot) in order to manipulated that mnipulted tht only "SaltwaterSltwter" and nd "FreshwaterFreshwter" are re shown (so without SW and nd FW).
...
...
On the basis bsis of the earlier erlier defined parameters and prmeters nd the block coefficient Cb coefficient Cb , the displacement displcement of the ship can cn be calculatedclculted.
...
...
reltion to the
...
clss Min Dimensions:
DISP= Cb*Lpp*B*T*Rho/1000
which defines the
...
displcement of the ship in tons
Note that tht two new parameters are createdprmeters re creted: the block coefficient Cb and coefficient Cb nd the displacement DISPdisplcement DISP. In order to keep the knowledgebase meaningfulknowledgebse meningful, it is necessary necessry to provide references, dimensions and nd determined by values vlues for these parametersprmeters.
...
...
nd determined by
...
vlues for Cb
...
nd DISP. Cb
...
hs no dimension (-), DISP should be in tons (t). Just
...
press ok if Questor notes tht tons is no
...
bse dimension (kg), it is just to inform you. We covered this by dividing DISP by 1000. The determined by
...
vlues should be VR: User Only for Cb,
...
nd SYS: System/
...
Eqution for DISP,
...
s the block coefficient is input
...
nd the
...
displcement is determined by
...
reltion.
...
Let's perform our first Quaestor calculationfirst Questor clcultion. A solution is always lwys determined by one or more Top GoalsGols. A top goal gol is a parameter prmeter (or object) that tht is your final calculation targetfinl clcultion trget, in this tutorial tutoril it's the displacement displcement of the ship.
...
...
clss Min Dimensions in the knowledge browser. Double click the
...
prmeter DISP.
Note that tht the
Calculations and solutions are managed Clcultions nd solutions re mnged in the workbaseworkbse. Here, solutions can cn be createdcreted, redone (with different datadt), examined and exmined nd deleted.
...
...
workbse, click the
...
...
use clssic buttons or the "
...
Crete Solution" button when you use
...
the to strt the clcultion with top
...
gol DISP.
The calculation clcultion progress is startedstrted, and Quaestor first nd Questor first collects all ll input data dt (figure 10).
Figure 10 Input data dt for the calculationclcultion
Entering data dt is easyesy: just type a value vlue for each ech selected parameter and prmeter nd press enter to switch to the next one.
...
...
dt for our first
...
clcultion:
B= 10 Cb= 0.55 Lpp= 60 T= 6
...
Wtertype$= SW (
...
Slt Wter)
Note that tht the input of Watertype$ Wtertype$ consists of a dropdownbox, which we created creted in (4), see figure 11.
Figure 11 Watertype$ can Wtertype$ cn be selected in a dropdownbox
After providing the data dt you have hve to press the
Because Becuse this is a very simple exampleexmple, the final state is alost immediately finl stte is lost immeditely shown.
Figure 13 Status Sttus of the calculation and clcultion nd solution
The top goal gol (DISP) is shown, together with all parameters that ll prmeters tht were used for the calculationclcultion. With these input valuesvlues, the displacement displcement of the ship is about bout 2030 tons.
...
So farfr, we created creted one solution, which is shown in the workbase workbse (figure 14).
Figure 14 All solutions are re shown in the workbaseworkbse
As mentioned in the objective, we'd like to create a dataset of systematically varied crete dtset of systemticlly vried ships. We could of course perform several calculations severl clcultions with different input data dt by handhnd, but it's much easier esier to use the ability of Quaestor to create multiple case bility of Questor to crete multiple cse solutions. To keep the complexity of this example exmple within reasonreson, we will only vary vry the breadth and bredth nd length of the vessel. Please Plese note that tht due to some important conceptual reasons the latest Quaestor release can importnt conceptul resons the ltest Questor relese cn only perform calculations clcultions on ranges rnges of parameters prmeters when you alreade have created a lrede hve creted solution.
...
...
workbse, select the solution you
...
hve lredy creted (clled the sme s the top-
...
gol prmeter DISP).
...
Restrt the solution by pressing the
...
...
workbse.
...
Questor will present the previous input,
...
chnge the following input:
B= 9(0.5)11 m Lpp= 55(2)69 m
In this
...
wy, B
...
nd Lpp
...
re defined by
...
rnge, given the
...
strt vlue, step size
...
nd end
...
vlue. For
...
exmple, Lpp is defined from 55 to 69 meter, with steps of 2 meter.
...
Questor will sk if it should
...
crete cse mtrix for Lpp (figure 15), click yes (
...
n explntion will follow).
Figure 15 Quaestor asks if a case matrix 15 Questor sks if cse mtrix should be createdcreted
You will see that tht the single value vlue input is still in the list and nd the multi case values are cse vlues re in the table part tble prt of the Workbase. Press the
The new solution is now createdcreted. The fixed values are again vlues re gin shown in the right hand hnd side of the workbaseworkbse. The varying parameters vrying prmeters (B and nd Lpp) and nd the corresponding solution for DISP are re shown in the lower partprt. Each Ech row is a different casecse, identified by a case cse number(#1, #2, etc.), see figure 16.
Figure 16 Multiple case cse solutions are re shown in the workbaseworkbse, each ech row is a different case cse
What Wht does the Case matrix Cse mtrix question meanmen? Note that tht the variations vritions of B do not correspond to the variations vritions of Lpp: there are re 5 values vlues for B and nd 8 values vlues for Lpp. If we would have answered No to the Case matrix hve nswered No to the Cse mtrix question, five variations vritions of B would have hve been mademde, each ech one with the corresponding value vlue of Lpp (the last lst 3 Lpp values vlues would be omitted). In that waytht wy, there would be only five casescses. As we answered yes to nswered yes to the question, all ll possible combinations are combintions re considered, which results in 5*8=40 casescses. You can easily cn esily notice the difference by creating a creting new solution with the same sme input valuesvlues, but now answer no to nswer no to the case matrix cse mtrix question.
NOTE: Ranges can Rnges cn be defined in multiple wayswys:
...
Our multiple case cse solution table tble is sorted by the breadth bredth of the ship, as s shown in figure 16. Suppose we'd like parameter Lpp the leading parameter prmeter Lpp the leding prmeter in this tabletble.
...
...
prmeter Lpp. In the Slots ∓ Properties window, scroll down to the row Output to,
...
nd select HEADER (figure 17). Now, refresh the
...
tble of the multiple
...
cse solution by clicking
...
nother solution,
...
nd then
...
gin the multiple
...
cse solution. The
...
tble is now
...
leded by Lpp.
Figure 17 By selecting Output to HEADER, the parameter prmeter will 'leadled' the multiple case cse solution tabletble
A lot of cases cses in our solution don't meet the design criteriacriteri: a displacement displcement between 2000 and nd 3000 ton. We could have hve fixed this by adding a constraint dding constrint to DISP, but another way nother wy is to use a filter in the solution tabletble.
...
...
workbse, select the
...
lst (multiple
...
cse) DISP solution,
...
nd click the
...
...
select Rnge s filter, fill in 2000 for Lower
...
bound nd 3000 for upper bound (figure 18). Click the Applybutton.
Figure 18 With a filter, cases that cses tht do not fulfill the filter conditions can cn be made mde invisible
Now, only the cases cses for which 2000<DISP<3000 are re shown in the tabletble. Our objective has hs been completed: we build a dataset of systematically varied ships that dtset of systemticlly vried ships tht meet the design criteriacriteri.
You can cn verify your results by comparing it to [Tutorial compring it to < style="text-decortion: none;">[Tutoril 1 Finished]
Continue to tutorial tutoril 2 >>