The lookup table block computes an approximation to some function y=f(t) given data vector y. By default t is the current time point of the simulation, but can also be sent as an argument when calling the lookup table.
From the Projects window
From the Matrix window
From the Blocks window
The block editor is shown by right-clicking the block in a window and selecting Edit. In the Blocks window, you can also show the block editor by selecting the block and clicking the button, or by double-clicking the right-most “validation” column of the block.
The block editor has three tabs:
|Note||Most block properties can be edited directly in the Blocks window.|
This page lets you edit basic properties such as name, sub-system and base unit. See editing properties for more information.
This page lets you specify time series, values and interpolation options.
Dimension - You can specify the dimension of the block by using the Type drop down list. Depending on the dimension the index drop down lists are activated.
Interpolation - The interpolation field will determine how values before, between and after the time-points are interpolated/extrapolated.
Cyclic - When selected the time series will be “looped” and all values repeated. This feature is useful for periodic data, for instance one year dayly data of precipitation. Note that for cyclic lookup tables the final value(s) must be the same as the first value(s).
Lookup key - The key used when looking up data in the table.
Import - This button lets you import values for this lookup table from an Excel file. The recommended practise for importing values is to first export an empty lookup table with the correct indices and options as a template. In Excel, open the template and copy-paste the values into the template. When the data is added, the template can be imported into Ecolego again.
Export - This button lets you export values for this lookup table from an Excel file.
Data - The table always displays an empty last row where you can enter new values. Please note that values must be entered for each time point, although you may have different time points for different indices. If the lookup table has more than one dependency, a drop down list will be presented for each dependency where you can select the indices for which you enter data. The lookup table contains the following columns:
Link - Instead of filling in data manually, link the lookup table to a simulation result.
In most cases the lookup table is used for which is time dependent measurements, and where the data for the current time point is used. However, in some cases it can be useful to use the lookup table for other types of data. For instance,
In these cases the caller - the equation(s) referring to the lookup table - must specify the lookup key X. Also, the lookup table must be configured to require the lookup key rather than using the current time point.
As with expressions, a lookup table which requires arguments will never yield a simulation result.
In the Options section of the Values tab, change the Lookup key from Current time to As argument. The name of the “time” column in the Data table should now change to “X”.
As with any block, you specify the name or ID of the lookup table. You then specify the lookup key as a function argument using parenthesis.