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

Inputs file, $STOP, snapshotfile, reproducibility issue #608

Open
hmedina opened this issue Jan 21, 2020 · 0 comments
Open

Inputs file, $STOP, snapshotfile, reproducibility issue #608

hmedina opened this issue Jan 21, 2020 · 0 comments
Labels

Comments

@hmedina
Copy link
Collaborator

hmedina commented Jan 21, 2020

Toy model:

%agent: Agent(site)		%init: 100 Agent()
Agent(site[./1]), Agent(site[./1]) @ 1
Agent(site[1/.]), Agent(site[1/.]) @ 1
%mod: ([T] > 10) do $STOP "snap_final.ka"; repeat [false]

Run with

KaSim -i model.ka

Produces a file, inputs.ka, along with snap_final.ka. Then:

KaSim -i inputs.ka

"reproduction" run did not produce a snapshot.

The inputs file contains two $STOP commands, one in [T], the other in [E]. As is, it seems the latter is evaluated first and the former is ignored, yielding the problem. Moreover, if the user were to remove the seed specification line (e.g. to produce replicates), this yields a race condition, where the snapshot may be produced if [T] advanced faster than [E] based on the RNG.

Desired behavior: the inputs file reproduces the behavior of the original run, including all snapshot generation points.

@hmedina hmedina added the KaSim label Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant