This library was created with the Dyad Studio VS Code extension. Your Dyad
models should be placed in the dyad directory and the files should be
given the .dyad extension. Several such files have already been placed
in there to get you started. The Dyad compiler will compile the Dyad models
into Julia code and place it in the generated folder. Do not edit the
files in that directory or remove/rename that directory.
A complete tutorial on using Dyad Studio can be found here. But you can run the provided example models by doing the following:
-
Run
Julia: Start REPLfrom the command palette. -
Type
]. This will take you to the package manager prompt. -
At the
pkg>prompt, typeinstantiate(this downloads all the Julia libraries you will need, and the very first time you do it it might take a while). -
From the same
pkg>prompt, typetest. This will test to make sure the models are working as expected. It may also take some time but you should eventually see a result that indicates 2 of 2 tests passed. -
Use the
Backspace/Deletekey to return to the normal Julia REPL, it should look like this:julia>. -
Type
using DyadForEngineers. This will load your model library. -
Type
World()to run a simulation of theHellomodel. The first time you run it, this might take a few seconds, but each successive time you run it, it should be very fast. -
To see simulation results type
using Plots(and answeryif asked if you want to add it as a dependency). -
To plot results of the
Worldsimulation, simply typeplot(World()). -
You can plot variations on that simulation using keyword arguments. For example, try
plot(World(stop=20, k=4)).