The Hénon Map
A Hénon map is a discrete-time dynamical system described by the following equations:
It is a simple example of the use of the DiscreteProcess class and is implemented in the Henon.scala file as follows just like this:
import uk.ac.ed.inf.mois.Model
import uk.ac.ed.inf.mois.DiscreteProcess
class Hénon(a: Double, b: Double) extends DiscreteProcess("Henon") {
val x = Double("ex:x")
val y = Double("ex:y")
n(x) := 1.0 - a * x*x + y
n(y) := b * x
}
class HénonModel extends Model {
val a = Double("ex:a") := 1.4
val b = Double("ex:b") := 0.3
def process = new Hénon(a, b)
}
The $n(x)$ operator denotes the value of $x$ at the next time, that is at $t+1$.
Running the model for 25000 time steps and graphing the output produces: