Skip to content

NTNU-IHB/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

Vico simulations can be visualized in the browser, altough poorly documented, for reference see: https://github.com/NTNU-IHB/Vico/blob/master/examples/gunnerus/trajectory/VisualConfig.xml

Command line interface

Usage: vico [-h] [COMMAND]
  -h, --help   display a help message
Commands:
  eval Interpret kotlin script using kotlin-main-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.

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.

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