Skip to content

Releases: Hopsan/hopsan

Release 2.15.0

10 Sep 14:56
6f5f036
Compare
Choose a tag to compare

Enhancements

  • New C-API shared library wrapper for Hopsan core with Julia, Matlab and Python language wrapper, see:

    • Scripts/Julia/hopsan.j1
    • Scripts/Matlab/hopsan.m
    • Scripts/Python/hopsan.py
  • Update to Qt 5.9.9 and MinGW-w64 5.4.0 on Windows
    If you are building component libraries externally from an IDE, make sure that you use the new compiler (included with Hopsan)

  • HopsanCore:

    • Add Kinsol solver (libsundials) for solving algebraic equation systems
      This library source code is bundled with and compiled into HopsanCore
  • HopsanCLI:

    • Enable HDF5 export of log variables from HopsanCLI
    • Improved parameter export, with the following changes since previous versions
      • Parameter export no longer prefix the subsystem name twice to system parameters
      • System parameters in the top-level systems are prepended with the reserved name "self"
        This means that old parameter files containing system parameters will no longer import correctly, without manual editing
        However, parameter import was broken anyway, so that should not be a big problem (fixed in this release)
    • Enable filtering --logonly results on individual variables in ports
      The entire port is still logged in memory, but only the desired variables are written to CSV file
  • HopsanGUI:

    • The built-in python terminal has been removed, because it never worked well, and caused a lot of maintenance problems
    • Apply icon scale when adding subsystem components
    • Add automatic numbering and referencing of equations in markdown (LaTeX) help documentation.
      Use LABEL=name and EQREF{name} according to the example in:
      exampleComponentLib\HydraulicComponents\MyExampleOrifice.md
    • Display highest generation command in HCOM, adds "dihg" command and "hg()" function
  • HopsanGenerator:

    • Use standard Modelica attributes for input and output variables in Modelica importer
    • Complete rewrite of Modelica generator and related functionality
      See the included ModelicaExampleLib

Bug Fixes

  • HopsanCore:

    • Fix compilation issue and stack overflow when using MSVC compiler
    • Fix PLO v2 import bugs (import did not work)
  • HopsanCLI:

    • Fixed broken parameter import
    • The command line argument --logonly, did not consider system ports on subsystems
  • HopsanGUI:

    • Always reload models before starting a new optimization, this avoids running old models if you make changes between optimization runs
    • Correct tab names and tab indexes after restoring HopsanGUI state, when multiple models and/or text editors were opened
    • Fixed PLO v2 export bugs
    • Fixed markdown help not being shown when markdown file does not include equations
    • Fixed LaTeX rendering of parentheses and brackets in help equations, (Updated to KaTeX 0.12.0)

Component Libraries

  • Add new component "AeroFlightRecorder" to the "AeroComponents" library
  • Resolves problem in SignalLogger with exponentially increasing simulation time due to appending and reallocating data vector
  • Fix SignalLogger file stream on Windows, so that all values get written
  • Fix incorrect equations in Gas Accumulator (HydraulicAckumulator)
  • Add missing embedded text support to PLOLookupTable
  • Display components (for animation) now has parameters for description, unit, unit scaling, precision, background color and text color

Release 2.14.2

22 May 18:49
9bc6a7f
Compare
Choose a tag to compare

Bug Fixes

  • HopsanGUI:
    • Fixed new bug that prevented system parameters from automatically being copied into new systems when the component using them was copied.
    • Fixed old bug where system parameters of other types then double would never be copied into a new system.

Release 2.14.1

17 May 11:26
a6896d8
Compare
Choose a tag to compare

Enhancements

  • HopsanGUI:
    • Add flat top windowing function to frequency analysis
    • Unset axis lock for the specific axis when changing units or X-axis variable
    • Optimization can now be aborted while evaluating initial candidates

Bug Fixes

  • Packaging:

    • Ubuntu Eoan package no longer depends on libpythonqt-qt5-python3-3 which is not available in the package repository
  • HopsanCore:

    • Fix bug in automatic model updater that would incorrectly add self. to constant parameter values if the parameter name and value expression were identical. In this case the intended result would be to use the parent system parameter of the same name

Release 2.14.0

01 May 13:45
84c8629
Compare
Choose a tag to compare

Important change

This release contains an important change to how parameter referencing is done in start value expressions.
This change affects embedded scripts (numhop) and parameter value expressions. Previously when a named value was used in an expression,
the code first checked it the value was another parameter in the same component, then if one could not be found it checked in the parent
system, and then in the grand parent system, and so on.
This made it impossible to enforce choosing the parent system parameter if a local one of the same name existed.
This new change requires that parameters in the own component are prefixed by "self."
A named value not prefixed by self. is assumed to be part of the parent system, then the grandparent system and so on.
Parameter expression example: self.a + self.b + a
Would add the local parameters 'a' and 'b', to the parent system parameter also named 'a'
Models saved prior to version 2.14.0 will be auto updated, with the exception for embedded model initialization scripts.
For these scripts a dialog window (and log message) will list the variables that need to be renamed.
Note! There are no changes to how components are implemented in C++, this only affects modeling in HopsanGUI.

