User Tools

Site Tools


expression_editing_tool

This is an old revision of the document!


Expression editing tool

The editor tool appears when a table cell is clicked that contains an expression. It can be hidden by clicking the Toggle button, as shown in the screen shot below.

Editting window

The equation editor is very useful when your model contains a large number of blocks as it allow you to quickly find either existing blocks.

Next columns are presented in the Editor (equation editor)

Item – presents the name of block or function.

Value – in case of blocks presents Value.

Unit – in case of blocks presents the unit of block.

Full name – in case of blocks presents the Full name of block. In case of function the name of function is presented.

Description – presents the description of function in case of functions and description of block (if it is able).

Type – in case of block shows type of block (Compartment, Expression etc.) and in case of function type is functions.

Presents the list of all available in Ecolego functions with short description as well all presented blocks in the model (except connectors, inputs and outputs). Also, in the list are presented indecies.

Auto completion

While you enter an expression you can press the Space key on your keyboard to quickly find names of objects in the model or in the parameter database. If you are writing the expression “rateCo” and press space, all objects that contain the text “Co” will be displayed. You can use the arrow-down key to select one of the listed names, and return to select it.

Tools

The editor contains several tools at your disposal. By using the buttons in the toolbar you can select which tools to show.

Show/Hide calculation tool

NoteFor more information about conditions see expression syntax

When this buttin is enabled operators are added to the table in the *Editor*. They are added under the list of all presented in the model blocks. Use the keypad with the mouse to enter a value or an operator without having to use the keyboard.

 Functions

NoteThe time function included in the functions list can be used to insert time-dependent conditions in equations.

The functions list contains a list of the available functions in Ecolego. If you want to add your own functions to the list, please see creating custom functions).

 Model objects

A list of all available objects that can be used in equations, for instance compartments, expressions and parameters. This list also includes all entries in the glossary, all blocks available in the parameter database and all functions.

Local objects, that is, objects from the same Sub-system as the currently edited object, are highlighted in bold.

As the number of objects quickly becomes very large, the list has options to quickly filter out objects. To the right of this list there is a field containing several criteria according to you can filter the objects. The criteria are selected by using the drop-down list

  • Pattern – Lets to enter a string according to which the items from the list will be filtered. Entering a string here will filter out all objects that do not contain the string. An asterisk “” can be used as a wildcard. As you type a word in the equation, the pattern will automatically be set to the same word as you are writing.

  • Type – Let you to specify the type of object that should appear in the list, that is, compartments, expressions, transfer etc;

  • Indices – Let you to specify the kind of data, vectorised or not, that should be shown in the list;

  • Sub-system – Let you to specify the sub-system.

See also

expression_editing_tool.1676536044.txt.gz · Last modified: 2023/02/16 09:27 by daria