GithubHelp home page GithubHelp logo

into-cps-association / into-cps-application Goto Github PK

View Code? Open in Web Editor NEW
16.0 20.0 8.0 290.24 MB

The front-end of the INTO-CPS tool chain

Home Page: https://into-cps-association.github.io/simulation/app.html

License: Other

JavaScript 2.76% Shell 0.16% TypeScript 80.74% HTML 15.79% CSS 0.54%
cps simulation frontend-app

into-cps-application's Introduction

INTO-CPS Application

The INTO-CPS Application is the frontend of the INTO-CPS Tool Chain. It is used to configure and run FMI-based co-simulations. Other features include model checking, test automation and design space exploration.

The App is primarily a UI. Most of the modelling and simulation work is done by the INTO-CPS tools themselves. These can be downloaded from within the app.
For additional details besides this document, see the wiki.

The INTO-CPS Application

How to build

The app is built with Electron and Node.js (v6 recommended). You need npm (comes with Node.js). Npm 3 or higher is required. Npm can be upgraded with npm install npm@latest -g. We use Gulp to manage tasks. It's easiest to have it installed globally (npm install -g gulp).

After checking out the repo:

  1. To install node dependencies: npm install
  2. To build the UI: gulp
  3. To run it: npm start
  4. To run the tests: npm test

Development

For an editor, Visual Studio Code is a good choice. It's cross-platform and is actually built on top of Electron. That said, you can use whatever you want.

Further developer info is available in https://github.com/into-cps-association/into-cps-application/wiki

Latest builds

The master branch is built automatically on git pushes and the output, for successful builds. Please find the artifacts by clickin in the run of the Package workflow.

These builds represent ongoing work. They have not been fully tested and are not guaranteed to work. Normally, you are advised to use one of the releases.

About

INTO-CPS is an EU Horizon 2020 research project that is creating an integrated tool chain for comprehensive Model-Based Design of Cyber-Physical Systems. For more, see: http://into-cps.au.dk/

into-cps-application's People

Contributors

armina1506 avatar clegaard avatar dependabot[bot] avatar frederikpm avatar gi11 avatar idhugo avatar idhugoid avatar ldcouto avatar levisen avatar mapalmieri avatar maxs-rose avatar prasadtalasila avatar unsongheroes avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

into-cps-application's Issues

Problem with import FMU

I implemented a FMU using javaFMI framework. After the simulation start, I got the following error:
"Error: Setup Experiment failed {FMU}.FMUInstance did not successfully complete. It returned: Fatal".

