Model of Neuronal Network

Each of N boolean elements has K inputs and 0..N-1 outputs. Initial values and inputs are assigned randomly. At every time step "average input" is calculated. In non-linear case it transforms to New value of element calculates depending on lim1 and lim2 parameters: If > lim2 OR < lim1 then res = 0 else res = 1