Firing Operator - adolgert/CTDE.jl GitHub Wiki

The firing operator is a function that changes the state. Its signature has to be f(state, keys...). It is important that the firing function return a list of all substates which could be affected by having fired. While the list of hazard dependencies and firing dependencies is state, the list of what was affected by firing is not. As an example, recovery and infection for a disease model could look like

function Recover(state, who)
    state[who]=0
    [who]
end

function Infect(state, who)
    state[who]=1
    [who]
end