Package-level declarations

Types

Link copied to clipboard
abstract class AbstractAction<T>(val reaction: Reaction<T>) : Action<T>

Base implementation of an Action owned by reaction, independent of the kind of host.

Link copied to clipboard
abstract class AbstractActionOnSingleMolecule<T>(reaction: NodeReaction<T>, val molecule: Molecule) : AbstractLocalAction<T>

A node-bound action that modifies the concentration of a single molecule.

Link copied to clipboard

A movement combining three strategies: the next target to reach, the route to follow, and the speed to move at.

Link copied to clipboard
abstract class AbstractLocalAction<T>(reaction: NodeReaction<T>) : AbstractNodeAction<T>

Base implementation of an Action executed on the node hosting its NodeReaction.

Link copied to clipboard

A node-bound action moving its node in environment.

Link copied to clipboard
abstract class AbstractNodeAction<T>(reaction: Reaction<T>, val targetNode: Node<T>) : AbstractAction<T>

Base implementation of an Action executed on a target targetNode, owned by a reaction with any host.

Link copied to clipboard
class BrownianMove<T, P : Position<P>> @JvmOverloads constructor(environment: Environment<T, P>, reaction: Reaction<T>, node: Node<T> = reaction.host as? Node<T> ?: error( "${BrownianMove::class.simpleName} must either be provided with a node " + "or be owned by a reaction hosted by a node", ), randomGenerator: RandomGenerator, range: Double) : AbstractNodeAction<T>

Moves the target node randomly, by at most range along each dimension at every execution.

Link copied to clipboard
class CameraInjectVisibleNodeClosestToDistance(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractLocalAction<Any>

Given a list of VisibleNode associated to visionMolecule, it finds the closest to a point located at distance from the node owning this action in the direction of its heading, and injects its position in targetMolecule.

Link copied to clipboard
class CameraSee @JvmOverloads constructor(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, val distance: Double, val angle: Double, outputMolecule: Molecule = SimpleMolecule("vision"), filterByMolecule: Molecule? = null) : AbstractLocalAction<Any>

Checks nodes in the environment and writes in outputMolecule the list of it.unibo.alchemist.model.VisibleNode, containing filterByMolecule. distance and angle define the field of view.

Link copied to clipboard
class ConstantDistanceRandomWalk<T>(reaction: NodeReaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: RandomGenerator, distance: Double, speed: Double) : GenericRandomWalker<T>

Walks a fixed distance in a uniformly random direction at the given speed, then repeats the move by selecting a new random direction.

Link copied to clipboard
open class EuclideanConfigurableMoveNode<T, P : Position<P>, Vector<P>>(environment: Environment<T, P>, reaction: NodeReaction<T>, routingStrategy: RoutingStrategy<T, P>, targetSelectionStrategy: TargetSelectionStrategy<T, P>, speedSelectionStrategy: SpeedSelectionStrategy<T, P>) : AbstractConfigurableMoveNode<T, P>

An AbstractConfigurableMoveNode specialized for Euclidean spaces.

Link copied to clipboard
class FollowAtDistance<T>(reaction: NodeReaction<T>, environment: Environment<T, Euclidean2DPosition>, target: Molecule, distance: Double, speed: Double) : AbstractLocalAction<T>

Causes a node to follow a destination read from a Molecule, maintaining a fixed distance and respecting a maximum speed.

Link copied to clipboard
open class GenericRandomWalker<T>(reaction: NodeReaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: RandomGenerator, speed: Double, distanceDistribution: RealDistribution) : EuclideanConfigurableMoveNode<T, Euclidean2DPosition>

Chooses random targets in a direction extracted from randomGenerator at a distance extracted from distanceDistribution. Moves the node towards the targets at the given constant speed. Changes target on collision.

Link copied to clipboard
class LevyWalk<T> @JvmOverloads constructor(reaction: NodeReaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: RandomGenerator, speed: Double, scale: Double = 1.0, shape: Double = 1.0) : GenericRandomWalker<T>

Selects a target based on a random direction extracted from randomGenerator, and a random distance extracted from a ParetoDistribution of parameters scale and shape. Moves toward the targets at a constant speed and changes targets on collision.

Link copied to clipboard
class MoveForwardAndTeleport<T, P : Position2D<P>>(environment: Environment<T, P>, reaction: NodeReaction<T>, val deltaX: Double, val minX: Double, val maxX: Double) : AbstractMoveNode<T, P>

Moves the node along the x axis up to maxX, with steps of size deltaX; once beyond maxX, the node is teleported back to minX. It mimics the movement of a node in a cylindrical environment.

Link copied to clipboard
class MoveToTarget<T, P : Position2D<P>>(environment: Environment<T, P>, reaction: NodeReaction<T>, trackMolecule: Molecule, speed: Double) : AbstractConfigurableMoveNode<T, P>

Moves the node at speed towards the position stored as concentration of trackMolecule.

Link copied to clipboard
class RemoveNode<T>(environment: Environment<T, *>, reaction: NodeReaction<T>) : AbstractLocalAction<T>

Removes the node owning this action from environment.

Link copied to clipboard

Sets the concentration of molecule in the node owning this action to value.

Link copied to clipboard
open class ToggleMolecule<T>(reaction: NodeReaction<T>, molecule: Molecule, concentration: T) : AbstractLocalAction<T>

Treats molecule as a switch:

Link copied to clipboard
open class ToggleMoleculeRandomly<T>(reaction: NodeReaction<T>, randomGenerator: RandomGenerator, molecule: Molecule, concentration: T, odds: Double) : ToggleMolecule<T>

Treats molecule as a probabilistic switch: