-
Notifications
You must be signed in to change notification settings - Fork 44
/
Hopsan-release-notes.txt
2387 lines (2026 loc) · 162 KB
/
Hopsan-release-notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
******************************
Important Information
******************************
- See the issue-tracker https://github.com/Hopsan/hopsan/issues for all known issues.
You can also report new issues, if you first create a GitHub account.
- There is no guarantee that the included component models are working under all conditions,
you must decide for yourself if you trust the simulation results.
- When you load models saved with an older version of Hopsan, follow these recommendations to avoid loosing information:
- Deactivate "Group Similar Messages" in the message widget at the bottom before loading a model.
- Pay attention to any Warnings or Errors you may receive when loading your old model.
If parameters fail to load they will be discarded.
- Parameters and ports may have changed name, in such cases you have to manually set the parameter value that could
not be loaded (according to messages).
- Sometime when exporting a model as PNG or PDF some components "vanish" or become very small. We have not been able to
fix this problem. If this is a problem, take a screen-shot instead. You can quickly hide all of the side widgets with
a button on the left pane.
- Hopsan internally relies on using the U.S English locale ( decimal separator '.' ) and should internally switch to
this mode. Problems have been observed on some Ubuntu installations running with a different locale. Hopsan fails to
interpret values with decimal separator '.' (it usually expects ','). If you do not want to change your system
settings you can start Hopsan with the following command to locally ensure that U.S English numeric locale is used.
Example:
cd /opt/hopsan/bin
LC_NUMERIC=C; ./hopsangui
******************************
Version History
******************************
2.22.1 (2024-09-26)
----- 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
---------------------------------------------------------------------------------------------------------------------------------------------
2.22.0 (2024-05-27)
----- 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
----- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.21.1 (2023-06-20)
----- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.21.0 (2023-06-10)
----- Important Change -----
- 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.
--------------------------------------------------------------------------------------------------------------------------------------------
2.20.0 (2022-07-11)
----- 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 <interval> 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.19.1 (2021-11-05)
----- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.19.0 (2021-05-10)
--- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.18.0 (2021-02-25)
----- Enhancements -----
- HopsanCore:
- New "filepath" parameter type (variable class HFilePath). It is basically 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.17.0 (2021-02-14)
----- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.16.0 (2020-11-08)
--- 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.
--------------------------------------------------------------------------------------------------------------------------------------------
2.15.0 (2020-09-10)
--- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.14.2 (2020-05-22)
--- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.14.1 (2020-05-17)
--- 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
--------------------------------------------------------------------------------------------------------------------------------------------
2.14.0 (2020-05-01)
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: "2*self.in" instead of "2*self.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
--------------------------------------------------------------------------------------------------------------------------------------------
2.13.0 (2019-11-26)
--- 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
------------------------------------------------------------------------------------------------------------------------
2.12.1-snap (2019-07-29)
This is a special release for the snap version of Hopsan.
--- Enhancements ---
- The snap now uses the base snap core18 (Ubuntu 18.04) and includes improvements for desktop theme support.
The hopsan.gui and hopsan.holc applications should no longer look like "old software".
Unfortunately dark themes are not yet working well, but this is a problem for all variants of Hopsan.
- Hopsan (snap version) will overwrite the compiler path so that the internal snap bundled version of the compiler
is used automatically.
------------------------------------------------------------------------------------------------------------------------
2.12.0 (2019-07-15)
--- 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
------------------------------------------------------------------------------------------------------------------------
2.11.5-flatpak (2019-04-30)
--- Enhancements ---
- This is a special release for the first Flatpak build
- HopsanGUI:
- "Apply & simulate" button in component properties dialog. Will apply all settings and simulate the model without closing the dialog.
- Improved point plotting in Optimization
- Use tables instead of widgets in layouts for optimization dialog
- Launch batch/shell scripts from HCOM
Launch .bat and .sh files using exec function in HCOM.
Syntax: exec script.bat arg1 arg2 ...
- Improved csv import support:
Support import column csv with data names on first line
Support importing row csv (names in first column)
Auto-detect HopsanCLI csv format
--- Bug Fixes ---
- HopsanGUI:
- Importing plot data in HCOM fails if no model is open
- Fix out-of-range crash in DE optimization
------------------------------------------------------------------------------------------------------------------------
2.11.0 (2019-01-25)
--- Enhancements ---
- HopsanCore:
- Add quantity Resistance with base unit Ohm instead of "ohm".
Also adds common unit scales to HopsanGUI.
- Add common math functions to embedded script (numhop), see users guide for details.
You can now write expression like "x=cos(y)" or "a=atan2(b,c+2)"
- HopsanGenerator:
- Added generator for compiler commands that should work with both GCC and Clang.
This is only used for library import compilation right now. It will be extended to FMU exporting later.
This should enable custom library importing on MacOS from HopsanGUI (but this has not been tested).
- HopsanGUI:
- Built-in script editor for HCOM scripts.
- Improved auto-completer in HCOM terminal.
- Case insensitive auto-completer for filter function in component library widget.
- It is now possible to add trace variables from multiple selected ports in the "debugging" widget.
- Improved find widget Ctrl+F, it now behaves similarly as in other application.
- Units scales are now sorted by scale.
- Removing three second real-time plotting window limit.
- Made it possible to run real-time animation (and plotting) without needing a previous log data generation.
- Add "chds" Change diagram size (and position) HCOM command.
- Click anywhere on the workspace to quickly add new components. Write the name in the filter box.
- The HoLC text editor functionality has been merged into HopsanGUI to improve and simplify the code editing experience.
- Improved the save-state functionality so that it is possible to recompile libraries without first closing the models that are using them.
Together with the code editor improvements this simplifies component development.
- HoLC:
- Short-key Ctrl+G for quickly compiling (G for generate).
- Zoom text with Ctrl+MouseWheel
- Improved auto-completer, automatically show auto-complete suggestions while user is typing.
Force-open auto-completer with Ctrl+Space
- Find widget in HoLC text editor, open with Ctrl+F
--- Bug Fixes ---
- HopsanGUI:
- Program crash after removal of disabled components.
- Incorrect "parameter not used" warning when parameter values are given by expressions.
- Plot unit selection does not allow a unit with scale one other than the base unit.
- Import button in data explorer is now disable when no model is open, to prevent import data from
going nowhere.
- Crash when double-clicking scope in real-time animation without an existing generation.
- Fix "real-time" plotting of play-back data. Now correct data index will be used instead of latest.
- System parameters in expressions are not added when copy-pasting components into a new system.
--- Component Libraries ---
- New spring-loaded switch animation component.
- Add min and max limit parameters for animation slider component.
- Add controller output limits to SignalPID2.
- Add Hidden leakage flow port in CylinderC component.
------------------------------------------------------------------------------------------------------------------------
2.10.0 (2018-09-28)
--- Important Changes ---
- The component library XML format has been updated.
See the included "componentLibraries\exampleComponentLib\exampleComponentLib.xml" for details.
Note! Hopsan will still be able to load files of the previous version.
--- Enhancements ---
- Models:
- Models will now know what external component libraries they require.
Libraries should have an <id> element in their XML file for this to work.
See the included "componentLibraries\exampleComponentLib\exampleComponentLib.xml" for details.
- FMU:
- When a model is exported to FMU or S-function, any required external component library will be included in the
export and compiled into the target.
Note! This requires that the source-code for the library is available and that all components, source files or
special build flags (if any) are listed in the component library XML. You can use HoLC (Hopsan Library Creator),
to add existing component files using a graphical users interface, but you can also update the library XML file
manually in a text editor.
- When a model that depend on data files (assets) is exported as an FMU, these files will now be included inside
the FMU, in the (resources) directory.
Note! Currently, any data file is included regardless of its size. This may pose a problem for very large files.
- When a model is exported into an FMU, the exported directory structure is much cleaner, and the FMU easier to find.
Temporary build and staging files are put into DESTINATION/fmu_build and DESTINATION/fmu_stage.
These directories are deleted the next time an FMU is exported to the same directory.
- HoLC:
- It is now possible to reload a file that was changed outside of HoLC, without restarting the program.
- It is now possible to add multiple existing files at the same time.
- Add existing files dialogues will now remember the last used directory.
--- Bug Fixes ---
- HoLC:
- It is no longer assumed that the name of library main XML and cpp files are the same as the library.
This allows overwriting existing library files on save.
- Build flags are now preserved when loading and saving a library XML file.
(You must still enter them manually in a text editor)
- The file dialog suffix filters should now work.
- FMU:
- Hopsan models exported as FMUs will no longer crash after 1/Ts simulation steps.
- HopsanGUI:
- Prevent severe slowdown after simulation when result data is collected.
This was especially noticable for large model or when many generations had been collected.
- Simulation:
- Disabled components are now allowed to have non-connected ports.
Note! If you disable components that are connected to enabled ones,
the simulation may not behave as you expect.
------------------------------------------------------------------------------------------------------------------------
2.9.0 (2018-07-02)
--- Important Changes ---
- The HopsanGenerator library refactoring. GUI parts were split into a separate library and the library now has a C API
- All Hopsan source files now use the file suffix '.cpp' rather then mixing '.cpp' and '.cc'.
- All binaries now use lower-case names (hopsancli.exe instead of HopsanCLI.exe).
- Continuous integration (Travis CI) and (Appveyor) now builds and tests every change to the Hopsan code.
This will reduce the risk of new code breaking old functionality.
--- Updates ---
- Update Qt to 5.6.3 on Windows (official Windows 10 support).
- Update the 64-bit Windows compiler to MinGW 4.9.4 (from 4.9.3). If you have manually set up a build environment for
custom component libraries you are encouraged to update (use one of the Hopsan downloads with compiler included).
- Update ZeroMQ to 4.2.5
--- Enhancements ---
- Optimization:
- Improved script file handling.
- Improved variable names in plots.
- Points are now sorted by objective value with DE algorithm.
- Script generation is now shown in a separate wizard.
- Reduced terminal output during optimization.
- New algorithm, Genetic Algorithm.
- FMU:
- Exported Hopsan FMUs will now report Warning and Error messages. Info messages will be reported as Debug type.
- Imported FMUs will now have their messages redirected to the Hopsan core logger instead of standard output.
messages should now be visible inside HopsanGUI. Enable Debug messages to see FMU Info messages.
- HopsanGUI:
- HCOM:
- Add PI constant 'pi()' in HCOM script.
- Add argument to filter DIPA output
- Add round, floor and ceil functions
- Add unco command to list ports that are not connected
- Export plot to image dialog will close after successful export.
- Generator import/recompilation dialogs will now auto close if the import succeeds. Various improvement have also
been made to the generator error handling to prevent importing old leftover files if compilation fails.
- Improved Hopsan core log file handling, the log file is now put in the temporary directory next to log cache files.
- Debug messages with log data collection speed has been added to help debug severe slowdown problems after the
simulation is finish. Enable debug messages to show them.
- The 32 bit version now includes openssl libraries so that the news feed can be accessed.
- HopsanCLI:
- The HopsanCLI takes a new argument '--log.corelogfile' to specify core log destination.
If not specified, the current working directory will be used.
- It is now possible to choose what ports to log when simulating using HopsanCLI.
Use the '--logonly' command line argument, and specify a comma-separated list of full port names.
It is also possible to alternatively specify a text file with one full port name per line.
Examples: Gain#out or SubsystemName#Gain#out
- When saving results from a HopsanCLI simulation, interface ports (system ports) will also be saved.
- Results saved by HopsanCLI now use scientific notation, this may increase precision for small values.
--- Bug Fixes ---
- Optimization:
- Plot windows should be reusable.
- Progress bars do not show with DE algorithm.
- Excessive progress bars are not removed when reducing number of models.
- Total progress bar is not updated with PSO algorithm.
- FMU:
- An exported Hopsan FMU will not signal failure if initialize or simulate fails.
- FMUs from JModelica cannot be imported.
The import code now supports 'CS and ME' FMUs. In this case the Co-Simulation variant will be used.
- HopsanGUI:
- The auto update link parser ignores Hopsan without compiler links.
- Animation crashes when variable is NaN or inf.
--- Component Libraries ---
- Fix inverted port initialization error in HydraulicTLMlossless.
- Fix error in pilot operated check valve.
- Fix error in HydraulicPistonAccumulator.
- The "Extension library" is now included by default with Hopsan. You can load it from the Hopsan installation directory.
This library contains experimental new components that have not yet been added to the default library.
------------------------------------------------------------------------------------------------------------------------
2.8.2 (2018-03-02)
- Bug fixed: HCOM max(abs(var)) fail to evaluate if var is a vector (also affects min)
- Bug fixed: Optimization: There should be a comma separator between the numbers in the parameter outputs
- Enhancement: It is now possible to choose what temp directory to use for the Hopsan GUI cache.
This may be helpful if the default directory is located on a slow network drive.
After each simulation, potentially very large log data cache files will be written here.
------------------------------------------------------------------------------------------------------------------------
2.8.1 (2017-11-30)
- Bug fixed: Prevent notifying that a new version is available if Hospan release "revision" is newer then the HopsanGUI "revision" in the same release.
- Bug fixed: Numbers are inverted in custom unit scale display dialogue. Actually they were not. They were supposed to be part of an equation, this is now shown.
- Bug fixed: If Hopsan is terminated or crash while the configuration file is saved, it will no longer become corrupt. (The previous version will remain intact)
- Bug fixed: The Linux version of Hopsan 2.8.0 can not dlopen libHopsanGenerator making it impossible to (re)compile external component libraries
- Enhancement: Auto download of new (Windows) versions will now save installer to the user "temp" directory rather than the "data" directory.
You should check your data directory for old installers and delete them manually!
Look in "C:\Users\USERNAME\AppData\Local\HopsanGUI" or similar.
- Enhancement: Greatly improved error/warning message output while loading external libraries, this should prevent bug: "Sometimes external components fails to load without error message"
- Enhancement: Added km/h, mph and knot custom speed units (Note! You can add your own in the Options menu if your favorites are missing)
------------------------------------------------------------------------------------------------------------------------
2.8.0 (2017-10-13)
- Change: Moved source code to GitHub: https://github.com/Hopsan/hopsan
Due to switching source code version control system from Subversion to Git(Hub), significant changes have been made to the build system and version numbering format.
- Change: New version numbering format (we also bumped the epoch number to avoid confusion with the previous generation of Hopsan (Version 1.4 released in 2001)
The new full version number format is: EPOCH.MAJOR.MINOR.DATE.TIME~BRANCH_NAME
For official releases, only the three first numbers will be shown in the file name, example: 2.8.0. But internally and for snapshots the date and time of the last commit will be appended.
This gives a behaviour that is similar to the monotonically increasing revision number used previously when the source code was handled by Subversion.
Optionally the branch name may be appended in the end (for experimental or snapshot builds, that do not originate from the "master" branch.
- Change: Re-licensed HopsanCore, HopsanCLI, libOps, libSymHop, libHopsanGenerator and libDefaultLibrary to Apache License 2.0
This is a more permissive license than the GPL license previously used.
Essentially: If you create derived work of the Hopsan core components (and distribute that work), your work must no longer be released under the GPL license.
Note! HopsanGUI and HoLC (the GUI applications) are still GPLv3 licensed.
Read the full license notices for details.
- Change: Removed obsolete csv_parser++ library (GPL licensed) from HopsanCore
libIndexingCSVParser is used everywhere instead (compiled into HopsanCore)
- Change: Removed Intel Thread Building Blocks library.
HopsanCore now relies on C++11 std::threads for multi-threading capabilities.
- Feature: Vector signal nodes. Note! Only realized by 2D node components as of yet.
These nodes are still static, so there would have to be a set of components for every vector size.
- Feature: Bi-directional signal ports (2D) read/write.
See external Grafcet example library
- Feature: HCOM New 'eval' command, Evaluate string expressions.
Example: eval "chpv Gain$i$.out.y" would first evaluate the variable i and then execute the 'chpv' command
- Feature: HCOM New 'mkdir' command, to create directories.
This may be useful when automate saving of data
- Enhancement: The version check and auto update (Windows only) system has been improved. If you have downloaded a version with the compiler included,
the auto update will now be able to download the new version also with the compiler included.
- Bug fixed: Prevent crash when copying HVectors of HStrings
------------------------------------------------------------------------------------------------------------------------
0.7.9 (2017-07-02)
- Bug fixed: Plot curves default to dashed lines
- Bug fixed: Reading symbols name from HCOM plot command will always give value 1,2 or 3 for symbol type
- Bug fixed: Subsytems become randomly disabled when models are loaded by the simulation core model loader, Affects CLI, FMU and Simulink export.
Simulation through HopsanGUI was apperantly not affected.
------------------------------------------------------------------------------------------------------------------------
0.7.8 (2017-04-04)
- Bug fixed: Plot widget is updated correctly when creating temporary HCOM variables
- Bug fixed: Fixed annoying warning of incorrect sRGB profile
- Bug fixed: HCOM "close" command can no longer close welcome screen
- Bug fixed: Legend setting no longer gets enourmous width
- Bug fixed: S-function compilation with Visual Studio
- Feature: Optimization can now be autostarted from regular HCOM terminal
- Feature: It is now possible to unload all external libraries at once