Skip to content

Vico is an ECS based co-simulation framework

Notifications You must be signed in to change notification settings

SFI-Mechatronics/Vico

 
 

Repository files navigation

Vico (work in progress)

Vico is an Entity-Component-System (ECS) based co-simulation framework

logo

License: MIT contributions welcome

Java CI Gitter

Vico is a generic co-simulation framework running on the JVM that takes advantage of the ECS software architecture popularized by game engines. A simulation object is known as an entity, which is basically a collection of components. A component is just state, with no behavior. Behaviour is added to the simulation through so called systems that acts on entities within a certain family. The type of components held by a given entity decides which family it belongs to. Entities, components and systems may be added and removed from the engine at any time, thus family relationships, what an entity represents and which entities a system acts on is highly dynamic.

FMI & SSP support

Support for FMI 1.0 & 2.0 for co-simulation and SSP 1.0 is provided by the fmi module.

More specifically this module adds a SlaveSystem that represents a collection of fmus to be simulated together. The SlaveSystem requires an instance of a class implementing the interface MasterAlgorithm, which represents an FMI master algorithm. A ready to use FixedStepMaster is provided by the module.

Distributed execution of FMUs is possible by means of FMU-proxy.

Time-series and XY charts

Support for plotting is provided by the chart module.

3D rendering

Generic 3D visualization components are provided by the render-components module. An implementation of a rendering system, relying on JMonkeyEngine, is provided by the jme-renderer module.

Physics

Generic physics components are provided by the physics-components module. An implementation of a physics engine, relying on Bullet, is provided by the bullet-physics module.

Command line interface

Usage: vico [-h] [COMMAND]
  -h, --help   display a help message
Commands:
  eval Interpret kotlin script using kts.
  simulate-fmu  Simulate a single FMU.
  simulate-ssp  Simulate a co-simulation system described using SSP.

To see the input arguments for the sub-commands, run the respective command providing no arguments.

Scripting

kts can be used to run arbitrary Kotlin code with maven dependencies, which means that you may use Vico as a dependency in your script. kts is bundled with the vico CLI for convenience (vico eval).

How to build

Simple execute ./gradlew build in a shell. The CLI will be located under cli/build/install.

Development

As Vico is written in Kotlin, IntelliJ IDEA is the recommended IDE for development.

Currently, JDK8 is required.

Want to simplify creation of SSP archives? Check out sspgen
Want to develop FMUs in Java? Check out FMI4j
Want to develop FMUs in Python? Check out PythonFMU
Want to distrubute your FMUs? Check out FMU-proxy

About

Vico is an ECS based co-simulation framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 59.5%
  • Java 40.5%