import nsrunit; unit conversion on; unit s=1 second^1; unit nM=1E-6 meter^(-3)*mole^1; unit per_s=1 second^(-1); unit nM_per_s=1E-6 meter^(-3)*second^(-1)*mole^1; math main { //Warning: the following variables were set 'extern' or given // an initial value of '0' because the model would otherwise be // underdetermined: t extern real t s; real stimEnd s; stimEnd=3600; real Ca nM; real trainPeriod s; trainPeriod=50; real timeInStim_modTrainPeriod s; real timeInStim_modPulsePeriod s; // timeInStim_modTrainPeriod=(t-floor(t/trainPeriod)*trainPeriod); timeInStim_modPulsePeriod=(t-floor(t/(.1 s))*(.1 s)); Ca=(if (((timeInStim_modTrainPeriod>=(5 s)) and (timeInStim_modTrainPeriod<=(5.02 s))) and (t(.016 s))) and (t