Lerning gols
Prior knowledge
As mentioned erlier these tutorils re focussing on providing the bsic skills of knowledge engineering. In this first tutoril, the min dimensions of ship will be systemticlly vried. The knowledge used is Archimedes’ Lw in combintion with design requirements, which re the following:
The ship should hve
Our objective is to generte dtset of systemticlly vried ships tht meet the design criteri.
Before strting with your knowledge engineering, plese mke sure you re ctully using the knowledge engineering user level nd you hve Questor configured in the most convenient lyout.
To check/chnge your user level go to the generl tb of Tools>Options. You cn chnge your User level. If you re not ble to chnge it to Knowledge Engineer (level 3), you do not hve KE rights. Plese contct your ICT deprtment or Qnowledge for the proper license.
Furhtermore, for editing ll kinds of properties it is convenient to use the . Therefore in the Apperence tb of Tools>Options select "Use clssic frme viewer".
When Questor is strted, n empty knowledge bse is utomticlly creted.
Figure 1 Expnding the Newqkb node
When the knowledgebse node is expnded, the clsses within the knowledgebse re visible. Clsses re used to orgnise your prmeters, nd put them in prcticble structure. The Top Gols/Undefined clss is prt of the knowledge bse by defult. Here, the gol prmeters of your clcultion (Top Gols) cn be stored, s well s other prmeters tht don't belong to other clsses (Undefined).
We'll crete new clss nmed Min Dimensions, in which the following ship prmeters re to be stored.
Figure 2 Creting new clss in the knowledge bse
The clss is now shown in the knowledgebse tree, nd we cn dd the prmeters Lpp, B nd T.
Figure 3 By right clicking in the right-hnd side of the knowledge browser, prmeters cn be dded
The dded prmeters ll pper like this:
The red cross is sign tht the prmeter is not yet fully defined for the system.
In Questor, vlid prmeter hs:
The first requirement is lredy stisfied, so let's ssign dimensions to the prmeters.
In the lrger re of the , reference cn be ssigned to the prmeter. A proper reference is importnt, s users of the knowledgebse my not be certin of the exct mening of the prmeter. Plese lso red for more detils.
Figure 4 In the , dimension nd reference cn be ssigned to the prmeter
NOTE: The dimension of prmeter cn lso be ssigned in the window. Just scroll down to the Dimension row, nd chnge the vlue.
Now only the lst requirement for vlid prmeters hs yet to be fulfilled:
This qulifiction cn be provided in the Slots ∓ Properties window.
Figure 5 Let Questor know how prmeter should be determined
Notice tht the sttus of LPP hs chnged to
to show tht Questor knows enough bout this prmeter to use it in computtionl model.
Note tht bove you hve explicitly dded Lpp, B nd T s prmeters to the knowledge bse.
You re lso ble to implicitly dd prmeter by creting reltions tht contin new prmeters. Questor will utomticlly dd these new prmeters to your knowledge bse (so implicitly). You will see this next.
In order to define the loding cpcity of the ship, it’s importnt to know the kind of wter (Slt or Fresh) the ship will sil in. Therefore, we will dd some reltions nd constrints, nd mke sure the user cn select the wtertype.
We'll dd two reltions, one for slt wter nd one for fresh wter.
Rho = 1025
(belonging to slt wter), nd press Sve (figure 6).
Figure 6 Entering reltion
Note tht when you enter reltion, Questor provides s much help s possible by mens of the Help Checker. This checker shows wht to expect (in this cse Vlue or n Expression, ). After sving reltion, the Help Checker will check the syntx for possible errors, nd shows wrning messge when something is wrong.
Becuse of entering the reltion, the prmeter Rho hs utomticlly been creted. Furthermore, note nd relise tht the prmeter is creted in the Clss in focus when sving the reltion. For Rho to be vlid prmeter, dimension should be ssigned.
The following might seem bit unconventionl: second reltion is given for Rho. This is nice exmple of how questor works: In clcultion, Questor cn find numerous clcultion pths nd utomticlly chooses the most ppropite one bsed on constrints nd vilble dt. An infinite number of reltions cn be ssigned to one prticulr prmeter.
Rho = 998
The two reltions for the density of the wter re only vlid for their corresponding wtertype. Therefore, constrint is dded to ech reltion. A constrint is simply restriction for the vlidity of the reltion.
Now
Wtertype$= "SW"
nd press Sve (figure 7).
Figure 7 Adding constrint to reltion
The constrint is now dded, nd prmeter nmed Wtertype$ hs been creted. The $ t the end of the prmeter nme mkes sure Questor recognizes it s String vlue, nd the dimension Str is utomticlly ssigned (see lso Questor syntx. We hve to ssign determined by vlue to mke it vlid prmeter.
We repet the process for the other reltion:
Both reltions re now connected to the corresponding wtertype by mens of the vlue of the string Wtertype$. Note if Rho is needed in the clcultion progress, Qustor will note tht the wtertype is needed nd will sk the user for this vlue (becuse it is ssigned User Only).
TIP: By selecting prmeter in the knowledge bse nd then double clicking the box below the knowledge bse tree, the reltions defining tht prticulr prmeter re visible (figure 8).
Moreover, when you select reltion in the knowledge bse, nd double click tht box, the prmeters tht cn be clculted by the selected reltion re shown.
When single clicking the box, ll connections to the prmeter or reltion re shown. See lso informtion on the .
Figure 8 When selecting prmeter nd double clicking the box indicted by the blue rrow, ll reltions defining tht prmeter re shown.
Becuse there re only two possible vlues for Wtertype$ (SW or FW), it's esy to integrte dropdown box.
Wtertype:
SW<eq>Sltwter
FW<eq>Freshwter
Figure 9 A dropdown box is creted by entering this informtion in the reference slot of the frme viewer
The use of dropdown box will be cler in lter stge of this tutoril, when clcultions re mde. Note tht you cn dd the ttribute to the dt slot of the Wtertype$ prmeter (see for dt slot) in order to mnipulted tht only "Sltwter" nd "Freshwter" re shown (so without SW nd FW).
On the bsis of the erlier defined prmeters nd the block coefficient Cb , the displcement of the ship cn be clculted.
DISP= Cb*Lpp*B*T*Rho/1000
which defines the displcement of the ship in tons
Note tht two new prmeters re creted: the block coefficient Cb nd the displcement DISP. In order to keep the knowledgebse meningful, it is necessry to provide references, dimensions nd determined by vlues for these prmeters.
Let's perform our first Questor clcultion. A solution is lwys determined by one or more Top Gols. A top gol is prmeter (or object) tht is your finl clcultion trget, in this tutoril it's the displcement of the ship.
Note tht the
Clcultions nd solutions re mnged in the workbse. Here, solutions cn be creted, redone (with different dt), exmined nd deleted.
The clcultion progress is strted, nd Questor first collects ll input dt (figure 10).
Figure 10 Input dt for the clcultion
Entering dt is esy: just type vlue for ech selected prmeter nd press enter to switch to the next one.
B= 10 Cb= 0.55 Lpp= 60 T= 6 Wtertype$= SW (Slt Wter)
Note tht the input of Wtertype$ consists of dropdownbox, which we creted in (4), see figure 11.
Figure 11 Wtertype$ cn be selected in dropdownbox
After providing the dt you hve to press the
Becuse this is very simple exmple, the finl stte is lost immeditely shown.
Figure 13 Sttus of the clcultion nd solution
The top gol (DISP) is shown, together with ll prmeters tht were used for the clcultion. With these input vlues, the displcement of the ship is bout 2030 tons.
So fr, we creted one solution, which is shown in the workbse (figure 14).
Figure 14 All solutions re shown in the workbse
As mentioned in the objective, we'd like to crete dtset of systemticlly vried ships. We could of course perform severl clcultions with different input dt by hnd, but it's much esier to use the bility of Questor to crete multiple cse solutions. To keep the complexity of this exmple within reson, we will only vry the bredth nd length of the vessel. Plese note tht due to some importnt conceptul resons the ltest Questor relese cn only perform clcultions on rnges of prmeters when you lrede hve creted solution.
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 Questor sks if cse mtrix should be creted
You will see tht the single vlue input is still in the list nd the multi cse vlues re in the tble prt of the . Press the
The new solution is now creted. The fixed vlues re gin shown in the right hnd side of the workbse. The vrying prmeters (B nd Lpp) nd the corresponding solution for DISP re shown in the lower prt. Ech row is different cse, identified by cse number(#1, #2, etc.), see figure 16.
Figure 16 Multiple cse solutions re shown in the workbse, ech row is different cse
Wht does the Cse mtrix question men? Note tht the vritions of B do not correspond to the vritions of Lpp: there re 5 vlues for B nd 8 vlues for Lpp. If we would hve nswered No to the Cse mtrix question, five vritions of B would hve been mde, ech one with the corresponding vlue of Lpp (the lst 3 Lpp vlues would be omitted). In tht wy, there would be only five cses. As we nswered yes to the question, ll possible combintions re considered, which results in 5*8=40 cses. You cn esily notice the difference by creting new solution with the sme input vlues, but now nswer no to the cse mtrix question.
NOTE: Rnges cn be defined in multiple wys:
Our multiple cse solution tble is sorted by the bredth of the ship, s shown in figure 16. Suppose we'd like prmeter Lpp the leding prmeter in this tble.
Figure 17 By selecting Output to HEADER, the prmeter will 'led' the multiple cse solution tble
A lot of cses in our solution don't meet the design criteri: displcement between 2000 nd 3000 ton. We could hve fixed this by dding constrint to DISP, but nother wy is to use filter in the solution tble.
Figure 18 With filter, cses tht do not fulfill the filter conditions cn be mde invisible
Now, only the cses for which 2000<DISP<3000 re shown in the tble. Our objective hs been completed: we build dtset of systemticlly vried ships tht meet the design criteri.
You cn verify your results by compring it to < style="text-decortion: none;">[Tutoril 1 Finished]
Continue to tutoril 2 >>