Page 1 of 1

assigned value

Posted: Thu Feb 21, 2008 10:33 pm
by ttpuff
I have a parameter assigned some MOD RANGE variable,

like:
Ex[0].soma.Ca_IAF = 10
ExEx[0].gmax = 10

but I found Ex[0].soma.Ca_IAF is reinitialized to 0, but ExEx[0].gmax is not.

print Ex[0].soma.Ca_IAF // this gives 10, OK.
print ExEx[0].gmax // 10
finitialize(v_init)
print Ex[0].soma.Ca_IAF // this gives 0.
print ExEx[0].gmax // 10

why this happens? thanks.

Posted: Fri Feb 22, 2008 10:23 am
by ted
Read the INITIAL block of the IAF mechanism and you will discover why its Ca variable
is assigned 0 during initialization.

Since ExEx[0].gmax does not seem to be affected by initialization, I can guess that this
variable does not appear on the left hand side of an assignment statement in a block of
code that is executed during initialization.

Posted: Fri Feb 22, 2008 9:27 pm
by ttpuff
I already leave Ca variable in ASSIGNED block of the IAF mechanism, don't put it into the INITIAL block. the same thing for ExEx[0].gmax. Only difference is that the IAF mechanism is inserted into a template Ex.soma

I tested for many times. Usually we don't need keep value over many RUN trials, here I need to keep them, or even assigned them from a file.

I can't figure out the reason, but I have found a alternative way to solve this problem by moving Ca variable outside of IAF MOD into Ex.soma.