Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tutorial 1
Getting started

 

Learning goals

  1. Getting familiar with Quaestor interface.
  2. Adding parameters, relations and constraints.
  3. Providing references and properties for parameters.
  4. Creating a multiple case solution.

Prior knowledge

  1. Interface
Image Modified

1    Objective

As mentioned earlier these tutorials are focussing on providing the basic skills of knowledge engineering. In this first tutorial, the main dimensions of a ship will be systematically varied. The knowledge used is Archimedes’ Law in combination with design requirements, which are the following:

...

Our objective is to generate a dataset of systematically varied ships that meet the design requirements.

2    Before you start

Before starting with your knowledge engineering, please make sure you are actually using the knowledge engineering user level and you have Quaestor configured in the most convenient layout.

To check/change your user level go to Tools -> Options -> General. You can change your User level. If you are not able to change it to Knowledge Engineer (level 3), you do not have KE rights. Please contact your ICT department or Qnowledge for the proper license.

...

Create a new class, named Main Dimensions, in which the following ship parameters are to be stored.

Lpp: Length between perpendiculars
B: Moulded breadth
T: Draught from keel to Construction Water Line

  • Right-click on Top Goals/Undefined and select New Class from the popup menu. Give the class the name Main Dimensions.

...

The added parameters now appear in the right part of the Knowledge browser like this:

A red cross draws your attention to the fact that a parameter is not yet fully defined for the system to use it.

The first requirement is already satisfied, so let's assign dimensions to the parameters.

...

  • Scroll down to the Reference row and enter "length of ship".

Image Modified

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

...

  • Select Top Goals/Undefined in the knowledge browser, right click in the right hand part of the window 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 click Save:

Note that when you enter a relation, Quaestor provides as much help as possible by means of the Help Checker. This checker shows what to expect (in this case a Value or an Expression, ValExp). After saving a relation, the Help Checker will check the syntax for possible errors, and shows a warning message when something is wrong.

...

  • Add the following relation (belonging to fresh water) in a similar way as described above:

Rho = 998

5    Creating constraints

...

  • Right click on the relation Rho = 1025 in the Knowledge browser and select Constraint -> Add New. In the upper part of the new window enter the following constraint:

Watertype$ = "SW"

and click Save:

Image Modified

The constraint is now added, and a parameter named Watertype$ has been created. The $ at the end of the parameter name makes sure Quaestor recognizes it as a String value, and the dimension Str is automatically assigned (see also Quaestor syntax). You have to assign a Determined-by value to make it a valid parameter.

...

Repeat the process for the other relation.

  • Add the constraint

Watertype$ = "FW"

to the relation Rho = 998.

Note that the expression editor assists you with the presentation of existing parameters and intrinsic functions. 

...

6    Creating a dropdown menu

Because there are only two possible values for Watertype$ (SW or FW), it's easy to integrate a dropdown box. 

  •  Select Watertype$ in the Knowledge Browser, select the Parameter tab and in the Reference box enter the following lines:

FW<EQ>Fresh Water

SW<EQ>Salt Water

The use of a dropdown box will be clear in a later stage of this tutorial, when calculations are made. Note that you can add the @EQEXPLAIN attribute in the Data box ('data slot') of the Watertype$ parameter in order to display only "Salt Water" and "Fresh Water" are shown in the dropbox (so without SW and FW).

7    Creating a relation for the displacement

On the basis of the earlier defined parameters and the block coefficient Cb , the displacement of the ship can be calculated.

  •  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 that two new parameters are created: the block coefficient Cb and the displacement DISP. In order to keep the knowledgebase meaningful, it is necessary to provide references, dimensions and determined-by values for these parameters.

  • 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 warns 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: VR User Only for Cb, and SYSSystem/Equation for DISP, as the block coefficient is input and the displacement is determined by a relation. Verify that all parameters now have a blue cross instead of a red one in front of them:

8    Creating a solution

Let's perform your first Quaestor calculation. A solution is always determined by one or more Top Goals. A top goal is a parameter (or object) that is your final calculation target, in this tutorial it's the displacement of the ship.

  •  Select the class Main Dimensions in the Knowledge browser. Double click the parameter DISP.

...

  • Enter the following data for our first calculation:

B = 10   Cb = 0.55   Lpp = 60   T = 6  Watertype$ = SW (Salt Water)  

Note that the input of Watertype$ consists of a dropdownbox, which you created above:

...

After providing the data you have to press the Next button to continue. The actual calculation is started now and because this is a very simple example, the final state is alost almost immediately shown:

The top goal (DISP) is shown, together with all parameters that were used for the calculation. With these input values, the displacement of the ship is about 2030 tons.

...

  • Change the following input:

B= 9(0.5)11    Lpp= 55(2)69

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.

...

Info

Ranges can be defined in multiple ways: 

  • Individual values can be separated by comma’s: 9, 10, 11 or by semicolons. This depends on the setting of Tools->Options->Modeler->Use ; instead of , in range input.
  • You can define a range with a begin, an end and number of steps (intervals): 9(&2)11
  • You can define a range with a begin, an end and a step size: 9(1)11
  • You can define a range with a begin, an end and a step size, including the last element when this is smaller than the whole amount of steps: 9(#1)11.5

10    Filter results


As it is, the multiple case solution table is sorted by the breadth of the ship. Now suppose you'd like parameter Lpp to be the leading parameter in this table.

  •  In the knowledge browser, select the parameter Lpp. In the Properties window, scroll down to the row Output to, and select HEADER. Now, refresh the table of the multiple case solution by clicking another solution, and then again the multiple case solution. The table is now headed by Lpp.

A lot of cases in your solution don't meet the design criteria: a displacement between 2000 and 3000 ton. We could have fixed this by adding a constraint to DISP, but another way is to use a filter in the solution table.

  • In the workbase, select the last (multiple case) DISP solution, and click the Filter button. The Filter window shows. For DISP, select Range as filter, fill in 2000 for Lower bound and 3000 for upper bound. Click the Apply button.

...

Now, only the cases for which 2000 < DISP < 3000 are shown in the table. The objective of this tutorial is now completed: you built a dataset of systematically varied ships that meet the design criteria.

11    Check

You can verify your results by comparing it to  [Tutorial 1 Finished] .

Continue to tutorial 2 >>