Skip to content

get_new_name

Tushar Semwal edited this page Oct 15, 2017 · 1 revision

Syntax:

get_new_name(Agent_name, New_agent_name)  % Generates a new name for an agent  %

Agent_name: <atom + >, New_agent_name: <atom - >

Description:

This predicate is used for generating a unique name for an agent. The names generated by this predicate are of form <Agent_name><random number>_<IP>_<Port>. The returned value is assigned in the variable New_agent_name.

Example:

?- get_new_name(agenta,X)

The output is:

?- X = agenta1_localhost_5658.
Clone this wiki locally