The COE log is presented below:
WARN [NanoHttpd Request Processor (#22)] (CoeInitialize.scala:357) - Make sure the execution tool: '' is available during this simulation.
DEBUG [NanoHttpd Request Processor (#23)] (NanoWebSocketImpl.java:26) - Opening web socket for session: 7b2779b0-01b0-40ea-85fe-98a6ea3057b2
DEBUG [NanoHttpd Request Processor (#22)] (CoeSimulator.scala:68) - Calling setupExperiment for {FMU}.FMUInstance
DEBUG [NanoHttpd Request Processor (#22)] (CoeSimulator.scala:676) - Calling freeInstance for: {FMU}.FMUInstance
DEBUG [NanoHttpd Request Processor (#22)] (Fmu.java:117) - UnLoad FMU temp folder
DEBUG [NanoHttpd Request Processor (#22)] (Fmu.java:123) - Deleting temp folder
ERROR [NanoHttpd Request Processor (#22)] (RequestProcessors.java:354) - Error in simulation
org.intocps.orchestration.coe.AbortSimulationException: Setup Experiment failed
{FMU}.FMUInstance did not successfully complete. It returned: Fatal
at org.intocps.orchestration.coe.scala.CoeObject$.handleCallResults(CoeObject.scala:117)
at org.intocps.orchestration.coe.scala.CoeObject$.fmiCallAll(CoeObject.scala:99)
at org.intocps.orchestration.coe.scala.CoeSimulator$.simulate(CoeSimulator.scala:66)
at org.intocps.orchestration.coe.scala.Coe.simulate(Coe.scala:105)
at org.intocps.orchestration.coe.httpserver.RequestProcessors.simulate(RequestProcessors.java:350)
at org.intocps.orchestration.coe.httpserver.RequestProcessors.processSimulate(RequestProcessors.java:377)
at org.intocps.orchestration.coe.httpserver.RequestHandler.simulate(RequestHandler.java:294)
at org.intocps.orchestration.coe.httpserver.RequestHandler.handleRequest(RequestHandler.java:187)
at org.intocps.orchestration.coe.httpserver.NanoWSDImpl.serveHttp(NanoWSDImpl.java:36)
at fi.iki.elonen.NanoWSD.serve(NanoWSD.java:861)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:927)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:194)
at java.lang.Thread.run(Unknown Source)

Specify port for Maestro

It is possible to pass a command line argument when launching Maestro that specifies the port it should use. This is not supported in the INTO-CPS Application, but it should be.

java

Exception in thread "main"
�java.lang.UnsupportedClassVersionError: org/intocps/orchestration/coe/CoeMain : Unsupported major.minor version 52.0
� at java.lang.ClassLoader.defineClass1(Native Method)
� at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
� at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
� at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
� at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
� at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
� at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
� at java.security.AccessController.doPrivileged(Native Method)
� at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
� at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
� at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
� at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
�Exception in thread "main"
�java.lang.UnsupportedClassVersionError: org/intocps/orchestration/coe/CoeMain : Unsupported major.minor version 52.0
� at java.lang.ClassLoader.defineClass1(Native Method)
� at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
� at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
� at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
� at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
� at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
� at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
� at java.security.AccessController.doPrivileged(Native Method)
� at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
� at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
� at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
� at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Issue with Ubuntu distributions

Some versions of Ubuntu does not properly open the app, the windows is just black.
Opening the app with --disable-gpu seems to work.

Losing historic live streaming data

Historic live streaming data beyond last 10 seconds is lost on UBUNTU - try e.g. single water tank.
Try expanding example to more than 10 seconds on other platforms

Does not occur on Windows 64

Update request

Causes security warning for hoek, tough-cookie, cryptiles, sshpk

Update electron version

Currently, the INTO-CPS Application uses electron version 1.4.15, while the newest version is 4.0.1.
This might have an effect on #15 as well

COE console can become out-of-sync

I got into a situation where the lower console thought the COE was running with a given PID, but the COE had terminated. I was then unable to launch the COE or convince the lower console that the COE wasn't running. The co-simulation config (via HTTP) is aware of the actual status.

Suggested steps to reproduce:

  • Launch the COE via the lower console
  • Kill it via command line or co-sim configuration view

Non-existing connected outputs does not appear

If you change an FMU that previously had a connected output, but does not after the change, then the connected outputs remains. A previous verison of the app showed this with an error.

Maurizio reported this.

Windows: Allow 32-bit FMUs in 64-bit into-cps application

Currently a 32-bit FMU is marked as Not Supported when using a 64-bit into-cps application.
However, this constraint should be relaxed, as the into-cps application is not the one executing the FMU.
Thus the constraint on supported FMUs should be:

  • They shall be the same platform
  • They shall be the same architecture
  • The architecture shall match the version of the JRE in use

Specify <= 0 to live plot all data points

Currently one must define the amount of data points to be plotted in the live plot before truncation begins. It would be beneficial to allow -1 to mean to plot all data points and perform no truncate action.

Move menu to init

The menu is the same across renderer processes and should therefore be moved to init.js

Update Validation

Multi Model

  • DONE

COE

Basic Configuration

  • Start time
  • End time

Fixed Step

  • Step Size

Variable Step

  • Initial step Size
  • Minimum Step Size
  • Maximum Step Size

Constraints

  • Zero Crossing
  • Bounded Difference
  • Sampling Rate
  • FMU Max Step Size

Visibility

  • visible
  • loggingOn
  • enableAllLogCategoriesPerInstance
  • overrideLogLevel

Stabilization

  • All

Live Plotting

  • All

Results Saving

  • All

Others

  • All

DSE

  • Any?

TR

  • Any?

Update default UPDATE_SITE and DEV_UPDATE_SITE from into-cps to into-cps-association

this.intoCpsDataObject = JSON.parse(fs.readFileSync(this.settingsFile, "UTF-8"));

If a user had the old into-cps application installed, then it has created a settings file which point at the old UPDATE_SITE and DEV_UPDATE_SITE.

Therefore, the new into-cps-association application should check if this is the case and update it to point at the appropriate UPDATE_SITE and DEV_UPDATE_SITE

Live Plotting not working

When running the Tutorial 1 (Three Water Tank Simulation), I get proper results but somehow the Live Plotting is not working. It works on another machine with the same following configurations:

OpenJDK 8
Arch Linux with vanilla 4.15.15-1-ARCH Kernel
Electron v1.8.4
INTO-CPS 3.4.6

Accessing the COE API through curl and browser works.

Simulation is not working

When running the lfr-non3d model in linux it is not working.

The sensor blocks do not seem get any input.
The robot is moving in a straight line.

COE tries to load win64 library on a win32 fmu

Scenario to reproduce:

  1. Download into-cps-app-3.4.6-win32-ia32;
  2. Open the project given in MSD_Project.zip
    (fmus were exported from openmodelica and omedit v1.12);
  3. Run the co-simulation.
  4. The FMU log should be similar to (see bug_log.txt):
...
ERROR [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:120) - Fmu do not conform to the standard. Unable to obtain modelIndentifier 'MassSpringDamper1' for co-simulation, defaulting to archieve name 'MassSpringDamper1' 
WARN [NanoHttpd Request Processor (#1)] (DirectoryFmu.java:121) - Attempting to recover loading of the library by setting modelIndentifier='MassSpringDamper1' 
ERROR [NanoHttpd Request Processor (#1)] (RequestProcessors.java:330) - Internal error in initialization 
org.intocps.orchestration.coe.AbortSimulationException: An FMU library didn't load 
{MassSpringDamper1} library does not exist: 
C:\Users\clagm\AppData\Local\Temp\MassSpringDamper14497606786479894800\binaries\win64\MassSpringDamper1.dll 

There might be something wrong with the model identifier of the FMU, but there is an attempt at loading the right file name, in the wrong directory.

Gulp.js release

Some issues related to updating gulp to 4.0 and gulpfile are expected when releasing.

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.