Enhancements

  • HopsanCore:

    • Use a more secure temp file generator to avoid security warning when compiling (mkstemp instead of tmpnam)
      If a "system environment temp" directory is not set, temporary files may end up in the Hopsan installation directory, under bin
      This is unlikely but may happen when running Hopsan from automated scripts
    • Make it possible to differentiate between a components own parameters and parameters in the parent or grand parent systems, by
      prefixing self. before parameter names in parameter expressions. For a components own parameters self. is now required.
    • It is no longer necessary (but still possible) to specify .Value (in parameterName.Value) when referring to own parameters such
      as start values in input/output ports
      Example: "2self.in" instead of "2self.in.Value"
  • HopsanGUI:

    • Add HCOM support for self.Name in expressions using parameter values.
      Note! HCOM will not evaluate parameters in parent systems
      Note! HCOM will still work without 'self.'
      Note! HCOM scripts will not be auto updated
    • Real-time animation can now run at unlimited speed
    • You must now double-click in the workspace to open the quick-component insert dialog
    • Make it possible to use common HCOM math function on vectors (will evaluate per element)
    • Add "Save and Run" button the HCOM script editor
    • It is now possible to change units in Bode plots for magnitude and frequency
    • It is now possible to change unit for custom x-axis data (if a Quantity is set for that data)
    • Add Windowing functions to frequency analysis tools.
      You can choose a time range of the logged data, and apply rectangular or Hann windowing functions
      Rectangular is the same as before (add no additional windowing)
  • HopsanGenerator:

    • Export top-level system parameters as FMI parameters in exported FMUs
    • FMI parameter import is now also available for FMI1 (as well as FMI2)
    • Use Makefiles when compiling exported FMUs, this enables parallel compilation which is much faster
  • Documentation:

    • Fix user documentation link for frequency analysis
    • Add missing documentation for HCOM script flow control

Bug Fixes

  • HopsanCore:

    • Made parameter and system parameter evaluation behave the same way for all supported parameter types
      This fix is part of the reworked code that introduced self.Name parameter reference
  • HopsanGUI:

    • Fixed auto-update to follow redirects (auto update did not work after moving files to GitHub)
    • Fixed crash when opening components with markdown documentation
    • Prevent crash when mixing model and editor tabs (editor tabs will now always open to the right of model tabs)
    • Fixed using referencing system parameter names for int and bool parameter types
    • Fixed evaluation of HCOM round() in expressions like round(x)*y
    • Change Bode plot frequency unit to rad/s, the values were in rad/s but previously the label claimed it was Hz
    • Fixed invalid unit being shown when mixing multiple different Quantities on the x-axis in plots (you should avoid this anyway)
  • HopsanGenerator:

    • Fix import of parameter values for FMI v1 FMUs
    • Fix loading of FMUs with different file name and FMU name

Component Libraries

  • New component for logging signals to external file
  • Made angular velocity unit a quantity (so that the unit may be changed) for various
    components where the unit was previously hard-coded
  • Make many signal components replaceable with each other

Release 2.13.0

26 Nov 20:15
b49baa1
Compare
Choose a tag to compare

Enhancements

  • HopsanGUI:
    • Improved library and code generation / development capabilities in HopsanGUI. It is now the preferred choice for library development.
      HoLC is deprecated and will not see further development or updates.
    • Libraries can now include Modelica .mo files (a subset is supported), and the corresponding c++ Hopsan components will be auto generated

Bug Fixes

  • HopsanGUI:

    • Fixed drag-copying with right mouse button
    • Fix bug in arguments check for exec HCOM command
  • HopsanGenerator:

    • Prevent generating header guards starting with digits (would fail for models whose name starts with a number)
    • Fix model assets export for stand-alone exe-export. Assets will be stored in a directory called modelname-resources
      This directory must accompany the exe file if it is moved.
    • Set better default permission for exported files, rw_rw_rw_ for code and rwxrwxr_x for executable files

Component Libraries

  • Lookup table components now have the option to add internal csv data as a parameter, this makes it easier to quickly create simple lookup tables without having to deal with external files
  • Lookup tables no support reading values from white-space padded columns
    Example: 1.0, 2.0, 3.0
    10 , 20 , 30

Version 2.12.0

15 Sep 15:25
Compare
Choose a tag to compare

Enhancements

  • HopsanCore:

    • Added petri net node type
  • HopsanGUI:

    • Various text editor improvements
    • Enable saving and loading parameter sets to file (.hpf) for the entire model, sub-systems as well as individual components.
      Right click a component or subsytem to save or load parameter value sets.
      The HCOM sapa and repa commands have also been updated.
  • HopsanCLI:

    • Made the --logonly command line argument affect only --resultsFullCSV output.
      --resultsFinalCSV will still include the final values from all ports.
      The purpose of --logonly is to reduce data amount for long simulations or optimizations with multiple iterations, but the --resultsFinalCSV data is not very large and having access to final values for ports that were not logged may be useful.
  • HopsanGenerator:

    • Export model to black-box executable

Bug Fixes

  • HopsanCore:

    • Fixed loading of parameter value sets for entire systems (including subsystems)
  • HopsanGUI:

    • Fixed wrong XML tag when saving optimization settings
  • HopsanGenerator:

    • Format of generationDateAndTime in exported FMU is not valid
    • Unable to recompile libraries when Hopsan installation path contains spaces

Component Libraries

  • Corrected cavitation check for Q-type pumps