Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tutorial 5
Satellite programs

Learning goals

  1. Using MS Excel as a satellite program.
  2. Using the UNION# function.
  3. Using GET$ and PUT$ to run a satellite program.
Prior knowledge

1    Objective

In this tutorial, we will obtain the economical speed according to Townsin for each of our ships in the dataset. For this speed, both the resistance and power will be calculated in MS Excel and imported in Quaestor. Additionally, the Froude number of a ship will be calculated using a satellite program.

...

  In the class Resistance, add the following relation:

Resistance# = EXCEL#(1, "NullString", "NullString", Stability_check# , TEXTITEM$(1), TEXTITEM$(2))

Do not yet save the relation, as we will enter some data in the dataslot.

...

  Right click the relation (not the parameter) for Resistance# for Resistance#, and select Include select Include binary in frame. Browse for the excelsheet and double click it or select open. The sheet is now included in the relation.

Now you want to check the relation. 

  Run a solution for Resistance# using for Resistance# using the ship data. Resistance# is  Resistance# is not present in Top Goals, in fact nothing is available in the Top Goals class, so nothing is shown. To use the data anyway, open the process manager, select Data and press the Select Data button. In case you use the classic buttons you'll see that the S button is changed into a U button (to unselect...). Now double click the parameter you want to make it a top goal, and finally run a solution using the play button.

During the calculation, Excel is started. As we used mode 1 for the EXCEL#() function, the sheet is shown (figure 2), and you are able to check the values Quaestor wrote to the sheet. Note that this dialogue is not shown if mode 0 is used.

  Click OK to Click OK to continue with the solution

...

  Add the following relation as system in your class Resistance:Froude_input$ = TEMPLATE$(TEXTITEM$(1),0,V_eco,Lpp)

The dataslot containing:

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. 

...