There is a "Time Series" interface unit that can be used to access the time series calculation from EbsScript.
In the time series, you can enter commands in the field B4 to execute an EbsScript and to select a profile where the calculation is to take place.
The syntax for this is:
ebsscript:"EbsScript-Name";profile:Profile-Id
Implementation see Ebsilon-Menu : EbsScript-Editor -->EbsScript -->Open Interface Unit --> TimeSeries
Name of function |
Purpose |
Arguments |
Return value |
Example
|
tsGetTableCount |
Returns the number of time series created in the model |
no arguments |
INTEGER: Number of time series created in the model |
|
tsAddTable |
Create a new time series |
no arguments |
INTEGER: Index of the newly created time series |
|
tsRemoveTable |
Deletes the time series with the specified index |
Input: INTEGER: Index of the time series |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGetName |
Returns the name of the time series with the specified index |
Input: INTEGER: Index of the time series |
STRING: Name of the time series |
|
tsSetName |
Sets the default name for the time series with the specified index |
Input: 1.INTEGER: Index of the time series 2.STRING: Name |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGetRowCount |
Returns the number of rows in the time series with the specified index (?) |
Input: INTEGER: Index of the time series |
INTEGER: number of lines |
|
tsSetRowCount |
Sets the desired number of rows in the time series with the given index (?) |
Input: 1.INTEGER: Index of the time series 2.INTEGER: the desired number of lines |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGetColumnCount |
Returns the number of columns in the time series with the specified index (?) |
Input: INTEGER: Index of the time series |
INTEGER: number of columns |
|
tsSetColumnCount |
Sets the desired number of columns in the time series with the specified index (?) |
Input: 1.INTEGER: Index of the time series 2.INTEGER: the desired number of columns |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGetCell |
Returns the contents of the cell with the specified row and column index in the time series with the specified index (?) |
Input: 1.INTEGER: Index of the time series 2.INTEGER: Row index of the cell 3. INTEGER: Column index of the cell |
VARIANT: Content of the cell |
|
tsSetCell |
Sets the content of the cell with the specified row and column index in the time series with the specified index to the desired data content |
Input: 1.INTEGER: Index of the time series 2.INTEGER: Row index of the cell 3.INTEGER: Column index of the cell 4.const VARIANT: The desired data content |
BOOLEAN:true, if the execution succeeds, otherwise false |
|
tsCheckInput |
Checks the input in relation to model / active profile profile possibly specified in cell B4 is NOT used |
Input: 1.INTEGER: Index of the time series |
TimeSeriesResultEnum |
|
tsCalculate |
Performs the calculation of the time series with the specified index for optional lines |
Input: |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsDeleteAutoLines |
Deletes all lines inserted in a previous calculation (x in column B) |
Input: 1.INTEGER: Index of the time series |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsInitHeader |
Initializes the head cells of the time series with the specified index |
Input: 1.INTEGER: Index of the time series |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGenerateTimes |
Creates the cells with the timestamps in the time series with the specified index |
Input: |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsInsertColumn |
Inserts Columns |
Input:
1.INTEGER: Index of the timeseries 2.INTEGER: Column before which is inserted 3.INTEGER: Number of columns to insert |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsAppendColumn |
Appends Columns |
Input:
1.INTEGER: Index of the timeseries 2.INTEGER: Number of columns to append |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsInsertRow |
Inserts Rows |
Input:
1.INTEGER: Index of the timeseries 2.INTEGER: Line before which is inserted 3.INTEGER: Number of rows to insert |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsAppendRow |
Appends Rows |
Input:
1.INTEGER: Index of the timeseries 2.INTEGER: Number of rows to append |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsCopyDependentValues |
Copies all timedependent specification values : results of last time step as specifications values of next time step (e.g. BT 118 LEVNEW->LEVACT) |
- |
- |
|
tsIsInTimeSeriesCalculation |
Indicates if a time-series-calculation is running |
- |
BOOLEAN: true, if yes |
|
tsFindTableIndex |
Searches the time series for the first occurrence of a certain name (case-sensitive), beginning with the index "start_index" based on “zero“, and returns the index of the time series or -1 if the name was not found |
Input: 1.STRING: name 2,BOOLEAN=false:case_sensitive 3.INTEGER=0: start_index |
INTEGER: Index of the time series |
|
tsGetCurrentPosition |
During a time series calculation, the function returns the index of the time series and the current calculated line: |
Output: 1: INTEGER: var index 2: INTEGER: var row |
BOOLEAN: true, if the execution succeeds, otherwise false |
Name |
Zweck |
Argumente |
Rückgabewert |
Beispiel
|
tsReadRowFromModel |
read (time-dependent) specification / result data from model into target-row profile possibly specified in cell B4 is NOT used |
Input: 1.INTEGER: Index of the time series |
BOOLEAN: true, wenn die Ausführung erfolgreich, sonst false |
|
tsWriteRowToModel |
write (time-dependent) specification / result data from source-row into model profile possibly specified in cell B4 is NOT used |
Input: |
BOOLEAN: true, wenn die Ausführung erfolgreich, sonst false |
Name |
Purpose |
Arguments |
Return value |
Example
|
tsIndexColumnToXlColumn |
Converts the default column index to the Excel column name |
Input: 1.INTEGER: Column index in the time series Output: 2.STRING: Column name in Excel |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsXlColumnToIndexColumn |
Converts the default Excel column name into the column index |
Input: 1.STRING: Column name in Excel Output: 2.INTEGER: Column index in the time series |
INTEGER: Number of read characters in the given STRING |
|
tsRowColumnToXlPos |
Number of read characters in the given STRING |
Input: 1.INTEGER: Row index in the time series 2.INTEGER: Column index in the time series Output: 3.STRING: Excel position |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsXlPosToRowColumn |
Computes the default Excel position as STRING (for example, A26) into the column and row indexes in the time series |
Input: 1.STRING: Excel position Output: 2.INTEGER: Row index in the time series 3.INTEGER: Column index in the time series |
BOOLEAN: true, if the execution succeeds, otherwise false |
|
tsGetCellXl |
Computes the default Excel position as STRING (for example, A26) into the column and row indexes in the time series, and calls the tsGetCell function for the time series with the specified index |
Input: 1.INTEGER: Index of the time series 2.STRING: Excel position |
VARIANT: Content of the cell |
|
tsSetCellXl |
Computes the default Excel position as STRING (for example, A26) into the column and row indexes in the time series, and calls the tsSetCell function for the time series with the specified index |
Input: 1.INTEGER: Index of time series 2.STRING: Excel-Position 3.const VARIANT: the desired output |
BOOLEAN: true, if the execution succeeds, otherwise false |