Package it.unibo.alchemist.model.implementations.actions

Types

Link copied to clipboard
abstract class AbstractEuclideanConfigurableMoveNode<T, P : Position<P>, Vector<P>>(    environment: Environment<T, P>,     node: Node<T>,     routing: RoutingStrategy<T, P>,     target: TargetSelectionStrategy<T, P>,     speed: 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 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
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) : AbstractEuclideanConfigurableMoveNode<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 HeadTowardRandomDirection<T>(    node: Node<T>,     environment: Physics2DEnvironment<T>,     randomGenerator: RandomGenerator) : AbstractAction<T>

Changes the heading of node randomly. The environment must support node heading, hence, be a Physics2DEnvironment.

Link copied to clipboard
class HeadTowardTarget<T> @JvmOverloads constructor(    node: Node<T>,     environment: Physics2DEnvironment<T>,     reaction: Reaction<T>,     target: Molecule,     angularSpeedDegrees: Double = 360.0) : AbstractAction<T>

Reads the target's absolute coordinates from the target molecule contained in node and sets the node's heading accordingly.

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 rng, 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 Spin<T>(    node: Node<T>,     reaction: Reaction<T>,     environment: Physics2DEnvironment<T>,     angularSpeedDegrees: Double) : AbstractAction<T>

Spins a node around itself at angularSpeedDegrees normalized according to the speed of the reaction.