TableFunctionVector

Table function for vector input and output using Modelica's CombiTable format

Diagram

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

This converter uses the Modelica CombiTable format to read in a 1-D table function from file. For more explanation regarding the 1-D Modelica CombiTable interpolation see Modelica.Blocks.Tables.CombiTable1Dv.

Notes

The Modelica CombiTable format can be generated by Wolfram Mathematica using Export[]:

Export[ filename, { {"TableName1", table1}, {"TableName2", table2}, ... }, "MCTT" ]

where table1, table2, ... are 2-dimensional arrays. By default all lookup data are assumed to be included in a single file whose name is given by the global parameter lookupDataFileURI.

See also

TableFunctionLinearTimeTable

Parameters (10)

nin

Value: 2

Type: Integer

Description: Number of input and output signals

tableOnFile

Value: false

Type: Boolean

Description: = true, if table is defined on file or in function usertab (combiTable1D.tableOnFile)

table

Value: fill(0.0, 2, 2)

Type: Real[:,:]

Description: Table matrix (combiTable1D.table)

tableName

Value: "NoName"

Type: String

Description: Name of the table in the file containing the data

fileNameURI

Value: modelSettings.lookupDataFileURI

Type: String

Description: URI of the file to read the data from (default = lookupDataFileURI)

smoothness

Value: Smoothness.LinearSegments

Type: Smoothness

Description: Smoothness of table interpolation

columns

Value: fill(2, nin)

Type: Integer[nin]

Description: Columns of table to be interpolated (length must be equal to length of input and output vectors)

verboseRead

Value: true

Type: Boolean

Description: = true, if info message that file is loading is to be printed (combiTable1D.verboseRead)

extrapolation

Value: Extrapolation.LastTwoPoints

Type: Extrapolation

Description: Extrapolation of data outside the definition range (combiTable1D.extrapolation)

verboseExtrapolation

Value: false

Type: Boolean

Description: = true, if warning messages are to be printed if table input is outside the definition range (combiTable1D.verboseExtrapolation)

Connectors (2)

u

Type: RealMultiInput[nin]

Description: Input

y

Type: RealMultiOutput[nin]

Description: Output signal

Components (2)

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

combiTable1D

Type: CombiTable1Dv

Description: Modelica combi table

Revisions

  • Class adapted to compliance with MSL 4.0.0 in v2.2.