Help with iSpikes
Bill Harris <[email protected]> Sat, 4 Jul 2020 19:53:29 -0700
| Newsgroups | gmane.comp.gnu.mcsim |
|---|---|
| Message-ID | <CAOBquGpqBK=OsvV_=0vaH_Po8z=yb=-if0E9i_+y=vgpt73jyg@mail.gmail.com> |
--00000000000094a92905a9a8dd8f
Content-Type: text/plain; charset="UTF-8"
Mode File:
States = {
State
};
Inputs = {
inflow
};
Initial_State = 0.0;
Initialize{
State = Initial_State;
};
Dynamics{
dt(State) = inflow;
};
End.
$ makemcsim spikestest.model
Creating model.c file from spikestest.model ...
________________________________________
Mod v6.1.0 - Model Generator for MCSim
MCSim and associated software comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions; see the GNU General Public License.
No CalcOutputs{} equations. Null function defined.
* Created model file 'model.c'.
Compiling and linking model ...
Cleaning up ...
Created executable mcsim.spikestest
Input File:
Integrate(Lsodes,1.0e-6,1.0e-6,0);
OutputFile("spikes.test01.out");
StartTime(0.0);
Initial_State = 0.0;
Simulation { # Base
inflow = 1.0;
PrintStep(State,0.0,200.0,1.0);
PrintStep(inflow,0.0,200.0,1.0);
}
Simulation { # Base w/ Spikes
inflow = Spikes(
5,
10.0, 10.0, 10.0, 10.0, 10.0,
0.0, 50.0, 100.0, 150.0, 200.0);
PrintStep(State,0.0,200.0,1.0);
PrintStep(inflow,0.0,200.0,1.0);
}
End.
OUtput File:
Results of Simulation 1
Time State inflow
0 0 1
1 1 1
2 2 1
3 3 1
4 4 1
5 5 1
6 6 1
.
.
.
Results of Simulation 2
Time State inflow
0 0 10
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
.
.
.
Question: Why doesn 't State jump by 10 every 50 time units? What is
Spikes doing?
Thanks,
Bill
--
Bill Harris
--00000000000094a92905a9a8dd8f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Mode File:<div><br></div>States =3D {<br>=C2=A0 State<br>=
=C2=A0 };<br>Inputs =3D {<br>=C2=A0 inflow<br>=C2=A0 };<br>Initial_State =
=3D 0.0;<br>Initialize{<br>=C2=A0 State =3D Initial_State;<br>=C2=A0 };<br>=
Dynamics{<br>=C2=A0dt(State) =3D inflow;<br>=C2=A0};<br><div>End.</div><div=
>=C2=A0=C2=A0</div><div>$ makemcsim spikestest.model <br>Creating model.c f=
ile from spikestest.model ...<br><br>______________________________________=
__<br><br>Mod v6.1.0 - Model Generator for MCSim<br><br>MCSim and associate=
d software comes with ABSOLUTELY NO WARRANTY;<br>This is free software, and=
you are welcome to redistribute it<br>under certain conditions; see the GN=
U General Public License.<br><br>No CalcOutputs{} equations. Null function =
defined.<br><br><br>* Created model file 'model.c'.<br><br><br>Comp=
iling and linking model ...<br>Cleaning up ...<br>Created executable mcsim.=
spikestest<br><div><br></div><div>Input File:</div><div><br></div><div>Inte=
grate(Lsodes,1.0e-6,1.0e-6,0);<br>OutputFile("spikes.test01.out")=
;<br>StartTime(0.0);<br>Initial_State =3D 0.0;<br><br>Simulation { # Base<b=
r>inflow =3D 1.0;<br>PrintStep(State,0.0,200.0,1.0);<br>PrintStep(inflow,0.=
0,200.0,1.0);<br>}<br><br>Simulation { # Base w/ Spikes<br>inflow =3D Spike=
s(<br>=C2=A0 5,<br>=C2=A0 10.0, 10.0, =C2=A010.0, =C2=A010.0, =C2=A010.0,<b=
r>=C2=A0 =C2=A00.0, 50.0, 100.0, 150.0, 200.0); =C2=A0 =C2=A0 <br>PrintStep=
(State,0.0,200.0,1.0);<br>PrintStep(inflow,0.0,200.0,1.0);<br>}<br><br>End.=
<br></div><div><br></div><div>OUtput File:<br><br></div><div>Results of Sim=
ulation 1<br><br>Time State inflow<br>0 0 1<br>1 1 1<br>2 2 1<br>3 3 1<br>4=
4 1<br>5 5 1<br>6 6 1<br></div><div>.</div><div>.</div><div>.</div><div><b=
r></div><div>Results of Simulation 2<br><br>Time State inflow<br>0 0 10<br>=
1 0 0<br>2 0 0<br>3 0 0<br>4 0 0<br>5 0 0<br>6 0 0<br></div><div>.</div><di=
v>.</div><div>.</div><div><br></div><div>Question: Why doesn 't State j=
ump by 10 every 50 time units?=C2=A0 What is Spikes doing?</div><div><br></=
div><div>Thanks,</div><div><br></div><div>Bill</div><div>-- <br><div dir=3D=
"ltr" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"=
ltr"><div>Bill Harris=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</div></div><=
/div></div></div></div></div></div>
--00000000000094a92905a9a8dd8f--