Package-level declarations

Generic actions implementations.

Types

Link copied to clipboard
abstract class AbstractAction<T> : Action<T>
An abstract class facility with some generic methods implemented.
Link copied to clipboard
This class offers the basic structures to provide operations with numeric concentrations on a single molecule.
Link copied to clipboard
An abstract class that factorizes code for multiple different movements.
Link copied to clipboard
Link copied to clipboard
abstract class AbstractMoveNode<T, P : Position<P>?> : AbstractAction<T>
This action moves a node inside a given environment.
Link copied to clipboard
Moves the node randomly.
Link copied to clipboard
class CameraInjectVisibleNodeClosestToDistance(node: Node<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractAction<Any>

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

Link copied to clipboard
class CameraSee @JvmOverloads constructor(node: Node<Any>, environment: Physics2DEnvironment<Any>, val distance: Double, val angle: Double, outputMolecule: Molecule = SimpleMolecule("vision"), filterByMolecule: Molecule? = null) : AbstractAction<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>(node: Node<T>, reaction: Reaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: RandomGenerator, distance: Double, speed: Double) : GenericRandomWalker<T>

Moves for distance toward a uniformly random chosen direction at a constant speed, then changes direction and walks another distance, and so on.

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

It's an AbstractConfigurableMoveNode in the Euclidean world, which provides a default interpolatePositions that is accurate with respect to the target given and the current maximum walking distance.

Link copied to clipboard
class FollowAtDistance<T>(node: Node<T>, reaction: Reaction<T>, environment: Environment<T, Euclidean2DPosition>, target: Molecule, distance: Double, speed: Double) : AbstractAction<T>

Makes the Node follow a target defined in a Molecule with some speed, but keeping a distance from it.

Link copied to clipboard
open class GenericRandomWalker<T>(node: Node<T>, reaction: Reaction<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(node: Node<T>, reaction: Reaction<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
Moves the node along the x axis up to coordinate getMaxX, with steps of size getDeltaX.
Link copied to clipboard
Movement towards a target defined as a concentration.
Link copied to clipboard
Removes the current node from the environment.
Link copied to clipboard
open class ToggleMolecule<T>(node: Node<T>, molecule: Molecule, concentration: T) : AbstractAction<T>

Treats molecule as a switch:

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

Treats molecule as a probabilistic switch: