def hnn_state(self, inputs, t, argv):
index = argv;<EOL>v = inputs[<NUM_LIT:0>]; <EOL>m = inputs[<NUM_LIT:1>]; <EOL>h = inputs[<NUM_LIT:2>]; <EOL>n = inputs[<NUM_LIT:3>]; <EOL>active_sodium_part = self._params.gNa * (m ** <NUM_LIT:3>) * h * (v - self._params.vNa);<EOL>inactive_sodium_part = self._params.gK * (n ** <NUM_LIT:4>) * (v - self._params.vK);<EOL>active_potassium_part = self._params.gL * (v - self._params.vL);<EOL>Iion = active_sodium_part + inactive_sodium_part + active_potassium_part;<EOL>Iext = <NUM_LIT:0.0>;<EOL>Isyn = <NUM_LIT:0.0>;<EOL>if (index < self._num_osc): <EOL><INDENT>Iext = self._stimulus[index] * self._noise[index];    <EOL>memory_impact1 = <NUM_LIT:0.0>;<EOL>for i in range(<NUM_LIT:0>, len(self._central_element[<NUM_LIT:0>].pulse_generation_time)):<EOL><INDENT>memory_impact1 += self.__alfa_function(t - self._central_element[<NUM_LIT:0>].pulse_generation_time[i], self._params.alfa_inhibitory, self._params.betta_inhibitory);<EOL><DEDENT>memory_impact2 = <NUM_LIT:0.0>;<EOL>for i in range(<NUM_LIT:0>, len(self._central_element[<NUM_LIT:1>].pulse_generation_time)):<EOL><INDENT>memory_impact2 += self.__alfa_function(t - self._central_element[<NUM_LIT:1>].pulse_generation_time[i], self._params.alfa_inhibitory, self._params.betta_inhibitory);<EOL><DEDENT>Isyn = self._params.w2 * (v - self._params.Vsyninh) * memory_impact1 + self._link_weight3[index] * (v - self._params.Vsyninh) * memory_impact2;<EOL><DEDENT>else:<EOL><INDENT>central_index = index - self._num_osc;<EOL>if (central_index == <NUM_LIT:0>):<EOL><INDENT>Iext = self._params.Icn1;   <EOL>memory_impact = <NUM_LIT:0.0>;<EOL>for index_oscillator in range(<NUM_LIT:0>, self._num_osc):<EOL><INDENT>for index_generation in range(<NUM_LIT:0>, len(self._pulse_generation_time[index_oscillator])):<EOL><INDENT>memory_impact += self.__alfa_function(t - self._pulse_generation_time[index_oscillator][index_generation], self._params.alfa_excitatory, self._params.betta_excitatory);<EOL><DEDENT><DEDENT>Isyn = self._params.w1 * (v - self._params.Vsynexc) * memory_impact;<EOL><DEDENT>elif (central_index == <NUM_LIT:1>):<EOL><INDENT>Iext = self._params.Icn2;   <EOL>Isyn = <NUM_LIT:0.0>;<EOL><DEDENT>else:<EOL><INDENT>assert <NUM_LIT:0>;<EOL><DEDENT><DEDENT>dv = -Iion + Iext - Isyn;<EOL>potential = v - self._params.vRest;<EOL>am = (<NUM_LIT> - <NUM_LIT:0.1> * potential) / (math.exp(<NUM_LIT> - <NUM_LIT:0.1> * potential) - <NUM_LIT:1.0>);<EOL>ah = <NUM_LIT> * math.exp(-potential / <NUM_LIT>);<EOL>an = (<NUM_LIT:0.1> - <NUM_LIT> * potential) / (math.exp(<NUM_LIT:1.0> - <NUM_LIT:0.1> * potential) - <NUM_LIT:1.0>);<EOL>bm = <NUM_LIT> * math.exp(-potential / <NUM_LIT>);<EOL>bh = <NUM_LIT:1.0> / (math.exp(<NUM_LIT> - <NUM_LIT:0.1> * potential) + <NUM_LIT:1.0>);<EOL>bn = <NUM_LIT> * math.exp(-potential / <NUM_LIT>);<EOL>dm = am * (<NUM_LIT:1.0> - m) - bm * m;<EOL>dh = ah * (<NUM_LIT:1.0> - h) - bh * h;<EOL>dn = an * (<NUM_LIT:1.0> - n) - bn * n;<EOL>return [dv, dm, dh, dn]<EOL>
!
        @brief Returns new values of excitatory and inhibitory parts of oscillator and potential of oscillator.

        @param[in] inputs (list): States of oscillator for integration [v, m, h, n] (see description below).
        @param[in] t (double): Current time of simulation.
        @param[in] argv (tuple): Extra arguments that are not used for integration - index of oscillator.

        @return (list) new values of oscillator [v, m, h, n], where:
                v - membrane potantial of oscillator,
                m - activation conductance of the sodium channel,
                h - inactication conductance of the sodium channel,
                n - activation conductance of the potassium channel.