...
Tutorial 1 Getting |
...
started
|
...
Learning goals
|
...
|
...
|
...
|
...
|
...
|
...
|
...
| Prior knowledge |
...
As mentioned erlier earlier these tutorils re tutorials are focussing on providing the bsic basic skills of knowledge of knowledge engineering. In this first tutoriltutorial, the min main dimensions of a ship will be systemticlly vriedsystematically varied. The knowledge used is Archimedes’ Lw Law in combintion combination with design requirements, which re are the following:
The ship should hvehave
Our objective is to generte dtset of systemticlly vried ships tht generate a dataset of systematically varied ships that meet the design critericriteria.
...
Before strting starting with your knowledge your knowledge engineering, plese mke please make sure you re ctully are actually using the knowledge engineering user level nd you hve Questor configured engineering user level and you have Quaestor configured in the most convenient lyoutlayout.
To check/chnge change your user level go to the generl tb general tab of Tools>Options. You cn chnge can change your User level. If you re are not ble able to chnge change it to Knowledge Engineer (level 3), you do not hve KE rights. Plese contct have KE rights. Please contact your ICT deprtment department or Qnowledge for the proper license.
Furhtermore, for editing ll all kinds of properties it is convenient to use the Frame Viewer. Therefore in the Apperence tb Appeareance tab of Tools>Options select "Use clssic frme classic frame viewer".
...
When Quaestor is started, an
...
When Questor is strted, n empty knowledge bse base is utomticlly cretedautomatically created.
In the Knowledge browser, minimize the
...
Quaestor node,
...
and expand the NewQkb node (figure 1).
Figure 1 Expnding Expanding the Newqkb node
When the knowledgebse knowledgebase node is expndedexpanded, the clsses classes within the knowledgebse re knowledgebase are visible. Clsses re Classes are used to orgnise organise your prmetersparameters, nd and put them in prcticble a practicable structure. The Top GolsGoals/Undefined clss class is prt part of the knowledge bse base by defultdefault. Here, the gol prmeters goal parameters of your clcultion calculation (Top GolsGoals) cn can be stored, s as well s as other prmeters tht parameters that don't belong to other clsses classes (Undefined).
We'll crete new clss nmed Min create a new class named Main Dimensions, in which the following ship prmeters re parameters are to be stored.
Figure 2 Creting Creating a new clss class in the knowledge bsebase
The clss class is now shown in the knowledgebse knowledgebase tree, nd and we cn dd can add the prmeters parameters Lpp, B nd and T.
Select the
...
class Main Dimensions. in the right-
...
hand side of the knowledge browser,
...
and select New
...
Parameter/Function(Ctrl+I), see figure 3. Note
...
that the
...
last parameter in focus will be shown in the input field (most
...
probably QKnowledgebaseVersion). Delete this
...
parameter, type Lpp
...
and click
...
the Value button.
...
Repeat these
...
actions for the
...
parameters B
...
and T.
Figure 3 By right clicking in the right-hnd hand side of the knowledge browser, prmeters cn parameters can be dded added
The dded prmeters ll pper added parameters all appear like this:
The red cross is a sign tht that the prmeter parameter is not yet fully defined for the system.
In Questor, vlid prmeter hsIn Quaestor, a valid parameter has:
The first requirement is lredy stisfiedalready satisfied, so let's ssign assign dimensions to the prmetersparameters.
Select the Lpp in the Knowledge Browser. In the Frame Viewer,
...
change the ? sign to m, the dimension for Lpp (meters). A list of possible dimensions is
...
automatically shown when you type.
In the lrger re larger area of the Frame Viewer, a reference cn can be ssigned assigned to the prmeterparameter. A proper reference is importntimportant, s as users of the knowledgebse my knowledgebase may not be certin certain of the exct mening exact meaning of the prmeter. Plese lso red for more detils.parameter. Please also read Documentation of knowledge for more details.
Provide Lpp with the reference Length of the ship (figure 4).
Figure 4 In the Frame Viewer, a dimension nd and reference cn can be ssigned assigned to the prmeterparameter
NOTE: The dimension of prmeter cn lso be ssigned in the windowa parameter can also be assigned in the Slots & Properties window. Just scroll down to the Dimension row, nd chnge and change the vluevalue.
Assign a dimension
...
and a reference to the other
...
parameters B
...
and T, just
...
as described
...
above. Of course, the
...
breadth and depth of the ship
...
are defined in meters.
Now only the lst last requirement for vlid prmeters hs valid parameters has yet to be fulfilled:
This qulifiction cn qualification can be provided in the Slots & mp; Properties window.
Select the
...
parameter LPP. In the Slots &
...
Properties window, scroll down to the Determined by row.
...
Change the
...
value to VR: User only,
...
as the
...
parameter LPP is input (
...
instead of defined by
...
a relation), see figure 5.
Figure 5 Let Questor know Let Quaestor know how prmeter a parameter should be determined
Notice tht that the sttus status of LPP hs chnged has changed to
to show tht Questor knows that Quaestor knows enough bout about this prmeter parameter to use it in computtionl a computational model.
...
Make sure
...
that B
...
and T
...
are determined by VR (
...
Value Requested):User only too.
Note tht bove that above you hve have explicitly dded added Lpp, B nd and T s prmeters as parameters to the knowledge bsebase.
You re lso ble are also able to implicitly dd prmeter by creting reltions tht contin new prmeters. Questor will utomticlly dd these new prmeters add parameter by creating relations that contain new parameters. Quaestor will automatically add these new parameters to your knowledge bse base (so implicitly). You will see this next.
...
In order to define the loding cpcity loading capacity of the ship, it’s importnt important to know the kind of wter water (Slt Salt or Fresh) the ship will sil sail in. Therefore, we will dd some reltions nd constrints, nd mke add some relations and constraints, and make sure the user cn can select the wtertypewatertype.
We'll dd add two reltionsrelations, one for slt wter nd salt water and one for fresh wterwater.
Select Top
...
Goals/Undefined in the knowledge browser, in the right
...
hand side and select New
...
Relation (Ctrl+N). In the upper
...
part of the new window, delete
...
any proposal (Quaestor may have filled in the
...
last selected
...
parameter),
...
and enter
Rho = 1025
(belonging to
...
salt water),
...
and press
...
Save (figure 6).
Figure 6 Entering reltiona relation
Note tht that when you enter reltion, Questor provides s a relation, Quaestor provides as much help s as possible by mens means of the Help Checker. This checker shows wht what to expect (in this cse Vlue or n case a Value or an Expression, ValExp). After sving reltionsaving a relation, the Help Checker will check the syntx syntax for possible errors, nd shows wrning messge and shows a warning message when something is wrong.
Becuse Because of entering the reltionrelation, the prmeter parameter Rho hs utomticlly has automatically been cretedcreated. Furthermore, note nd relise tht the prmeter is creted and realise that the parameter is created in the Clss Class in focus when sving saving the reltionrelation. For Rho to be vlid prmetera valid parameter, a dimension should be ssignedassigned.
Provide a reference for rho
...
and assign it the dimension kg/m^3. Rho is now
...
a valid parameter. Furthermore,
...
make sure rho is determined by SYS: System/
...
Equation, as a relation is used to determine rho.
The following might seem a bit unconventionlunconventional: a second reltion relation is given for Rho. This is a nice exmple example of how questor quaestor works: In clcultiona calculation, Questor cn Quaestor can find numerous clcultion pths nd utomticlly calculation paths and automatically chooses the most ppropite appropiate one bsed on constrints nd vilble dtbased on constraints and available data. An infinite number of reltions cn relations can be ssigned assigned to one prticulr prmeterparticular parameter.
Add the following
...
relation (belonging to fresh
...
water) in
...
a similar way as described above
Rho = 998
...
The two reltions relations for the density of the wter re water are only vlid valid for their corresponding wtertypewatertype. Therefore, constrint a constraint is dded added to ech reltioneach relation. A constrint constraint is simply a restriction for the vlidity validity of the reltionrelation.
Double click Top
...
Goals/Undefined in the knowledge browser:
...
all relations in that class are shown (this will work for
...
any class). One
...
can always edit a relation by selecting it
...
and pressing F2 (or
...
and select edit). This is
...
also a useful method to find out which
...
relation you
...
actually selected.
Now the
...
relation Rho =
...
1025 and select
...
Constraint->Add New. In the upper
...
part of the new window enter the following
...
constraint:
...
Watertype$= "SW"
...
and press Save (figure 7).
Figure 7 Adding constrint a constraint to reltiona relation
The constrint constraint is now dded, nd prmeter nmed Wtertype$ hs been cretedadded, and a parameter named Watertype$ has been created. The $ t at the end of the prmeter nme mkes sure Questor recognizes it s String vlue, nd parameter name makes sure Quaestor recognizes it as a String value, and the dimension Str is utomticlly ssigned automatically assigned (see lso Questor syntxalso Quaestor syntax. We hve have to ssign assign a determined by vlue value to mke it vlid prmetermake it a valid parameter.
Mke Make sure Wtertype$ Watertype$ is determined by VR: User Only, s as the user should provide the informtion information concerning the wter water type.
We repet repeat the process for the other reltionrelation:
Add the
...
constraint:
...
Watertype$ = "FW" to the
...
relation Rho=998. Note
...
that the expression editor
...
assist you with the
...
presentation of existing
...
parameters and intrinsic function. When you press enter while
...
an existing
...
parameter or function is blue, this
...
parameter or function is
...
placed in the expression editor.
Both reltions re relations are now connected to the corresponding wtertype watertype by mens means of the vlue value of the string Wtertype$Watertype$. Note if Rho is needed in the clcultion calculation progress, Qustor Quastor will note tht that the wtertype watertype is needed nd and will sk ask the user for this vlue value (becuse because it is ssigned assigned User Only).
TIP: By selecting prmeter a parameter in the knowledge bse nd base and then double clicking the box below the knowledge bse base tree, the reltions defining tht prticulr prmeter re relations defining that particular parameter are visible (figure 8).
Moreover, when you select reltion a relation in the knowledge bsebase, nd and double click tht that box, the prmeters tht cn be clculted parameters that can be calculated by the selected reltion re relation are shown.
When single clicking the box, ll all connections to the prmeter parameter or reltion re relation are shown. See lso informtion also information on the Knowledge Browser.
Figure 8 When selecting prmeter nd a parameter and double clicking the box indicted indicated by the blue rrowarrow, ll reltions defining tht prmeter re all relations defining that parameter are shown.
...
Becuse Because there re are only two possible vlues values for Wtertype$ Watertype$ (SW or FW), it's esy easy to integrte integrate a dropdown box.
Select
...
Watertype$ in the knowledge browser,
...
and add the following text
...
as reference text in the
...
frame viewer (figure 9):
...
Watertype:
...
SW<eq>Saltwater
...
FW<eq>Freshwater
Figure 9 A dropdown box is creted created by entering this informtion information in the reference slot of the frme frame viewer
The use of a dropdown box will be cler in lter stge clear in a later stage of this tutoriltutorial, when clcultions re mdecalculations are made. Note tht you cn dd the ttribute that you can add the @EQEXPLAIN attribute to the dt data slot of the Wtertype$ prmeter (see for dt Watertype$ parameter (see Frame Viewer for data slot) in order to mnipulted tht manipulated that only "SltwterSaltwater" nd and "FreshwterFreshwater" re are shown (so without SW nd and FW).
...
...
On the bsis basis of the erlier earlier defined prmeters nd parameters and the block coefficient Cb coefficient Cb , the displcement displacement of the ship cn can be clcultedcalculated.
Add the following
...
relation to the
...
class Main Dimensions:
DISP= Cb*Lpp*B*T*Rho/1000
which defines the
...
displacement of the ship in tons
Note tht that two new prmeters re cretedparameters are created: the block coefficient Cb nd coefficient Cb and the displcement DISPdisplacement DISP. In order to keep the knowledgebse meningfulknowledgebase meaningful, it is necessry necessary to provide references, dimensions nd and determined by vlues values for these prmetersparameters.
Provide references, dimensions
...
and determined by
...
values for Cb
...
and DISP. Cb
...
has no dimension (-), DISP should be in tons (t). Just
...
press ok if Quaestor notes that tons is no
...
base dimension (kg), it is just to inform you. We covered this by dividing DISP by 1000. The determined by
...
values should be VR: User Only for Cb,
...
and SYS: System/
...
Equation for DISP,
...
as the block coefficient is input
...
and the
...
displacement is determined by
...
a relation.
...
Let's perform our first Questor clcultionfirst Quaestor calculation. A solution is lwys always determined by one or more Top GolsGoals. A top gol goal is prmeter a parameter (or object) tht that is your finl clcultion trgetfinal calculation target, in this tutoril tutorial it's the displcement displacement of the ship.
Select the
...
class Main Dimensions in the knowledge browser. Double click the
...
parameter DISP.
Note tht that the sign of DISP chnged changed to , indicting tht indicating that it's a top gol goal for the clcultioncalculation.
Clcultions nd solutions re mnged Calculations and solutions are managed in the workbseworkbase. Here, solutions cn can be cretedcreated, redone (with different dtdata), exmined nd examined and deleted.
In the
...
workbase, click the button when you
...
use classic buttons or the "
...
Create Solution" button when you use
...
the Workbase buttons to start the calculation with top
...
goal DISP.
The clcultion calculation progress is strtedstarted, nd Questor first and Quaestor first collects ll all input dt data (figure 10).
Figure 10 Input dt data for the clcultioncalculation
Entering dt data is esyeasy: just type vlue a value for ech each selected prmeter nd parameter and press enter to switch to the next one.
Enter the following
...
data for our first
...
calculation:
B= 10 Cb= 0.55 Lpp= 60 T= 6
...
Watertype$= SW (
...
Salt Water)
Note tht that the input of Wtertype$ Watertype$ consists of a dropdownbox, which we creted created in (4), see figure 11.
Figure 11 Wtertype$ cn Watertype$ can be selected in a dropdownbox
After providing the dt data you hve have to press the button or "Accept input & mp; Continue" button to continue. The ctul clcultion actual calculation is strted started now, nd and the right-hnd hand side of the workbse workbase shows the sitution situation of figure 13. During the clcultioncalculation, the box indicted indicated with the blue rrow arrow shows the sttus status of the clcultioncalculation.
Becuse Because this is a very simple exmpleexample, the finl stte is lost immeditely final state is alost immediately shown.
Figure 13 Sttus Status of the clcultion nd calculation and solution
The top gol goal (DISP) is shown, together with ll prmeters tht all parameters that were used for the clcultioncalculation. With these input vluesvalues, the displcement displacement of the ship is bout about 2030 tons.
...
So frfar, we creted created one solution, which is shown in the workbse workbase (figure 14).
Figure 14 All solutions re are shown in the workbseworkbase
As mentioned in the objective, we'd like to crete dtset of systemticlly vried create a dataset of systematically varied ships. We could of course perform severl clcultions several calculations with different input dt data by hndhand, but it's much esier easier to use the bility of Questor to crete multiple cse ability of Quaestor to create multiple case solutions. To keep the complexity of this exmple example within resonreason, we will only vry vary the bredth nd breadth and length of the vessel. Plese Please note tht that due to some importnt conceptul resons the ltest Questor relese cn important conceptual reasons the latest Quaestor release can only perform clcultions calculations on rnges ranges of prmeters parameters when you lrede hve creted alreade have created a solution.
In the
...
workbase, select the solution you
...
have already created (called the same as the top-
...
goal parameter DISP).
...
Restart the solution by pressing the or "Redo Solution" button in the
...
workbase.
...
Quaestor will present the previous input,
...
change the following input:
B= 9(0.5)11 m Lpp= 55(2)69 m
In this
...
way, B
...
and Lpp
...
are defined by
...
a range, given the
...
start value, step size
...
and end
...
value. For
...
example, Lpp is defined from 55 to 69 meter, with steps of 2 meter.
...
Quaestor will ask if it should
...
create a case matrix for Lpp (figure 15), click yes (
...
an explanation will follow).
Figure 15 Questor sks if cse mtrix 15 Quaestor asks if a case matrix should be cretedcreated
You will see tht that the single vlue value input is still in the list nd and the multi cse vlues re case values are in the tble prt table part of the Workbase. Press the button or "Accept input & mp; Continue" button to continue.
The new solution is now cretedcreated. The fixed vlues re gin values are again shown in the right hnd hand side of the workbseworkbase. The vrying prmeters varying parameters (B nd and Lpp) nd and the corresponding solution for DISP re are shown in the lower prtpart. Ech Each row is a different csecase, identified by cse a case number(#1, #2, etc.), see figure 16.
Figure 16 Multiple cse case solutions re are shown in the workbseworkbase, ech each row is a different cse case
Wht What does the Cse mtrix Case matrix question menmean? Note tht that the vritions variations of B do not correspond to the vritions variations of Lpp: there re are 5 vlues values for B nd and 8 vlues values for Lpp. If we would hve nswered No to the Cse mtrix have answered No to the Case matrix question, five vritions variations of B would hve have been mdemade, ech each one with the corresponding vlue value of Lpp (the lst last 3 Lpp vlues values would be omitted). In tht wythat way, there would be only five csescases. As we nswered yes to answered yes to the question, ll all possible combintions re combinations are considered, which results in 5*8=40 csescases. You cn esily can easily notice the difference by creting creating a new solution with the sme same input vluesvalues, but now nswer no to answer no to the cse mtrix case matrix question.
NOTE: Rnges cn Ranges can be defined in multiple wysways:
...
Our multiple cse case solution tble table is sorted by the bredth breadth of the ship, s as shown in figure 16. Suppose we'd like prmeter Lpp the leding prmeter parameter Lpp the leading parameter in this tbletable.
In the knowledge browser, select the
...
parameter Lpp. In the Slots &
...
Properties window, scroll down to the row Output to,
...
and select HEADER (figure 17). Now, refresh the
...
table of the multiple
...
case solution by clicking
...
another solution,
...
and then
...
again the multiple
...
case solution. The
...
table is now
...
leaded by Lpp.
Figure 17 By selecting Output to HEADER, the prmeter parameter will 'ledlead' the multiple cse case solution tbletable
A lot of cses cases in our solution don't meet the design critericriteria: displcement a displacement between 2000 nd and 3000 ton. We could hve have fixed this by dding constrint adding a constraint to DISP, but nother wy another way is to use a filter in the solution tbletable.
In the
...
workbase, select the
...
last (multiple
...
case) DISP solution,
...
and click the or "Filter" button. The filter window shows. For DISP,
...
select Range as filter, fill in 2000 for Lower
...
bound and 3000 for upper bound (figure 18). Click the Applybutton.
Figure 18 With a filter, cses tht cases that do not fulfill the filter conditions cn can be mde made invisible
Now, only the cses cases for which 2000<DISP<3000 re are shown in the tbletable. Our objective hs has been completed: we build dtset of systemticlly vried ships tht a dataset of systematically varied ships that meet the design critericriteria.
You cn can verify your results by compring it to < style="text-decortion: none;">[Tutoril comparing it to [Tutorial 1 Finished]
Continue to tutoril tutorial 2 >>