Calculating values using expressions

Purpose

To use basic arithmetic to calculate data values.

Theory

In this exercise, you will use basic arithmetic and define an exchange rate to calculate the amount of local currency carried by each entrant.

Actions

To create a simple formula:

  1. Open the Schengen Without Behaviour knowledge model.
  2. Double click on the Enrich Entrants node.
  3. Click the Minimise Down button in the top left corner of the knowledge model, to minimise it.
  4. Ensure Suggestions mode is switched off by clearing the Suggestions Mode check box on the Options menu.
    The reason Suggestions mode is being switched off is that the options it offers are not relevant to what is being taught in this exercise.
  5. Ensure Deborah is selected from the Situation List.
  6. Right click on the Entrant concept and select Add [int:Entrant] -> (Relation) -> [int:Entity] from the context menu.
    The Add Entity Relation Entity dialog box is displayed.
  7. Replace the text in the Out Concept box with the text Local Cash and click OK.
    A new Local Cash concept, coloured blue, is displayed in the conceptual graph.
  8. Select the Conclusion tab.
  9. Right click on the Local Cash concept and select Edit Expression from the context menu.
    The Edit Expression for Local Cash dialog box is displayed, showing the conceptual graph at the bottom.
  10. From the conceptual graph within the dialog box, drag and drop the Cash Carried concept into the Expression box.
    The text [int:?Cash Carried] appears in the Expression box and 3000 appears in the Result box.
    Note
    Alternatively, you can type the text [int:?Cash Carried] into the Expression box.
  11. In the Expression box, type *1.6, so that it shows [int:?Cash Carried]*1.6. This means the expression will get the value from the Cash Carried concept and multiply it by 1.6, to calculate the value for Local Currency.

    The value in the Result box is now 4800, which is 3000 multiplied by 1.6.
    Note
    A more realistic way of achieving the same result would be to create a concept called Exchange Rate with a value of 1.6. The expression for Local Cash would then be [int:?Cash Carried]*Exchange Rate.
  12. Click the OK button to close the Edit Expression for Local Cash dialog box.
  13. Ensure the Justification tab is selected.
  14. Click the OK button at the bottom of the screen to accept the default justification.
    The concept literal of the Local Cash concept now shows that Deborah is carrying 4,800 units of local cash.
  15. Select any of the other entrants from the Situation List, to view the amount of local cash being carried by them.
    Note
    The expression will not be updated if you subsequently edit a concept literal within a graph.
  16. Close the knowledge model without saving changes.

Platform: all
EBE Version: 2.4
Category: Introduction Guide
Author: Patrick Peisker


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Activity
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content