NOTE: Coral is no longer maintained, as it has been superseded by the Open Simulation Platform. More specifically, the library part of Coral has been superseded by libcosim, while the cosim CLI is a replacement for coralmaster. (coralslave and coralslaveprovider don't have direct equivalents, as cosim does things slightly differently.)
Coral is free and open-source co-simulation software built from the ground up with support for FMI and distributed simulations in mind. It is primarily a C++ library that can be embedded into any application that needs to perform co-simulations. However, we've also made some simple command-line applications for testing, demonstration and research purposes.
Coral was developed as part of the R&D project Virtual Prototyping of Maritime Systems and Operations (ViProMa) and maintained by SINTEF Ocean.
Coral is free and open-source software released under the terms of the Mozilla Public License v. 2.0. For more information, see the MPL 2.0 FAQ.
Browse the API documentation online.
The version/release numbers specified for compilers, tools and libraries below are the lowest ones used for the official Coral builds, and are therefore known to work. Other versions are likely to work too, especially if they are newer or at least have the same major release number, but this is not guaranteed.
Supported platforms and compilers:
- Windows: Visual Studio 2015 or newer.
- Linux: GCC 4.9 or newer.
Required build tools:
- CMake v3.6, to generate the build system.
- The Protocol Buffers compiler, to parse the protocol buffer files and generate C++ code for them.
- Doxygen, to generate API documentation (optional).
Required libraries:
- Boost v1.55.0
- ZeroMQ v4.0 (including cppzmq, which may not be included in the default installation for all platforms)
- FMI Library v2.0.3
- Protocol Buffers v2.6
- libzip v1.1
- zlib v1.2 (a dependency of libzip)
Optional libraries (only necessary if you want to build and run tests):
The recommended way to obtain all these, which works on all supported
platforms, is to use vcpkg and install
the packages listed in vcpkg-deps.txt
and optionally
vcpkg-test-deps.txt
.
Coral is built using a fairly standard CMake procedure, so we refer to the CMake documentation for details and advanced usage, and only give a quick walk-through of the procedure here.
First, in a terminal/command-line window, change to the root source directory (i.e., the one which contains the present README file), and enter the following commands:
mkdir build
cd build
cmake ..
This will locate dependencies and generate the platform-specific build system.
Next, build the software by entering the following command (still within the
build
directory):
cmake --build .
Finally, it is a good idea to run the tests, to see that everything works as it should. The command for this is (unfortunately) platform dependent:
cmake --build . --target RUN_TESTS &:: Windows
cmake --build . --target test # Linux