Package jason.stdlib
Class stopMAS
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.stopMAS
- All Implemented Interfaces:
InternalAction,Serializable
@Manual(literal=".stopMAS",
hint="aborts the execution of all agents in the multi-agent system (and any simulated environment too)",
argsHint="",
argsType="",
examples=".stopMAS: close multi-agent system application",
seeAlso={"jason.stdlib.create_agent","jason.stdlib.kill_agent","jason.runtime.RuntimeServices"})
public class stopMAS
extends DefaultInternalAction
Internal action: .stopMAS.
Description: aborts the execution of all agents in the multi-agent system (and any simulated environment too).
Example:
-
.stopMAS. -
.stopMAS(2000)shuts down the system in 2 seconds. The signal +jag_shutting_down(T) will be produced so that agents can prepare themselves for the shutdown.
-
.stopMAS(2000,false)same as before, but do not kill the JVM. -
.stopMAS(0,1)shuts down the system and returns 1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the internal action can be used in plans' contextexecute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intintMethods inherited from class jason.asSemantics.DefaultInternalAction
checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
stopMAS
public stopMAS()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgsin classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgsin classDefaultInternalAction
-
canBeUsedInContext
public boolean canBeUsedInContext()Description copied from interface:InternalActionReturn true if the internal action can be used in plans' context- Specified by:
canBeUsedInContextin interfaceInternalAction- Overrides:
canBeUsedInContextin classDefaultInternalAction
-
execute
Description copied from interface:InternalActionExecutes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
executein interfaceInternalAction- Overrides:
executein classDefaultInternalAction- Throws:
Exception
-