send()

Transition another agent or list of agents to a given state in a given condition.

Synopsis

send(agent, condition_name, state_name)
send(agent_list, condition_name, state_name)

Description

This function transitions another agent to a new state. The agent or agents are identified by the first parameter as an expression that evaluates to either an agent ID or a list of agent IDs. The given agent or agents are immediately transitioned to the given state in the given condition.

If the destination state is the exposed state for the desitination condition, then this is equivalent to an exposure by the executing agent.

There is no way for an agent or agents to prevent this transition from occurring.

Parameters

agent

An expression that evaluates to the ID of an agent that represent the target agent.

agent_list

An expression that evaluates to a list of agent ids, who represents the target agents.

condition_name

A valid condition in the simulation where the target agent or agents are impacted.

state_name

A valid state within the given condition that the target agent or agents transition into.

Examples

This examples sends the agent with ID id2 into the Selected state in condition SomeCondition.

send(id2, SomeCondition, Selected)

This next example does the same action, except that two agents are transitioned to the new state.

send(list(id2, id3), SomeCondition, Selected)

See Also

ask()