I'm trying to implement a Non-homogeneous renewal point process generator as an ARTIFICIAL_CELL and the following three offsides that I see:

- Do we have access to simulation discretization time
**dt**inside the .mod? How could we access it? - Could we use
*for*structures inside BREAKPOINT or even inside .mod ? Becouse I got the following error compiling the file:

Code: Select all

`syntax error: Illegal expression: Illegal block at line 25 in file ppg.mod for (i=1; i <= N;i++) { ^`

- I nedd to generate a pseudo-random uniform number from [0,1], there is a built-in function for that? I found examples for HOC and python, but not for NMODL files.

Code: Select all

```
NEURON {
ARTIFICIAL_CELL PPG
RANGE N, y
}
PARAMETER {
N = 1 : Gamma order
y = 0 : Modulating frequency [Hz]
}
ASSIGNED {
aux : Threshold auxiliar
thres : Threshold
y_int : Integrate over y
i : index
}
PROCEDURE seed(x) {
set_seed(x)
}
INITIAL {
aux = 1
for (i=1; i <= N;i++) {
aux = aux * rand()
}
thres = -(1/N)*log(aux)
}
BREAKPOINT {
y_int = y_int + y*dt*1e-3
if y_int >= thres{
net_event(t)
y_int = 0
aux = 1
for i = 1,N {
aux = aux* rand()
}
thres = -(1/N)*log(aux)
}
}
```

Ricardo Molinari