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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 environment
        node - the source node, where this action is programmed
        destinationId - the destination node id
        template - the template LSA to match and move
      • SAPEREMoveLSAToAgent

        SAPEREMoveLSAToAgent(ILsaNode node, ILsaNode destination, ILsaMolecule template)
        Parameters:
        node - the source node, where this action is programmed
        destination - the destination node, where this action will move the matched intance
        template - the template LSA to match and move