Version 1.5.0
Version 1.5.0 adds various new features, primarily to support the development and regression testing of Modelica libraries. To install the latest version, run pip
as described at http://simulationresearch.lbl.gov/modelica/buildingspy/install.html
The following changes have been done:
- Added module fmi with a function that outputs fmu dependencies.
- Added regression tests for OpenModelica.
- Changed implementation of addParameters(...) to allow
setting values of parameters that are arrays. - Corrected bug that lead to files such as .DStore in Resources/Scripts
to be processed as if they were scripts that run unit tests. - Added class buildingspy.development.merger, which can be used
to merge the Annex60 Modelica library to other Modelica libraries,
such as the Buildings library. - Corrected bug in copying the files for the unit tests, which
caused libpython2.7.so not to be copied on some computers - Added method development.include_fmu_tests that allow testing
the export of FMUs. - development.regressiontest now also reports when Dymola
had to select default initial conditions,
a model had redundant consistent initial conditions, or
a model had type inconsistent definition equations. - Corrected bug in simulate.Simulator that caused a syntax error
in the Modelica .mos script when setting boolean variables. - Changed the API of buildingspy.simulate.Simulator.
Previously, the MODELICAPATH was used as the default
to load the package.mo file. This was changed because the
MODELICAPATH variable points one directory higher than the
location of the package.mo file.
Now, the current directory is used as the default value, which
can be overwritten using the parameter packagePath. - Corrected bug in buildingspy.development.regressiontest that
only used the first word in the result mat file. This bug
caused the unit tests to return with an error if for example
an output file was named Obsolete.FlowMachine - Corrected bug in buildingspy.development.Validator that
caused the html section to be not validated if the Modelica
file contained the and element on the same line. - Added new module buildingspy.development.refactor that provides
functions to refactor Modelica libraries. - Corrected forward and backward slashes in module that runs
the regression tests. - Added new function buildingspy.io.outputfile.get_model_statistics,
which allows obtaining the statistics of the model, such as the
number of nonlinear equations. - Added in buildingspy.development.regressiontest.Tester() the
new function writeOpenModelicaResultDictionary() that writes
a result dictionary for the OpenModelica regression tests. - Added regression tests for FMU export for Dymola.
- In regression tests, added a check for parameters that only have
a start value assigned. - In buildingspy.development.regressiontest, added functionality
to save Output, InitialUnknown and Derivatives dependency on
inputs to the reference results. - In buildingspy.development.regressiontest, added option to
use pedantic Modelica check. - Improved regression tests so that the list of plot variables
no longer needed to be on a single line. This was done
as later versions of Dymola do not write line breaks when
exporting the .mos script. - Added option to simulate a Modelica model without recompilation.
- In buildingspy.development.regressiontest, added tests for
differentiation of if-expressions,
invalid connect statements,
redeclaration of non-replaceable classes,
failure to interpret experiment annotation,
file not found, and
missing .mos script. - Corrected html check if the html is on a single line.
- In buildingspy.development.regressiontest, changed reading of
dslog.txt to be line by line as opposed to the whole file at once.
The reason is that reading the whole file can give an "out of memory for strings"
error for very long files as the size of Stringbuffer in
dymola/source/matrixop.h is not dynamically allocated.