Fibonacci

This page contains an applet that should appear as a separate window.

This model demonstrates HDF, which has static scheduling like SDF, but allows production and consumption rates to vary dynamically. In this example, the factor parameter of a DownSample actor is varied over the course of execution of the model. The HDF director calculates a new schedule each time the downsampling rate is changed. The model produces a Fibonacci sequence.

In a Fibonacci sequence, each number is the sum of the previous two numbers. One way to generate such a sequence is to extract the Fibonacci numbers from a counting sequence (the natural numbers) by sampling each number that is a Fibonacci number. This can be done by a DownSample actor where the n-th Fibonacci number is generated by downsampling with a factor given by the (n-2)th Fibonacci number.

\ \ MoML specification for this model. \