Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perturbation is never triggered #39

Closed
ajendrex opened this issue Aug 26, 2011 · 10 comments
Closed

Perturbation is never triggered #39

ajendrex opened this issue Aug 26, 2011 · 10 comments

Comments

@ajendrex
Copy link
Contributor

The following system:

%agent: a()
%agent: b()
%agent: c()
'AB' a() -> b() @ 1
%obs: 'A' a()
%obs: 'C' c()
%init: 100 a()
%mod: 'A' < 10 do $ADD 1 c() until [false]

run with the command line KaSim -i test.ka -e 100 -p 100 -o test.out
never introduces a c() agent.

tested KaSim versions: 1.07 and 1.08

@jkrivine
Copy link
Member

Could you include KaSim's version number?

Le 26/08/2011 20:13, ajendrex a écrit :

The following system:

%agent: a()
%agent: b()
%agent: c()
'AB' a() -> b() @ 1
%obs: 'A' a()
%obs: 'C' c()
%init: 100 a()
%mod: 'A'< 10 do $ADD 1 c() until [false]

run with the command line KaSim -i test.ka -e 100 -p 100 -o test.out
never introduces a c() agent.

@ajendrex
Copy link
Contributor Author

On 08/26/2011 03:31 PM, jkrivine wrote:

Could you include KaSim's version number?

Le 26/08/2011 20:13, ajendrex a écrit :

The following system:

%agent: a()
%agent: b()
%agent: c()
'AB' a() -> b() @ 1
%obs: 'A' a()
%obs: 'C' c()
%init: 100 a()
%mod: 'A'< 10 do $ADD 1 c() until [false]

run with the command line KaSim -i test.ka -e 100 -p 100 -o test.out
never introduces a c() agent.

sure!

tested KaSim versions: 1.07 and 1.08

jkrivine pushed a commit that referenced this issue Aug 29, 2011
-issue #28 : The same message preventing overwriting appears twice
-issue #39 : Some perturbation were never triggered
@jkrivine
Copy link
Member

Issue corrected in KaSim >= 1.08_290811

@ajendrex
Copy link
Contributor Author

I downloaded and compiled KaSim 1.08_290811, it still doesn't work properly for my example. Actually, now I observe an even more strange behaviour :s, because every 10 steps the observables are identical (so, there are kind of empty events).

@jkrivine
Copy link
Member

Weird

I'll have a look asap

Le 29/08/2011 21:56, ajendrex a écrit :

I downloaded and compiled KaSim 1.08_290811, it still doesn't work properly for my example. Actually, now I observe an even more strange behaviour :s, because every 10 steps the observables are identical (so, there are kind of empty events).

@jkrivine jkrivine reopened this Aug 29, 2011
@jkrivine
Copy link
Member

In fact I don't see anything weird. It's seems to be a matter of oversampling to me. If you are asking for more points that there are time steps then KaSim tries to fill the gaps with empty events.
This is probably related to issue #17. Can you confirm? If so I'll close this issue.

@ajendrex
Copy link
Contributor Author

OK,

Now I understand the modus operandi for -p option; It tries to sample the state of the mixture uniformly over time of simulation. I re-run the simulation as KaSim -i test.ka -e 100 -p 1000 -o test.out but I still get just 100 points of sampling, being the following the last line of the output:

2.043989E+00 100 1.100000E+01 0.000000E+00

11 a() agents and 0 c() agents. So, there are 11 more 'AB' reactions to go in the mixture, but the simulation stops. I think that the problem could be with the events counter (second column), which is increased at every sampling point, no matter if there was or not an event since the previous sampling point.

If I run KaSim -i test.ka -t 5 -p 100 -o test.out, the simulation reach a deadlock, the last line of the output looks like
4.900000E+00 115 0.000000E+00 1.000000E+01
and everything fits together (except for the events counter, which in this case didn't increase at every sampling point, but it got to 115 instead of 100) ;)

@jkrivine
Copy link
Member

Yes I want to change the -p option anyway according to the discussion
related to issue #17. Anyway it seems I can close issue #39 now, agreed ?

Le 30/08/2011 15:46, ajendrex a écrit :

OK,

Now I understand the modus operandi for -p option; It tries to sample the state of the mixture uniformly over time of simulation. I re-run the simulation as KaSim -i test.ka -e 100 -p 1000 -o test.out but I still get just 100 points of sampling, being the following the last line of the output:

2.043989E+00 100 1.100000E+01 0.000000E+00

11 a() agents and 0 c() agents. So, there are 11 more 'AB' reactions to go in the mixture, but the simulation stops. I think that the problem could be with the events counter (second column), which is increased at every sampling point, no matter if there was or not an event since the previous sampling point.

If I run KaSim -i test.ka -t 5 -p 100 -o test.out, the simulation reach a deadlock, the last line of the output looks like
4.900000E+00 115 0.000000E+00 1.000000E+01
and everything fits together (except for the events counter, which in this case didn't increased at every sampling point, but it got to 115 instead of 100) ;)

@ajendrex
Copy link
Contributor Author

well, yes... anyway, is it possible to easily fix the problem with the events counter? That's the reason why simulations stop before actually reach the specified number of events (-e)

@jkrivine
Copy link
Member

Sorry to be bureaucratic but could you comment on issue #17 or create
another issue concerning event sampling.
Since this issue was related to another topic which seems to be solved
now :)
We just need to keep bugs sorted!

Cheers and thanks for the feebacks
J

Le 30/08/2011 17:38, ajendrex a écrit :

well, yes... anyway, is it possible to easily fix the problem with the events counter? That's the reason why simulations stop before actually reach the specified number of events (-e)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants