Giter VIP home page Giter VIP logo

hopsan / hopsan Goto Github PK

View Code? Open in Web Editor NEW
146.0 13.0 41.0 42.82 MB

Hopsan is a free multi-domain system simulation tool developed at the division of Fluid and mechatronic systems at Linköping university.

License: Apache License 2.0

Mathematica 63.93% C++ 33.54% QMake 0.36% Batchfile 0.03% Python 0.38% C 0.85% HTML 0.46% Inno Setup 0.02% MATLAB 0.05% Shell 0.19% Makefile 0.02% Modelica 0.02% CMake 0.15%
hydraulics simulation-modeling c-plus-plus transmission-line fmi

hopsan's Introduction

Hopsan

Build Status Build status

Hopsan is a free open-source multi-domain system simulation tool developed at the division of Fluid and mechatronic systems at Linkoping university.

Features include:

  • Simulation core library
    • Plain C++ library for easy integration
    • Multi-core support for faster simulations
    • Create your own component models libraries in C++
      using a subset of Modelica is also supported
    • Embedded simple numeric script language (numhop)
  • Command line application
    • Call from external software, save results to file
    • Automate batch simulation
    • Run validation or generate validation data set from model
  • Graphical users interface
    • Drag and drop / power-port based modeling including support for reusable subsystems
    • Advanced simulation result analysis capabilities
    • Energy losses calculations
    • Data export to CSV, XML, Gnuplot, HDF5 & Matlab formats
    • Interactive animation of the simulated system (real-time and playback)
    • Model variable sensitivity analysis
    • Frequency-domain analysis (based on simulation results)
    • Numerical optimization
    • Scripting using the HCOM or Python language
    • Functional Mock-Up Interface (FMI) model import/export using co-simulation FMUs
    • Model export to Matlab/Simulink
  • Parallel simulation and optimization
    • On local machine using multiple cores
    • On networked computers using the Hopsan simulation server application

License

The Hopsan simulation core and support libraries are released under the permissive Apache License 2.0

  • HopsanCore simulation library
  • Hopsan default component library
  • HopsanCLI Command Line Interface application
  • Hopsan generator library
  • Ops optimization library
  • Symhop symbolic expression library

The GUI applications are released under the copyleft GNU General Public License 3.0

  • HopsanGUI Graphical modeling and results analysis application

Download and Installation

Windows

You can download official release packages from
https://github.com/Hopsan/hopsan/releases

The Windows version is packaged as a installer or as a portable zip that you can use if you do not have permission to install software on your computer. You can also choose if you want the compiler included for importing and exporting component libraries and models.

If you choose the zip version, no start menu entry for Hopsan will be added, instead go into the bin directory and double-click hopsangui.exe to start.

Chocolatey (a.k.a. Chocolatey Package Manager, App Installer):

choco install hopsan

Ubuntu and Debian Packages

You can download official release packages from
https://github.com/Hopsan/hopsan/releases

Deb packages are built for the current Ubuntu and Debian releases. You should be able to install them by opening them in you package manager, but if that does not work, try to install it manually using.

apt install ./hopsanPackageName

Note that you must specify the package name as a path, otherwise apt will search for the package in the repository.

Snapcraft

https://snapcraft.io/hopsan
If your GNU/Linux distribution supports Snap packages you can install Hopsan from the "Snap Store"
Hopsan

or from the terminal:

snap install hopsan

Application menu entries for HopsanGUI will be added but to start the command line applications use a command like:

hopsan.addresserver
hopsan.cli
hopsan.gui
hopsan.remoteclient
hopsan.server
hopsan.servermonitor

Known issues:

  • The Hopsan snap runs in confinement. If the log cache runs out of storage space, you can change temp directory under Options->Plotting, but due to the confinement you do not have many locations to choose from. This may cause problems if you are low on disk space.

Flatpak

https://flathub.org/apps/details/com.github.hopsan.Hopsan
If your GNU/Linux distribution supports Flatpak you can install Hopsan from Flathub
Download on Flathub

or from a terminal:

flatpak install flathub com.github.hopsan.Hopsan

Run with compiler:
The compiler is not included inside the Hopsan flatpak. If you need to use the compiler then start Hopsan from the command line using the Sdk as runtime. This unfortunately also requires that you install the entire org.kde.Sdk

flatpak run --devel com.github.hopsan.Hopsan

Run other Hopsan applications:
A Hopsan entry that starts HopsanGUI will be added to your application menu, but if you want to start one of the other bundled applications you must use the command line.

# List the contents of the bin directory (to see what other executable are available)
flatpak run --command=ls com.github.hopsan.Hopsan  -l /app/bin

# Start application "hopsancli" from inside the flatpak
flatpak run --command=hopsancli com.github.hopsan.Hopsan [arguments]
# or
flatpak run --command=hopsancli --devel com.github.hopsan.Hopsan [arguments]

Known issues:

  • The Hopsan flatpak runs in confinement and the default log cache storage is in /tmp/Hopsan (inside the container). If the log cache runs out of storage space, you can change temp directory under Options->Plotting, but due to the confinement you do not have many locations to choose from. This may cause problems if you are low on disk space.

