setState {ABM}R Documentation

Set the state of the agent

Description

Set the state of the agent

Arguments

agent

an external pointer returned by newAgent

state

an R list giving the components of the state to be undated.

Details

In this framework, a state is a list, each named component is called a domain. This function only updates the values of the domain given in the "value" list, while leave the other components not in the "value" list unchanged.

If agent is an R6 object, then we should either use agent$schedule, or use schedule(agent$get, event)


[Package ABM version 0.4.1 Index]