Skip to content

Agent "identifiers" are recycled and so do not identify agents #659

@hmedina

Description

@hmedina

Given the toy model

%agent: Jan()
%agent: Feb(s{a, b, c})
%agent: Mar()

%init: 1 Jan(), Feb(s{a}), Feb(s{b}), Mar()

Feb(s{a})- @ inf
Feb(s{c})+ @ 0.1

%mod: [E] = 0 do $SNAPSHOT [true] ;
%mod: [E] = 1 do $SNAPSHOT [true] ;
%mod: [E] = 2 do $SNAPSHOT [true] ; $STOP ;

The snapshots that are produced by KaSim are:

// Snapshot [Event: 0]
// "uuid" : "831335101"
%def: "T0" "0"

%init: 1 /*1 agents*/ x3:Mar()
%init: 1 /*1 agents*/ x1:Feb(s{a}[.])
%init: 1 /*1 agents*/ x2:Feb(s{b}[.])
%init: 1 /*1 agents*/ x0:Jan()
// Snapshot [Event: 1]
// "uuid" : "831335101"
%def: "T0" "0"

%init: 1 /*1 agents*/ x3:Mar()
%init: 1 /*1 agents*/ x2:Feb(s{b}[.])
%init: 1 /*1 agents*/ x0:Jan()
// Snapshot [Event: 2]
// "uuid" : "831335101"
%def: "T0" "18.3413"

%init: 1 /*1 agents*/ x3:Mar()
%init: 1 /*1 agents*/ x1:Feb(s{c}[.])
%init: 1 /*1 agents*/ x2:Feb(s{b}[.])
%init: 1 /*1 agents*/ x0:Jan()

Note how x1:Feb() means two different agents, one for events [0, 1], a different one for events [2, ...], as distinguished by the internal state of its s site, s{a} vs. s{c} (which are static in this model).

In complex models where there is agent flux (a type of agent is deleted but also created), finding an agent with an "identifier" does not identify that agent. In my Wnt models, I had expected to be able to track bCatenins via these "identifiers", but that is not sound. These integer-marks should not be called or thought of as identifiers until this behavior is corrected.

Instead, one can do trace analysis1. One option is to use KaTie to produce snapshots, as that tool uses true identifiers (it correctly prints x4:Feb(s{c}[.])). Alternatively, one can match for degradation & creation events, to be certain there was no integer-mark recycling between two KaSim-derived snapshots that contain these agents with integer-marks.

Footnotes

  1. Requesting snapshots via %mod: can yield corrupted traces, see https://github.com/Kappa-Dev/KappaTools/issues/656; KaSim will not complain when producing the trace, but will be unable to read it, and by extension so will KaTie...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions