Skip to content

Releases: Hopsan/hopsan

Release 2.22.1

27 Sep 13:05
38a1931
Compare
Choose a tag to compare

Bug Fixes

  • HopsanGUI
    • Fixed problem with workspace size
    • Animation mode now keeps worksapce size
    • FMIWrapper components now appear at the center of the model
    • "adco" command in terminal will now add components on correct place
    • Fixed minor problems with splash screen
    • Model can no longer be edited during simulation

Release 2.22.0

28 May 07:33
2292e3f
Compare
Choose a tag to compare

Enhancements

  • HopsanGUI

    • Option to log results during simulation (experimental)
    • Image widgets
    • Changes to simulation time settings are now supported by undo/redo
    • New HCOM command: "dipa" - display components
    • Weird multicache error was clarified and converted to a warning
    • Existing log data is now automatically removed at startup if no other instance of Hopsan is running
    • "log2" function is now supported by HCOM/SymHop
    • New HCOM function: "r2d()" - radians to degrees
    • New HCOM function: "d2r()" - degrees to radians
    • FMIWrappers are now automatically renamed to the FMU base file name
    • Real variable names are now used in Matlab (.m) export
    • Variable aliases are now shown in Bode plot dialog
    • Local HCOM functions can now be used in temporary expression evaluations
  • HopsanGenerator

    • Timestep can now be controlled in exported FMUs
    • Recompilation of a library can now be prevented with XML flag

Bug Fixes

  • HopsanCore
    • Fixed crash in clustered fork-join parallel algorithm
    • Fix crash when using non-existing variables in FMIWrapper port specifications
    • Fix bugs with collecting log data during multithreaded simulations
    • Added missing call to finalize after measuring simulation time
    • Multiple variables with same value reference is now supported by FMIWrapper
    • Added missing quotation marks around include directories in FMI export Makefile
    • Fixed broken pi() function in HCOM/SymHop
    • Correct typenames are now used when regenerating component libraries
    • Fixed problem with merging divisors after removing factor in SymHop
    • Fixed crash when connecting non-existing ports in HCOM
    • Fix mixup between system parameters and local variables in HCOM
    • Fix FMI export of models without .hmf extension

Release 2.21.1

22 Jun 20:40
e93e2dc
Compare
Choose a tag to compare

Bug Fixes

  • DefaultComponentLibrary:
    • Remove external library file for the included ActivityDiagram sub directory
      This prevents compilation error of non-existing external library when the Windows version of Hopsan starts
      The library has been embedded into the default component library

Release 2.21.0

10 Jun 17:57
08fff1b
Compare
Choose a tag to compare

Important Changes

  • From this version onward, 32-bit releases are no longer built by default. If you need a 32-bit version, you will need to build it yourself or ask kindly in the issue tracker.
  • This version replaces the FMI import functionality, so instead of compiling a specific FMU wrapper on import, an existing FMIWrapper component shall be used instead. It is available in the default library under the Connectivity category. This means that any model that included a generated FMI component from previous versions will not longer work. You need to replace that generated component with the new FMIWrapper component.

Enhancements

  • Packaging:

    • Hopsan was added to Chocolatey, a package manager for Windows, see https://community.chocolatey.org/packages/hopsan for details
      Note! This package was added by an external contributor and is not directly built by the developers of Hopsan.
  • HopsanCore:

    • Added connection-not-required argument to addSystemPort() function. This will only affect hand-coded "subsystem components"
      Default behavior is to require a connection
    • Extend pneumatic node type with density, density wave variable and density characteristic impedance
      This is required for correct computation of temperature and heat flow
  • HopsanGenerator:

    • Support inline transformation of Laplace operator
    • FMI: Added FMI 3.0 import and export support
    • FMI: All FMI import is now handled through the FMIWrapper component (instead of regenerating and compiling a custom wrapper every time)
    • FMI: Added fmi4c dependency (FMILibrary is still kept for backwards compatibility)
    • FMI: Harmonized FMI export for 1.0, 2.0 and 3.0 and removed unused template files
  • HopsanGUI:

    • Improved find widget behavior when pressing Ctrl-F
    • Home button will now move to beginning of line if there are only spaces before cursor in the text editor
    • Do not add closing parenthesis when it has already been added in the text editor
    • HCOM: New function ans() returns the answer from the previous computation. Only works for scalars
    • HCOM: New command rpco() which replaces a component by specified type. Replacement type must be specified in component appearance XML
    • HCOM: Support decimal number without decimal part bwfore e in expressions such as in x=14.e-3

Bug Fixes

  • SymHop:

    • Only expand powers for integer exponents in SymHop
  • HopsanGUI

    • Fix text editor parenthesis crash
    • Fix text file constant warnings that file has changed on disk, even if it was saved by Hopsan
    • Fix severe delays when saving text files
    • Fix crashes when attempting to view the source of a missing component
    • Fix crash when replacing subtype components with missing component
    • FMU Export would fail on Linux when using deb package installation as the required zip was not in the dependency list
    • Saving XML models and other XML data to Windows network drive share would take an extremely and unreasonably long time, it is now significantly faster
    • Remember original data when saving models with missing components
      This both eliminates the problem of accidentally saving a model with missing components and thereby losing data, and with the backup models being damaged during a failed library recompilation
    • HCOM: Fix undesired abort of script when using if statement without else

Component Libraries

  • The component Q-type ground in the Electric->Sources was actually a C-type ground, it has been renamed
  • A new component which is actually a Q-type ground has been added
  • Fixed several potential "free of dangling uninitialized pointers" in generated components
    They apparently worked fine when built with GCC, but other compilers may have behaved differently
  • Add activity diagram components to the default library
  • Replaced old cavitation check i variable Q-type machine with a new check. Essentially, pressures are limited to zero implicitly by first limiting the flows to values required to get positive pressures. This solves problems with very large negative wave variables.

Release 2.20.0

11 Jul 15:08
1b651af
Compare
Choose a tag to compare

Enhancements

  • HopsanCore

    • Move real-time simulation main loop into HopsanCore (from GUI) resulting in much better performance (animation mode)
    • Temporary files created by lookup components are now deleted on Linux systems when the model is closed
      (On Windows they will remain in the temp directory)
  • HopsanGUI

    • Show HTML description in FMIWrapper component (extension library) if available in FMU
    • Replace functionality added to FindWidget for text files
    • Import/export parameter data to/from SSV format
    • Support SSV parameter sets for components (can be specified in component xml)
    • Add 'Energy Density Spectrum', 'Power Density Spectrum' and 'Root Mean Square' of vector to frequency analysis
    • Added "Open model file" option in right-click menu for subsystem components in library widget
    • Hide "Open source code" option for components that have no source code specified
    • Double-clicking on subsystem components opens model file
    • HCOM: Add steady-state identification, function ssi()
    • HCOM: New function: cut()
    • HCOM: Support elseif and nested if-statements
    • Make GUI fall back to empty port icon graphics for unknown node types
      This makes it possibly to register and use custom node types in custom component libraries
      Note! Custom nodes may not yet work in all cases, such as in code generation
  • Ops

    • Support for surrogate models in Ops algorithms
      Surrogate models are fast numerical approximations of the objective functions.
      The implementation is based on polynomial response surfaces, as described by: https://doi.org/10.1007/s11081-014-9247-9
      To active surrogate models, add the command surrogatemodel in the HCOM script.
      The interval setting specifies how many evaluations the surrogate model is used before it is updated.

Bug Fixes

  • HopsanGUI

    • Update default parameters when changing FMU in FMIWrapper component
    • Ignore file change warning after saving a file. At least on Windows the file would otherwise be reported as modified
    • Loading HMF components as internal subsystems was forgotten when saving the model
    • HCOM: Fix SymHop evaluation of model parameters ending with 'e'
    • HCOM: Fix symhop evaluation of power if variable contains underscore, ex: a_b^2
    • HCOM: Fix hg() (highest generation) function, it did always return 0
    • Fix crash when adding new component to library
    • Ensure that error and warning messages about missing files when loading libraries actually contain the missing path
    • Spectrum/FFT dialog Crashes GUI if simulation was stopped by stop component
      time data was not truncated to actual number of simulated samples
  • HopsanCore

    • Fix signal component sorting when a ReadMultiPort with multiple connections is present

Component Libraries

  • Standard Component Library: MechanicTranslationalLosslessConnector XML file error
  • Standard Component Library: SignalSteadyStateIdentifier

Release 2.19.1

05 Nov 22:53
ace3645
Compare
Choose a tag to compare

Bug Fixes

  • HopsanGenerator

    • FMU, S-Function and EXE export all failed to compile due to missing default library source code files
      They were not included due to a bug in packaging in 2.19.0
    • FMI ModelExchange import would not compile due to errors in the template code parameter type handling
  • HopsanGUI

    • Energy loss calculation showed wrong value for domain-specific losses, and alternated between runs
      Also clarified added energy text
    • HopsanGUI would crash when a connected input variable port was disabled (removed)
      The checkbox is now disabled for connected ports

Release 2.19.0

10 May 19:24
4a92487
Compare
Choose a tag to compare

Important Change

The HoLC (Hopsan Library Creator) application has been removed.
Its functionality has been built into HopsanGUI for some time, and can be accessed from the context menu (right-click)
in the library widget.

Enhancements

  • HopsanC:

    • Make it possible to get data vectors by alias name in Python, Julia and Matlab
  • HopsanGUI:

    • Make it possible to view XML and source code for default library components by right-clicking in library widget
    • Highlight connected connectors when hovering a component
    • HCOM: Support orphan variables in the chpvx command
    • HCOM: Enables defining and evaluating SymHop expressions
      Example:
      >> a=expr(sin(x)+y)
      sin(x)+y
      >> b=der(a,expr(x))
      cos(x)
    • HCOM: Convert SymHop expressions to LaTeX
      Example:
      >> f=expr((a+b)/(c+d))
      (a+b)/(c+d)
      >> latex(f)
      \dfrac{a+b}{c+d}
    • Monitor text files in editor tabs for external changes
    • Add "Always visible" setting for GUI components
      Use the context menu (right-click) on a component
  • HopsanGenerator:

    • Various improvements in Simulink generator
      Hopsan S-functions now also support the "fast restart" option in Simulink
    • Various fixes and improvements to Modelica generator
    • Statically link to MinGW libraries for FMI export on Windows
      Removing dependency to correct version of MinGW DLLs in exported FMUs more

Bug Fixes

  • HopsanGUI:
    • Use interpolation-based down sampling to reduce vector size
      There was an error in reduceVectorSize function due to integer division
      The fix will affect all frequency analysis plots (spectrum, bode and nyquist)
    • Preserve rotation and flipping of replaced components

Component Libraries

  • Enable end of stroke limitation in all C-type pistons
  • Add moment of inertia quantity and make use of it in components
  • PID2 component, changed the meaning of the 'de' input signal
    It is now expected to be a derivative input rather then a "error" delta
    If you have models using this component they may need to be updated
  • Added markdown descriptions with equations for many commonly used default library components
    Note! Due to the large amount of added documentation, it has not yet been reviewed
    If you find something that looks odd, take a look at the component source code

Release 2.18.0

25 Feb 21:51
35ee936
Compare
Choose a tag to compare

Enhancements

  • HopsanCore:
    • New "filepath" parameter type (variable class HFilePath). It is basically a string, but will enable a browse dialog button in
      the component properties dialog. File paths will be added relative to the model, if you want absolute paths, you will have to
      copy paste the path into to file path text field (like before)

Bug Fixes

  • HopsanGUI:

    • Due to the random bug described below, starting optimization would instantly freeze the program
  • Ops:

    • On the Windows version build with MinGW the random generator would return the same value on each call. It now returns actual random values
    • Due to this random bug, optimization would freeze during initialization (get stuck in an infinite loop)

Component Libraries

  • Various improvements and fixes to the experimental FMI wrapper component (Extension library)
  • LookupTable components now use the filepath parameter type to allow browsing for files

Release 2.17.0

14 Feb 17:18
caf5dcf
Compare
Choose a tag to compare

Enhancements

  • BuildSystem:

    • CMake build system can now build all Hopsan parts and support for the Microsoft Visual C++ compiler has been added
      Some issues still remain for CMake / MSVC builds, so this is not yet the default build system
      Build instructions have been updated, if you wish to use this build method
  • Documentation:

    • Add link to tutorials under the help menu in HopsanGUI. There is now a more in-depth tutorial on the TLM method available.
  • HopsanC:

    • List alternatives when querying for illegal port or variable names
  • HopsanCore:

    • New "quantity" LeakageCoefficient added with various scale factors
    • Add Component::reconfigure() function that components can overload to reconfigure themselves
      Reconfigure is triggered when a parameter registered with the Component::setReconfigurationParameter(const HString &rName) function
      is changed.
  • HopsanGUI:

    • Do not trigger auto complete popup after @
    • Do not auto select auto complete item while typing, user must press Tab, arrow keys or select with mouse
      This avoids the very annoying unintentional auto complete
    • Auto complete now replaces the entire completer prefix, to ensure that case is corrected
      Example: step.out.y -> Step.out.y
    • Fix auto complete not recognizing . in names such as Step.out.y
    • If you invert a plot curve using the curve controls, the setting will be remembered for the next generation
      If you want the invert curve setting to be persistent, check the box in the component properties instead
    • HCOM "edit" command now opens supported files in the Hopsan text editor instead of external editor (which quite often is not found)
  • Ops

    • Add elites parameter in genetic algorithm
      The best individuals are always carried over to the next generation without crossover and mutation.
      This helps avoid degradation of solution quality between generations.

Bug Fixes

  • HopsanC:

    • Header file for hopsanc was not included in release
  • HopsanGUI:

    • Do not clear undo-stack when a connector can not be found
    • Prevent renaming subsystem copy twice
      Fixes invalid name lookup for attached connector in undo
    • Fix hand icon getting stuck (finally after all these years)
    • Fix pasting system ports with connections
      They are no longer lost due to port being renamed
    • Fix enable/disable undo action syncing with changes in systems
    • Fix redo for subsystem paste
    • Process undo items in reverse order
      So that sub-operations are undone in the correct order
    • Fix redo for text widgets
    • Fix model lock-level detection for top-level system
      Prevents changes to model when model is locked
    • Prevent paste while left mouse button is pressed
      It would mess with the positions of the pasted components
    • Maybe fixed crash when simulation is finished, related to progress bar handling
      The problem could not be reproduced reliably (by the developers) so hard to know if it is fixed
    • Remove fade effect on red error flash in terminal, on some systems it would take a long time to fade
      Replaced by 400 ms solid read background
    • Fixed lock axis setting was forgotten when browsing to an empty generation
    • Fix splash screen not including version number and mentioning "development version"
  • Ops:

    • Check for minimum number of candidates in DE algorithm, to avoid crash.
      DE algorithm requires four points

Component Libraries

  • Renamed ContainerPort to SystemPort
    Containers (a type of system) were removed from Hopsan several years ago
  • Turn off rotation for various signal component icons with symbols
  • Added missing unit to leakage parameter for all pump/motor components
    Set the same default value for leakage parameter to 1e-12 for all pump/motor components
  • Use consistent default parameter value for density 870 kg/m^3 in the default component library
  • New component: Hydraulic differential pressure sensor
  • Obsolete CppComponent and ModelicaComponent traces removed (were causing warning messages)
    The HopsanGenerator can generate proper components, so the old wrappers are no longer needed (and they no longer work)
  • New component: (Extension library) Experimental FMI wrapper using reconfigure rather then requiring recompilation

Release 2.16.0

08 Nov 17:41
97f5ddf
Compare
Choose a tag to compare

Important Change

To avoid name collision in HDF5 exports, the following names were reserved: Time, time, Frequency and frequency,
HopsanGUI will attempt to automatically rename such components and system parameter when loading a model,
but HopsanCLI will not, and models must be updated in the GUI first.
To avoid name collision, the new names will have the _INVALID_NAME suffix appended.
You will need to change them manually if you wish.

Enhancements

  • HopsanCLI:

    • Add command-line argument -p or --parallel to enable multi-core simulation from command line.
      Note! Small models do not benefit from multi-core and will in fact run much slower, measure first
      to decide if is useful for your model
    • Unify CSV and HDF5 output code to make them behave the same way
    • HDF5 exporter now uses the --logonly include filter
    • Only export relevant time vectors when --logonly specifies a subset of variables
      Example: If only a subsystem variable is exported, then only the time vector for that system is included
  • HopsanGUI:

    • Updated QWT so that it works with new Qt versions
    • Make parameter export and import remember last used directory
  • HopsanGenerator:

    • Update bundled 7z version to 19.00 (Only used on Windows)

Bug Fixes

  • HopsanCore:

    • Restore PLO v2 format import to use one less number of data columns
  • HopsanCLI:

    • If simulation is aborted, then the entire pre-allocated time vector will no longer be export. Only up to the last actual sample
  • HopsanGUI:

    • Restore PLO v2 format export to use one less number of data columns (fix import crash)
    • System parameters widget was not updated when importing parameters from file
    • Do not tag model as changed when exporting parameters
    • Allow HCOM sequ command to change Quantity for particular generation or all generations
      Use the all option with care, as it will change the apparent unit on old data (without changing the actual data)
    • After changing quantities from HCOM, the component properties dialogs would not get updated
      They still need to be closed and opened
    • Fix ComponentPropertiesDialog not showing when you double-click (try to open it the first time).
      You were required to open it again, to actually show the dialog, also the model would be frozen in a non-editable state, due to hidden
      opened properties dialogs.