-
Notifications
You must be signed in to change notification settings - Fork 14
Massif 0.7.0 Status
Recent MATLAB versions provide a Java library called MatlabEngine
(official documentation is here). An important update is that Massif 0.7.0 now provides an ICommandEvaluator
implementation that uses this library to communicate with MATLAB. In addition to that, this library is provided with MATLAB, and another very important advantage is that it provides an automatic bidirectional mapping between the most common MATLAB and Java datatypes. This greatly improved the performance of Massif, more on this in the Performance evaluation section.
The Massif metamodel has received two major updates:
-
The class
Property
was renamed toParameter
to be in line with the naming applied in Simulink, while itstype
attribute was changed toEString
fromEEnumeration
to provide space for more generic descriptions. -
It now supports adding parameters to ports.
Minor changes:
-
Parameter
source
attribute was removed -
State
port was added to the mode -
Parameters can be flagged as
readOnly
In addition to block filters, now it is possible to set up block parameter filters by using the same extension point ID (hu.bme.mit.massif.simulink.api.import.filters
).
An initial performance assessment of Massif was carried out by picking a relatively large example sldemo_engine
model holding 176 Blocks, 186 Lines, and 345 Ports, then duplicating its elements. We regard the initial model as size 1, while the larges used during the evaluation was of size 32. Then, we compared Massif v0.6.0 (CE Server
connector) and Massif v0.7.0 (MatlabEngine
connector) execution times and resulting import model sizes. The following diagrams show the evaluation results.
Import times
A great performance improvement is achieved in the importer by (1) using the MatlabEngine
connector and (2) using batch queries to obtain block parameters. This gives an approximate speedup of 3 on the models used for performance evaluation.
Import model size
The Simulink → EMF model importer in the 0.7.0 version may create 10x larger models thanks to its enhanced parameter import capability. However, it is important to note that the user may fine-tune which parameters to import using import filters. The results shown below were obtained with no parameter filter turned on.
Export times
The export times were doubled in v0.7.0. This is greatly because of the increased .simulink
EMF model sizes (10x).
Short-term highlights:
-
Exporter should set port parameters during export (
.simulink
models now store those) -
Tracing/error reporting was improved, but still there is space to improve (e.g., option for fine-grained logging)
-
(Some) unit tests are added to Massif, but not maintained (See Issue #1 and the corresponding project)
Long-term highlights:
-
Stateflow support
-
Simscape support (a pull request for Massif 0.6.0 is here)
-
Replacing blocking calls to MATLAB with non-blocking calls (the question is if the API/Connector is capable of handling simultaneous calls)