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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if the internal action can be used in plans' contextexecute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.int
int
Methods inherited from class jason.asSemantics.DefaultInternalAction
checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
stopMAS
public stopMAS()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
in classDefaultInternalAction
-
canBeUsedInContext
public boolean canBeUsedInContext()Description copied from interface:InternalAction
Return true if the internal action can be used in plans' context- Specified by:
canBeUsedInContext
in interfaceInternalAction
- Overrides:
canBeUsedInContext
in classDefaultInternalAction
-
execute
Description copied from interface:InternalAction
Executes 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:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-