Miscellaneous Methods
These other methods are also available within DeviceAPI
for use within agent functions:
Method |
Return |
Description |
---|---|---|
|
Returns the current agent’s unique identifier, this ID is unique to the agent throughout the simulation. All IDs are greater than 0. |
|
|
Returns the current step index, the first step has index 0. Exit conditions execute before the step counter is incremented. |
|
|
|
Returns the current thread index, each agent executing the agent function has a unique thread index in the range [0, N). |
|
When passed a string literal, this function will return a boolean confirming whether that string matches the executing agent’s name. This function is considered expensive. |
|
|
When passed a string literal, this function will return a boolean confirming whether that string matches the executing agent’s state. This function is considered expensive. |