Package jason.stdlib
Class stopMAS
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.stopMAS
- All Implemented Interfaces:
InternalAction
,java.io.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:
create_agent
,kill_agent
,RuntimeServices
, Serialized Form
-
Constructor Summary
Constructors Constructor Description stopMAS()
-
Method Summary
Modifier and Type Method Description boolean
canBeUsedInContext()
Return true if the internal action can be used in plans' contextjava.lang.Object
execute(TransitionSystem ts, Unifier un, Term[] args)
Executes the internal action.int
getMaxArgs()
int
getMinArgs()
Methods inherited from class jason.asSemantics.DefaultInternalAction
checkArguments, destroy, prepareArguments, suspendIntention
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.ExceptionDescription 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:
java.lang.Exception
-