Skip to content

Releases: lbl-srg/BuildingsPy

Version 5.1.0

09 Apr 17:07
47f67ba
Compare
Choose a tag to compare
  • In buildingspy/development/regressiontest.py, corrected bug that caused CI tests to not fail if run in batch
    mode and a reference file was missing.
  • In buildingspy/io/outputfile.py, corrected error reporting for Dymola that caused a string index out of range.
    (#536)
  • Added support to generate unit test configuration file conf.yml
    for OpenModelica and Optimica tests.
    (#530)

Full Changelog: v5.0.0...v5.1.0

Version 5.0.0

01 Sep 14:35
Compare
Choose a tag to compare

This version contains the following changes:

  • Added buildingspy.simulate.OpenModelica to support simulation with OpenModelica, and refactored
    modules for simulation with Dymola and Optimica.
    (#500)
  • In buildingspy/simulate/base_simulator.py, updated separator for MODELICAPATH on Windows.
  • In buildingspy/simulate/base_simulator.py, added support for libraries with encrypted top-level package.moe file.
  • Corrected bug in buildingspy/development/refactor.py that causes renames to fail on Windows.
  • Corrected bug in buildingspy/development/regressiontest.py in parsing .mos scripts with simulateModel command on multiple lines.
    (#508)
  • Added class buildingspy.development.simulationCompare that compares
    the simulation performance across tools or git branches.
    (#492)
  • Refactored regression tests for Dymola to allow specifying a time out for each tests, and set the default time out to 300 seconds.
    (#495)
  • Add option to exclude simulation of models from Dymola CI tests.
    (#486)

Version 4.0.0

12 May 16:42
Compare
Choose a tag to compare

This version contains the following changes:

  • Removed JModelica support, and added support for new OPTIMICA compile_fmu API.
    (#480)
  • For simulation and unit tests, updated the API for OPTIMICA to the one used in oct-2022-05-09-master-4b0cd2bf71
    (#479)
  • For simulation, corrected a bug that led to an error message when a model from the Modelica Standard Library is simulated
    (#472)
  • For unit tests, enabled option to run tests with OpenModelica.
    This change also allows specifying the test configuration in the more concise
    conf.yml rather than conf.json file.
    (#453)
  • For unit tests, added option to exclude files for dymola in library configuration script.
    Due to this change, the function regressiontest.setExcludeTest has been removed.
    (#450)
  • For unit tests, added optional colored output.
    (#451)

Version 3.0.0

09 Dec 14:07
5a133c8
Compare
Choose a tag to compare

This version contains the following changes:

  • For unit tests, changed code to generate names of Dymola output file to ensure that they are unique.
    Previously, an error was issued if they are not unique
    (#446)
  • For merge script, renamed set_excluded_packages to set_excluded_directories
    (#439)
  • For Dymola simulations, corrected call to openModel in buildingspy/simulate/Dymola.py
  • For unit tests, avoided copying .log and .mat files to temporary directory
    (#428)
  • For unit tests with Optimica, added check for access to component that are not present in constraining type of declaration
    (#424)
  • For library merger, corrected erroneous replacement of IBPSA in name of issue number
    (#412)
  • For unit tests, set Advanced.GenerateVariableDependencies = false as this can change the set of nonlinear equations
    (#410)
  • Added local relative tolerance along y axis by default
    (#396)
  • Fix rounding error issue on start and stop time values
    (#363)
  • For unit tests, ignore zero-size linear and nonlinear equations when comparing statistics
    (#406)
  • For unit tests, changed warning to an error if start or end times differ from reference results
    (#404)
  • Corrected timeout handling in buildingspy.simulate.base_simulator.py
    (#385)
  • Corrected class name lookup mechanism in buildingspy.development.refactor.move_class()
    (#382)
  • For unit tests, added optional comment that is printed if a model is excluded from
    the tests (#389)
  • Corrected generation of package.order for constant arrays (#387)
  • Refactored class buildingspy.simulate.Dymola, and added buildingspy.simulate.Optimica
  • Added check for wrong derivative implementation that is reported by Dymola 2021x (#376).

Version 2.1.0

28 May 14:38
Compare
Choose a tag to compare

This version contains the following changes:

  • Updated dependency to pyfunnel, and added requirements.txt file.
  • For unit tests, display plots before asking to add new reference results. (Issue 344)
  • When writing package.order, preserved the ordering of constants from the .mo file.
  • Changed doctest to Python 3.6.
  • For unit tests, added support for OPTIMICA.
  • For unit tests, changed to non-pedantic mode in Dymola if a model
    is in the Obsolete package.
  • For unit tests, corrected problem on Windows if a user enabled DDE.
  • For unit tests, corrected problem if a user saved the startup directory in Dymola.
  • Avoided text replace in binary files when merging libraries, which lead to
    UnicodeDecodeError. (Issue 272)
  • In regression tests, issue error if the name of the reference results
    is too long. (Issue 274)
  • Added compiler option nle_solver_tol_factor with value of 1e-2 for jmodelica
    regression test. (Issue 301)

Version 2.0.0

15 Jul 23:33
Compare
Choose a tag to compare

This version contains improvements for developing and testing 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 made:

  • Added handling of library specific comments in buildingspy.development.merger.
  • Improved error reporting when running regression tests in batch mode.
  • Corrected bug when creating and then renaming a package with
    buildingspy.development.refactor.
  • Removed buildingspy.simulate.Simulator.simulate_translated
    as it relies on non-standard Dymola functionality, and does no longer
    work with Dymola 2019.
    Also removed is the function buildingspy.simulate.Simulator.deleteTranslateDirectory
    which was only needed for buildingspy.simulate.Simulator.simulate_translated.

Version 1.7.0

15 Jun 01:06
Compare
Choose a tag to compare

This version contains improvements for developing and testing 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 made:

  • Corrected error in buildingspy.development.regressiontest that caused
    variables in plot statements to be ignored if the plot statement was
    longer than one line. Now, an error message will be written for this case.
  • Updated buildingspy.development.merger to filter out certain files,
    such as the top-level .c and .mat files.
  • Updated buildingspy.development.refactor.move_class() to
    correct a bug that caused package.mo to not be generated
    if the new class is deeper in the class hierarchy.
  • Updated buildingspy.development.refactor.write_package_order() to
    correct a bug in generating package.order file for package-level
    constants.
  • Extend class buildingspy.development.validator
    to check the consistency and correctness of .mos and .mo files.
  • Added validation of .mos/.mo files to unit test script.

Version 1.6.0

01 Jun 04:40
Compare
Choose a tag to compare

Version 1.6.0 added new features for Modelica regression tests and library refactoring.
To install the latest version, run pip as described at http://simulationresearch.lbl.gov/modelica/buildingspy/install.html

  • In development.regressiontest.setSinglePackage(packageName), added
    option to provide a comma-separated list to allow checking multiple
    packages.
  • In simulate.Simulator, changed quotes of string arguments for
    Modelica parameters.
  • In development.regressiontest, added check for redundant connections.
  • Updated buildingspy.development.refactor.move_class()
    to allow moving whole packages.
  • Updated buildingspy.development.refactor.write_package_order()
    so that also types that are enumerations are added to the package.order file.
  • Corrected TypeError during parsing of an exception that led to a wrong
    error message.
  • In regression tests for Dymola, added check for missing stateGraphRoot.

Version 1.5.0

30 Mar 15:40
Compare
Choose a tag to compare

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.