Virtual Laboratory Environment

Version 2.0.2

A Modeling & Simulation Environment

video: Discrete time

Fibonacci with discrete time models

We used the gvle.discrete-time package to model the Fibonacci sequence into the discrete-time extension (package vle.discrete-time)

Video comments:

  • 0:00 : Create the package fibonacci and specify a dependency to the vle.discrete-time package.
  • 0:18 : Create a new atomic model based on the discrete time formalism. By default, its name is NewCpp.
  • 0:25 : Specify the equation F= F(-1) + F(-2) into the Compute section.
  • 0:35 : Declare the variable F and the set an history size of 2.
  • 0:45 : Set initial history F{n=-1}=0 and F{n=0}=1.
  • 0:58 : Rename the atomic model to Fibonacci, configure and build the project.
  • 1:19 : Open the default model empty.vpz and add an atomic model, configure it with the newly created dynamic Fibonacci from package fibonacci.
  • 1:29 : Into the Observables tab, attach the observable port F to the available view of the vpz.
  • 1:38 : Into the Project tab, specify the duration of the simulation to 6.
  • 1:48 : Into the Simulation tab, launch simulation and select the variable F for plotting.
Last updated on 29 Nov 2018, 15:39
Edit on GitHub