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

Trace, init, T0 #667

Open
hmedina opened this issue Jun 1, 2023 · 0 comments
Open

Trace, init, T0 #667

hmedina opened this issue Jun 1, 2023 · 0 comments
Labels

Comments

@hmedina
Copy link
Collaborator

hmedina commented Jun 1, 2023

Trace steps of type init do not contain their time of application; nor does the model block in the trace appear to contain the defined T0. As such, the trace is missing the information of what was the value of T when the simulation started and the init steps took place.

For example:

%def: "T0" "3.5"

%agent: neutron()   %init: 1 neutron()
'/' neutron()+ @ 1

%mod: [E] = 2 do $STOP ;

Produces a trace:

{
    "uuid" : "690746744",
    "dict":{"agent":{"id":0,"type":1},"binding_type":{"type":0,"site":1},"quark":{"agent":0,"site":1},"test":["Is_here","Has_Internal","Is_Free","Is_Bound","Has_Binding_type","Is_Bound_to"],"actions":["Create","Mod_internal","Bind","Bind_to","Free","Remove"],"binding_state":["ANY","FREE","BOUND","BOUND_TYPE","BOUND_to"],"event":{"tests":0,"actions":1,"side_effect_src":2,"side_effect_dst":3,"connectivity_tests":4},"simulation_info":{"id":0,"time":1,"event":2,"profiling":3},"step":["Subs","Rule","Pert","Init","Obs","Dummy"]},
    "model":{
        "filenames":["","./tests/unit/time_predefined_T0/model.ka"],
        "update":{
            "signatures":[{"name":"neutron","decl":[]}],
            "single_agents":[null],
            "elementaries":[[]],
            "dag":[{"content":null,"roots":null,"deps":[],"sons":[]}],
            "id_by_type":[[]],
            "max_obs":1},
        "tokens":[],
        "algs":[],
        "observables":["[T]"],
        "ast_rules":[["/",{"mixture":[],"created":[{"type":0,"sites":[],"internals":[]}],"delta_tokens":[],"rate":{"val":1,"loc":{"file":1,"bline":4,"bchr":17,"echr":18}},"unary_rate":null,"editStyle":true}]],
        "elementary_rules":[{"rate":{"val":1,"loc":{"file":1,"bline":4,"bchr":17,"echr":18}},"inserted":[{"Agent":{"Fresh":{"id":0,"type":0}}}],"syntactic_rule":1,"instantiations":[[],[[0,{"Fresh":{"id":0,"type":0}},[]]],[],[],[]]}],
        "contact_map":[[]],
        "interventions":[{
            "alarm":null,
            "condition":{"val":["=",{"val":"[E]","loc":{"file":1,"bline":6,"bchr":6,"echr":9}},{"val":2,"loc":{"file":1,"bline":6,"bchr":12,"echr":13}}],"loc":{"file":1,"bline":6,"bchr":6,"echr":13}},
            "effect":[{"action":"STOP"}],"repeat":{"val":false},"needs_backtrack":true}],
        "dependencies_in_time":[],
        "dependencies_in_event":[["MODIF",0]],
        "algs_reverse_dependencies":[],
        "tokens_reverse_dependencies":[]},
    "trace":[
        [3,[[0,[0,0],[]]]],
        [1,0,[[],[[0,[1,0],[]]],[],[],[]],[-1,5.2935983629643,1,null]],
        [1,0,[[],[[0,[2,0],[]]],[],[],[]],[-1,5.756406890124298,2,null]]]
}

But the 3.5 value does not seem to be present at all.

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