RandomTargetInPolygonOnMap

class RandomTargetInPolygonOnMap<T, O : RoutingServiceOptions<O>, S : RoutingService<GeoPosition, O>>(environment: MapEnvironment<T, O, S>, node: Node<T>, reaction: Reaction<T>, speed: Double, val positionGenerator: Polygon<GeoPosition>) : MoveOnMap<T, O, S>

This actions generates random waypoints inside a Polygon. The polygon can be provided either through as a deployment (positionGenerator), or as List<List<Number>> (polygonCoordinates)

Constructors

Link copied to clipboard
constructor(randomGenerator: <Error class: unknown class>, environment: MapEnvironment<T, O, S>, node: Node<T>, reaction: Reaction<T>, speed: Double, polygonCoordinates: List<List<Number>>)
constructor(environment: MapEnvironment<T, O, S>, node: Node<T>, reaction: Reaction<T>, speed: Double, positionGenerator: Polygon<GeoPosition>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): MoveOnMap<T, O, S>

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open override fun execute()

Effectively executes this action.

Link copied to clipboard
override fun getContext(): Context
Link copied to clipboard
override fun getEnvironment(): MapEnvironment<T, O, S>
Link copied to clipboard
Link copied to clipboard
override fun getOutboundDependencies(): ListSet
Link copied to clipboard
open override fun toString(): String