MDF Examples

Examples of Python, JSON and YAML files to illustrate the structure and usage of MDF.

Simple | ABCD | Arrays | States | Conditions | Parameters and Functions | Newton’s Law of Cooling

Simple example

Python Source | JSON | YAML

A simple example with 2 Nodes connected by an Edge:

With more detail on Nodes (showing Input Ports (green), Parameters (blue) and Output Ports) (red) and Edges:

ABCD

Python Source | JSON | YAML

Another simple example with more Nodes.

 

Arrays

Python Source | JSON | YAML

An example using arrays for Parameters and weights on Edges.

States

Python Source | JSON | YAML

An example with Nodes containing persistent States.

Conditions

Python Source | JSON | YAML

A simple 3 Nodes graph with scheduling Conditions. For more examples of conditions see here.

Parameters and Functions

Python Source | JSON | YAML

A simple Node with a number of different types of Parameters (in blue; fixed and stateful) and Functions (in purple; can be built in or ONNX based).

Newton’s Law of Cooling

Python Source | JSON | YAML

A simple Newtonian cooling process model that demonstrates the use of time derivative simulating the cooling of an object to the ambient temperature over time.

More examples

There are further examples under development, including of a Recurrent Neural Network (RNN), and an Integrate and Fire (IaF) neuron model in this directory.