Documentation

https://hopsan.github.io/documentation

Issue Tracker and Questions

If you want to report an issue, make a feature request or have a question, please create a new issue in the issue tracker.
If you want to ask a question, please label the issue with the "question" label. https://github.com/Hopsan/hopsan/issues

Links

https://github.com/Hopsan
https://liu.se/en/research/hopsan

Build Instructions

Hopsan is a cross-platform supported application and it should be possible to build on most GNU/Linux based distributions, Microsoft Windows (using MinGW) and Apple macOS.

For detailed instructions see build-instructions.md

hopsan's People

Contributors

alede48 avatar alejandrosobron avatar bjoer37 avatar ingost avatar larsviktorlarsson avatar magse avatar markusbagge avatar marthoch avatar palob avatar peternordin avatar petkr14 avatar robbr48 avatar samuelkarnell avatar xav83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hopsan's Issues

Hopsan crash if you internally remove systemport that is externally connected


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 69, https://flumes.iei.liu.se/redmine/issues/69
Original Date: 2011/06/01
Original Assignee: Peter Nordin


If you connect a component to a systemport and then deleate the systemport from within the subsystem the external connection will remain, when you try to maniupulate it Hopsan will krash

Internal removal should delete the external connector


Related issue(s): #68
Redmine related issue(s): 68


Default icons


Author Name: Robert Braun (@robbr48)
Original Redmine Issue: 37, https://flumes.iei.liu.se/redmine/issues/37
Original Date: 2011/04/17
Original Assignee: Peter Nordin


Change the "missing graphics" icon to individual default icons, depending on the type of object. The icon path shall NOT be saved if a default icon is used.

When ports on subsystems change place the connector graphics is not changing with it


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 65, https://flumes.iei.liu.se/redmine/issues/65
Original Date: 2011/05/31
Original Assignee: Robert Braun


When ports on subsystems change place the connector graphics is not changing with it
Right now ports can switch places if you rename them (other bug)
If you reorder the ports internally they should change external position, the connector need to be redrawn accordingly
Right now the results are pretty weird

Crash if remove the contents of a looped signal subsystem and later tries to remove the remaning external connector


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 68, https://flumes.iei.liu.se/redmine/issues/68
Original Date: 2011/06/01
Original Assignee: Peter Nordin


If we create a subsystem and loops its input and output ports. Then we remove its internal contents, the external connector will still remain but be connected to nothing.
When we try to remove it hopsan will crash

Combine the TextBox and Box wiget into one widget


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 56, https://flumes.iei.liu.se/redmine/issues/56
Original Date: 2011/05/27
Original Assignee: Robert Braun


Sometime you want a text box with no border and sometimes one with border. Why not combine the to widgets into one.
When you want an empty box you cold use a text box without text.
We could still allow the user to select between textbox or box, but behind the scenes they should be the same thing

Groups


Author Name: Robert Braun (@robbr48)
Original Redmine Issue: 39, https://flumes.iei.liu.se/redmine/issues/39
Original Date: 2011/05/27
Original Assignee: Peter Nordin


Make it possible to group component in subsystem-like ways but without demands on C- and Q-type. This shall be a GUI feature only, and not affect the actual simulation model.

Describe how to compile external libs without the QtSDK


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 57, https://flumes.iei.liu.se/redmine/issues/57
Original Date: 2011/05/27
Original Assignee: Peter Nordin


Some companies will have a problem with the It group when it comes to installing Strange SDKs and stuff.
For them it would be better to use an editor that they can secretly unzip on the desktop or similar.
We should at least write a short guide outlining what you need to do to compile without using Qt SDK and .pro files.

We could also make project file or Makefile examples or even put together a package or list of the necessary tools to accomplish this

It would be REALLY nice if external component could remember which core version they were build against


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 60, https://flumes.iei.liu.se/redmine/issues/60
Original Date: 2011/05/30
Original Assignee: Peter Nordin


It would be REALLY nice if external component could remember which core version they were build against
Then we could give a warning when a user or developer loads a component lib build against an old core into a newer version of the core.

This is really important to know because old component may not work as expected or even crash.
I dont know how this should be implemented though, maybe some global or static constant in each component or the lib file itself.

Label background that shows portname should be wider


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 64, https://flumes.iei.liu.se/redmine/issues/64
Original Date: 2011/05/31
Original Assignee: Peter Nordin


Label background that shows portname should be wider
The yellowish background should be on char wider on each side. Right now some portnames are difficult to read if the portname label ends up close to component or connector graphics because the last letter is difficult to make out, it blends with the other graphics

When a CQS type is invalidated a Warning message should be shown to alert the user, the name of the subsystems should also be included


Author Name: Peter Nordin (@peterNordin)
Original Redmine Issue: 67, https://flumes.iei.liu.se/redmine/issues/67
Original Date: 2011/05/31
Original Assignee: Peter Nordin


When a CQS type is invalidated a Warning message should be shown to alert the user, the name of the subsystems should also be included
The message should be added in core immediately but in the GUI we can wait until we exit the system (check messages is being run)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.