This set of changes provides support for having flows defined as N-dimensional lookup tables, using matlab-like syntax. A flow for a variable with a 2d lookup table might be:
The first argument to lut() provides the input selection for the lookup table; since there are two inputs here it will be a two dimensional lookup table. The second argument is the data table (matlab's reshape is allowed for more than 2 dimensions), the remaining arguments are the breakpoints for each of the input dimensions.
Modes with lookup tables automatically get split into several modes with the associated dynamics using the automatic Preconditions check in Hyst (the conversion will take place unless a printer or pass explicitly says it supports lookup tables).
To allow LUTs, support was added for matlab-like n-dimensional matrix expressions, although right now these only make sense as part of a lookup table expression. Extensive unit tests were added in ConvertLutFlowsPass.java, and a regression test model was added as well.
Other things:
The grammar was updated to support LUTs and general functions, rather than having hardcoded lexer terms for each function like sin, cos, loc, ect.
The ant build file was updated to use args4j instead of commons-cli
A run_jar_test task was added to the ant build to ensure that it runs after building
Bug fix for HyperRectangle corner enumeration
FormulaParser.parseNumber was renamed to parseValue
Expression simplification uses python to simplfy, if it exists (this required updating many tests which did string matching)
PythonBridge was updated to be a Singleton, which closes the python process upon exit
Support was added in AutomatonUtil for classifying expressions by the operators used in them (this is not the same as the linear / nonlinear classification, this only looks at operators), for example does some Expression have a LutExpression?
We can discuss this more in person at RTSS, but I wanted to give you a preview.
This set of changes provides support for having flows defined as N-dimensional lookup tables, using matlab-like syntax. A flow for a variable with a 2d lookup table might be:
The first argument to
lut()
provides the input selection for the lookup table; since there are two inputs here it will be a two dimensional lookup table. The second argument is the data table (matlab's reshape is allowed for more than 2 dimensions), the remaining arguments are the breakpoints for each of the input dimensions.Modes with lookup tables automatically get split into several modes with the associated dynamics using the automatic
Preconditions
check in Hyst (the conversion will take place unless a printer or pass explicitly says it supports lookup tables).To allow LUTs, support was added for matlab-like n-dimensional matrix expressions, although right now these only make sense as part of a lookup table expression. Extensive unit tests were added in
ConvertLutFlowsPass.java
, and a regression test model was added as well.Other things:
sin
,cos
,loc
, ect.run_jar_test
task was added to the ant build to ensure that it runs after buildingFormulaParser.parseNumber
was renamed toparseValue
Expression
have aLutExpression
?We can discuss this more in person at RTSS, but I wanted to give you a preview.