AnyLogic
Expand
Font size

Information functions

Function Description
String getName(Agent agent) Returns the name of the agent, or ”null” if the given agent does not exist. This function is useful for formatting the name of an agent that may be null.

agent — the name of the agent, may be null
String getFullName(Agent agent) Returns the name of the agent prefixed by the path from the top-level agent to the given agent. Returns "null" (a string) if the given agent does not exist. This function is useful for formatting the name of an agent that may be null.

agent — the name of the agent, may be null
String briefInfoOn(Object object) Returns a brief, one-line text information of the given object. Supports the most frequently used types, including most numeric types, Color, Date, Agent, HyperArray, collections, events, transitions, and so on. If the argument type is not supported, returns the output of the default toString() call. If the argument is null, returns "null" (a string).

object — the object to provide information on
String inspectOf(Object object) Returns textual information about the object for display in the multi-line inspection window.
By default, the output is the result of calling the toString() function of the object.
If the inspection window is customized using an Inspection window element, the output is defined by that element.

object — the object being inspected
How can we improve this article?