Model Equations

The model that we use to simulate sleep in rats is a hybrid model.  It consists of a Markov Chain (modeled after \cite{3764288}) which depends on a circadian component and a homeostatic component.  The circadian and homeostatic components are identical to those in the basic two-process model  \cite{Achermann_1994,6696142}.

Markov Chain Framework

The model begins in a particular sleep state.  The Markov Chain framework determines how long the model stays in the current state and which state it transitions to next.  To begin, first update sleepiness and alertness, then update all of the transition rates: a_{i|j} which describe transitioning from state j to state i.  The equations are as follows:
\(\text{Alertness:} \quad A = 1-S+C\)
\(a_{R|S} = \alpha (1-1.4C)\)
\(a_{R|W} = \hat{a}_{R|W}\)
\(a_{S|W} = c_1*(L-0.3)^3+\beta(L-0.3)+\gamma\)
\(a_{S|R} = c_2*(L-0.3)^3+\beta(L-0.3)+\gamma\)
\(a_{W|S} = c_3(A-0.7)^3+\delta(A-0.7)+\epsilon\)
\(a_{W|R} = c_4(A-0.7)^3+\eta(A-0.7)+\theta\)
beta =0.0233, gamma = 0.006 delta = 0.006, epsilon=0.0042 \eta = 0.01, theta = 0.0065
Without loss of generality, assume the model is currently in Slow Wave Sleep (SWS). After updating each of the variables above, generate two uniformly distributed random numbers \(x_1\) and \(x_2\).  Compute the waiting times \(W_{R|S}\) and \(W_{W|S}\), using the following equations:
\(W_{R|S} = \frac{-\log(x_1)}{a_{R|S}}\)
and
\(W_{W|S} = \frac{-\log(x_2)}{a_{W|S}}\)
Next,  take the smaller of these two waiting times and set the sleep state to SWS until \(t+W_{i|S}\) where \(W_{i|S}\) is the smaller of the \(W_{R|S}\) and \(W_{W|S}\).  At time \(t+W_{i|S}\) the sleep state is set to state \(i\) and the process begins again.  
Once the waiting times have been computed and the next state is determined, update the homeostat, \(S\):
\(S(i+1) = 1-(1-S(i))e^{-\Delta t/\tau_i} \qquad \text{during Wakefulness or REM sleep}\)
\(S(i+1) = S(i)e^{-\Delta t/\tau_d} \qquad \text{during SWS}\)
Also update sleepiness and alertness:
During the work shifts, the sleep state was artificially set to W regardless of the outcome of the Markov Chain process.  

Two-Process Framework