Interface Node

    • Constructor Detail

    • Method Detail

      • addReaction

         abstract Unit addReaction(Reaction<T> reactionToAdd)

        Adds a reaction to this node. The reaction is added only in the node, but not in the it.unibo.alchemist.core.Simulation scheduler, so it will never be executed. To add the reaction also in the scheduler (and start to execute it), you have to call also the method it.unibo.alchemist.core.Simulation.reactionAdded.

        Parameters:
        reactionToAdd - the reaction to be added
      • cloneNode

         abstract Node<T> cloneNode(Time currentTime)

        Creates a new Node which is a clone of the current Node. The new Node will have all the current Node's properties, such as reactions and molecules, but it will also have a different ID.

        Parameters:
        currentTime - the time at which the cloning operation happens
        Returns:

        A new Node which is a clone of the current one.

      • contains

         abstract Boolean contains(Molecule molecule)

        Tests whether a node contains a Molecule.

        Parameters:
        molecule - the molecule to check
        Returns:

        true if the molecule is present, false otherwise

      • getConcentration

         abstract T getConcentration(Molecule molecule)

        Calculates the concentration of a molecule.

        Parameters:
        molecule - the molecule whose concentration will be returned
        Returns:

        the concentration of the molecule

      • removeReaction

         abstract Unit removeReaction(Reaction<T> reactionToRemove)

        Removes a reaction from this node. The reaction is removed only in the node, but not in the it.unibo.alchemist.core.Simulation scheduler, so the scheduler will continue to execute the reaction. To remove the reaction also in the scheduler (and stop to execute it), you have to call also the method it.unibo.alchemist.core.Simulation.reactionRemoved.

        Parameters:
        reactionToRemove - the reaction to be removed
      • setConcentration

         abstract Unit setConcentration(Molecule molecule, T concentration)

        Sets the concentration of mol to c.

        Parameters:
        molecule - the molecule you want to set the concentration
        concentration - the concentration you want for mol
      • addProperty

         abstract Unit addProperty(NodeProperty<T> nodeProperty)

        Adds a capability to the node.

        Parameters:
        nodeProperty - the capability you want to add to the node
      • getId

         abstract Integer getId()
        Returns:

        an univocal id for this node in the environment

      • getReactions

         abstract List<Reaction<T>> getReactions()

        This method allows to access all the reaction of the node.

        Returns:

        the list of rections belonging to this node