Tutorial 1 - Creating the model objects
2/5
Creating a project
Create a new project by clicking the
New button on the
toolbar or by selecting
File | New from the
Menu bar.
-
Adding algebraic expressions
The algebraic expressions of the model are implemented by creating Expression blocks. There are several ways of creating Expression blocks:
In this lesson we will explore the first three ways. The Graph window will be covered in a later tutorial.
Creating Income using the Matrix window
-
-
Double-click the
Expression, or right-click it and select
Edit from the pop-up menu.
Make sure that the Properties tab is selected, and enter “Income” in the Name field.
Select the Values tab. In the Value column, write the expression “Sales + Fees” on the Expression row and press Enter. A window will appear as two unknown objects are referred to in the expression. These are both time-dependent input values, select “Lookup Table” from the Type drop-down list for both Sales and Fees. Click Ok.
Close the edit window by clicking Ok
Creating Profit from the Blocks window
Make sure that the
Blocks window is visible by selecting
Window | Blocks from the
Menu bar. The window should list the three
Blocks that you have already created:
Income,
Sales and
Fees.
Either select “Expression” from the
Type drop-down list and click the
New button on the
title bar, or right-click the window and select
Create | Expression from the pop-up menu.
In the table, click the
Name field for the newly created
Expression and write “Profit”.
Next, click the
Value field for the
Expression and write “Income - Expenses”. Like before, Ecolego will discover unknown objects when you click
Enter. The unknown object is “Expenses”; select “Expression” from the
Type drop-down list. Click
Ok to close the window.
You should now see a new
Expression in the list of
blocks named “Expenses”. Enter “Salary + Tax + Rent” in the
Value field, where
Using the Expression editing tool
Instead of writing the equation for the
Tax Expression directly, right click the
Tax block in the table and select
Edit from the pop-up menu.
Make sure that the Values tab is selected.
Note | Instead of double-clicking income, try to use auto-completion: write “i” and press space, use the arrow keys to select Income and press enter. Read more here |
Click the
Equation field of the table. The
Expression editing tool will appear to assist you when writing the expression. As you see, there is a list of all
blocks of your model. Double-click
Income to add it to the expression. Click the asterix (’*’) on the key-pad, and then write “TaxRate” so that the full expression becomes “Income * TaxRate”. When you press
Enter and the “Unknown values” window appears, select “Parameter” for
TaxRate.
Click Ok to close the windows.
Next
Previous
References