Class SAPEREMoveLSAToAgent
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,it.unibo.alchemist.model.sapere.ILsaAction
,java.io.Serializable
public final class SAPEREMoveLSAToAgent extends SAPEREAgent
This agent matches a template, removes a single instance of it from the current node and moves the LSA to another node (specified at creation time). Please note that, since the destination could be anywhere in the system, this action has a GLOBAL Context, and thus may trigger a large number of updates, slowing down the whole simulation. Handle with care.
-
-
Constructor Summary
Constructors Constructor Description SAPEREMoveLSAToAgent(Environment<out Object, out Object> environment, ILsaNode node, int destinationId, ILsaMolecule template)
This is the constructor that should be called from DSL. SAPEREMoveLSAToAgent(ILsaNode node, ILsaNode destination, ILsaMolecule template)
-
Method Summary
Modifier and Type Method Description void
execute()
Context
getContext()
-
Methods inherited from class it.unibo.alchemist.model.sapere.actions.SAPEREAgent
cloneAction, toString
-
Methods inherited from class it.unibo.alchemist.model.sapere.actions.LsaAbstractAction
cloneAction, getNode, setExecutionContext
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction
getOutboundDependencies, toString
-
Methods inherited from class it.unibo.alchemist.model.sapere.ILsaAction
cloneAction, getOutboundDependencies, setExecutionContext
-
Methods inherited from class it.unibo.alchemist.model.Action
cloneAction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SAPEREMoveLSAToAgent
SAPEREMoveLSAToAgent(Environment<out Object, out Object> environment, ILsaNode node, int destinationId, ILsaMolecule template)
This is the constructor that should be called from DSL.- Parameters:
environment
- the current environmentnode
- the source node, where this action is programmeddestinationId
- the destination node idtemplate
- the template LSA to match and move
-
SAPEREMoveLSAToAgent
SAPEREMoveLSAToAgent(ILsaNode node, ILsaNode destination, ILsaMolecule template)
- Parameters:
node
- the source node, where this action is programmeddestination
- the destination node, where this action will move the matched intancetemplate
- the template LSA to match and move
-
-
Method Detail
-
execute
void execute()
-
getContext
Context getContext()
-
-
-
-