This repo contains Julia notebooks that convert box diagrams into executable functions. Different scenarios are explored, but focus is placed on assigning ordinary differential equations to the boxes. Each box corresponds to a set of ODE's and the wires between them determine how they communicate.
See AlgebraicContracts.jl to download the Julia Package.
Massive thanks to Georgios Bakirtzis and Cody Fleming for their help.
This is work is motivated by the following papers:
-
Georgios Bakirtzis, Cody H. Fleming, and Christina Vasilakopoulou
"Compositional Cyber-Physical Systems Modeling" -
Georgios Bakirtzis, Cody H. Fleming, and Christina Vasilakopoulou
"Categorical Semantics of Cyber-Physical Systems Theory"
To run the notebooks you will require the following packages:
You will also need to install graphviz:
See "requirement.txt" for the nessesary versions along with the version of Julia used to write the notebooks. Other versions will work but the given versions are sure to compile.
Open REPL and press ] so the console shows pkg> then type:
add Catlab@0.11.2
add AlgebraicDynamics@0.1.2
add DifferentialEquations@6.17.1
add Plots@1.16.3
To install Graphviz on Windows simply download the executable: Graphviz 2.47.2 for Windows 10 (64-bit)
NOTE: Installing packages on Windows can be very slow. To prevent this, open Windows Defender and go to Virus & Threat protection settings. Dissable real-time protection. You can enable it once the packages are installed.