assigned value

The basics of how to develop, test, and use models.
Post Reply
ttpuff

assigned value

Post 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.
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Last edited by ted on Sat Feb 23, 2008 2:28 pm, edited 1 time in total.
ttpuff

Post 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.
Post Reply