Versions Compared

Key

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

...

We´d like to combine the results of the resistance prediction with the stability data we have gathered before, and present them together in one TeLiTab. Therefore, we´ll use the UNION# function.

   Add the following relation to your top goals:

...

Make sure you read the information about the UNION#() function. You may run a solution for Ship_data# together with the Data in the Dataset to see the results.

...


The economical speed of each ship V_eco was derived from the excelsheet above. Based on this speed and the ship's length the dimensionless froude number can be calculated. A simple executable satellite program is used to do this calculation, to show you how to use a simple PUT$() and GET$() action. 

External programs able to use scripted input usually have their own syntax. Typically, you´d like to use some sort of template script, with certain values replaced by values calculated in Quaestorin Quaestor. This is possible using the TEMPLATE$() function. In this case, we are dealing with a very simple program, called Froude_calc.exe. This program needs the following kind of input file:

...

Remark: this simple program works with TeLiTab input and output. Please note that this is not necesarry at all. You can use thethe TEMPLATE$() and PARSE#() function to create and read any ASCII in- and output (see also Use of external or satellite programs ).

The following relation constructs this input file with the actual values of the speed and length of the vessel.

...

You might want to check out the possibilities of the TEMPLATE$() function. Furthermore, note that V_eco is added to the knowledge base. Give the dimension kts for knots, you will be informed that this is based on the SI units m/s. 

...

We´d like to put the Froude_input$ string in the program, and process the output of the program. This is realised by the following syntax.

  As it is TeLiTab output, we add the following relation to the class Resistance:

...

This syntax places the content of the string parameter Froude_input$ in the input file: Froude.EPIEPI stands for: External Process Input. It runs the process: Froude_calc.EXE which generates the output file Froude.EPO (External Process Output) and gets the output back in aTeLiTab named Fn#. When it is not TeLiTab you receive as output, you can make TeLiTab by adding the PARSE#() function around thethe GET$() function to process the results. You might want to check out the GET$() and PUT$() functions.

As mentioned earlier, we don't have to include the program in the relation. An external program should be placed in the application directory of Quaestor of Quaestor (My documents\My Knowledge\Applic by default) or the specific Knowledgebase application directory (_KBname\Applic). Otherwise, Quaestor will  Quaestor will ask for the program location. 

To be able to select the Froude number as Top Goal for calculations, it has to be a parameter with a relation. The following relation retrieves the value for Fn from the TeLiTab Fn#.

  Add the following relation to the class Resistance:

...

Make sure that both Fn# and Fn are determined by System/Equation. Check out the description of the SELECT() function.

As an alternative you could also write:

...

Please note that this is the general way to refer to data (Fn) from a TeLiTab (Fn#) and can be used for any TeLiTabcontent content. 

We´ll add the froude number to our total list of data in the next tutorial.

...

 You can verify your results by comparing it to [Tutorial 5 finish]

<< Back to tutorial 4Continue with tutorial 6 >>