-
Notifications
You must be signed in to change notification settings - Fork 7
execute_agent_4
Tushar Semwal edited this page Oct 15, 2017
·
1 revision
execute_agent( Agent_name, (IP, Port), Handler, Start_function).
IP: <atom + > Port: <integer +> Handler: <atom + > Start_function: <atom + > Executes a specified handler code of the agent on the specified platform.
This predicate is similar to agent_execute/3 but instead of calling the default handler predicate with keyword main as a parameter, it will execute the one with Start_function as a parameter.
?- agent_execute(myagent, (localhost,6000), agent_handler, initialize).
Here, Start function is set to initialize. Thus it will call the following handler predicate instead of default ‘main’ function:
?- agent_ handler(myagent,(localhost,9595),initialize):- <Your agent behaviour code goes here>