HomogeneousOrientingPedestrian2D

open class HomogeneousOrientingPedestrian2D<T, N : ConvexPolygon, E> @JvmOverloads constructor(randomGenerator: RandomGenerator, environment: EuclideanPhysics2DEnvironmentWithGraph<*, T, N, E>, backingNode: Node<T>, knowledgeDegree: Double, minSide: Double, maxSide: Double, group: PedestrianGroup2D<T>?) : AbstractOrientingPedestrian<T, Position2D, Transformation2D, Ellipse, N, E, ShapeFactory> , Pedestrian2D<T>

A homogeneous OrientingPedestrian in the Euclidean world. Landmarks are represented as Ellipses, which can model the human error concerning both the exact position of a landmark and the angles formed by the connections between them. This class accepts an environment whose graph contains ConvexPolygonal nodes.

Parameters

T

the concentration type.

N

the type of nodes of the navigation graph provided by the environment.

E

the type of edges of the navigation graph provided by the environment.

Constructors

Link copied to clipboard
fun <T, N : ConvexPolygon, E> HomogeneousOrientingPedestrian2D(incarnation: Incarnation<T, Euclidean2DPosition>, randomGenerator: RandomGenerator, environment: EuclideanPhysics2DEnvironmentWithGraph<*, T, N, E>, nodeCreationParameter: String? = null, knowledgeDegree: Double, minSide: Double = 30.0, maxSide: Double = 60.0, group: PedestrianGroup2D<T>? = null)
Link copied to clipboard
fun <T, N : ConvexPolygon, E> HomogeneousOrientingPedestrian2D(randomGenerator: RandomGenerator, environment: EuclideanPhysics2DEnvironmentWithGraph<*, T, N, E>, backingNode: Node<T>, knowledgeDegree: Double, minSide: Double = 30.0, maxSide: Double = 60.0, group: PedestrianGroup2D<T>? = null)

Functions

Link copied to clipboard
abstract fun addReaction(p0: Reaction<T>)
Link copied to clipboard
abstract fun cloneNode(p0: Time): Node<T>
Link copied to clipboard
abstract operator fun compareTo(other: Node<T>): Int
Link copied to clipboard
abstract operator fun contains(p0: Molecule): Boolean
Link copied to clipboard
open fun forEach(p0: Consumer<in Reaction<T>>)
Link copied to clipboard
abstract fun getConcentration(p0: Molecule): T
Link copied to clipboard
abstract fun getContents(): MutableMap<Molecule, T>
Link copied to clipboard
abstract fun getId(): Int
Link copied to clipboard
abstract fun getMoleculeCount(): Int
Link copied to clipboard
abstract fun getReactions(): MutableList<Reaction<T>>
Link copied to clipboard
abstract operator override fun iterator(): MutableIterator<Reaction<T>>
Link copied to clipboard
open fun <M : ConvexGeometricShape<Position2D, Transformation2D>> registerVisit(area: M)

Registers a visit to the provided area in the agent's volatileMemory.

Link copied to clipboard
abstract fun removeConcentration(p0: Molecule)
Link copied to clipboard
abstract fun removeReaction(p0: Reaction<T>)
Link copied to clipboard
abstract fun setConcentration(p0: Molecule, p1: T)
Link copied to clipboard
abstract fun speed(): Double

The speed at which the pedestrian is moving.

Link copied to clipboard
open fun spliterator(): Spliterator<Reaction<T>>

Properties

Link copied to clipboard
open override val cognitiveMap: NavigationGraph<Position2D, Transformation2D, Ellipse, DefaultEdge>

The cognitive map of the pedestrian. This is generated from the environment's graph as follows: we randomly select a % of environment's areas equal to the knowledge degree of the pedestrian, we then create a landmark in each of them. Those landmarks will be the nodes of the cognitive map. Concerning the connections between them, we produce a graph in which each generated landmark is connected to any other landmark reachable from it, with an edge whose weight depends on the number of areas that need to be traversed. Finally, the cognitive map is a minimum spanning tree of the described full connected graph. Note that edges are plain DefaultEdges, which means no extra info regarding the connection between landmarks is stored in the cognitive map. If two landmarks are connected, the pedestrian knows there's a path between them (this may be simple or not, i.e. representable as a single segment, but the pedestrian doesn't know it). If two landmarks are not connected, the pedestrian doesn't have info regarding any path between them, which may anyway exist.

Link copied to clipboard
open override val environment: EuclideanPhysics2DEnvironmentWithGraph<*, T, N, E>

Access to the environment.

Link copied to clipboard
open override val fieldOfView: FieldOfView2D<T>

The field of view of a pedestrian in the Euclidean world. Implementors should override this property to prevent the continuous creation of new FieldOfView2Ds.

Link copied to clipboard
override val knowledgeDegree: Double

The knowledge degree of the agent concerning the environment. This is a Double value in 0, 1 describing the percentage of environment the agent is familiar with prior to the start of the simulation (thus it does not take into account the knowledge the pedestrian will gain during it, namely the volatileMemory).

Link copied to clipboard

The group this pedestrian belongs to.

Link copied to clipboard
open val senses: List<InfluenceSphere>

The list of influence spheres belonging to this pedestrian (by default, only its fieldOfView).

Link copied to clipboard
open override val shape: Euclidean2DShape

The shape of any pedestrian in the Euclidean world. Implementors should override this property to prevent the continuous creation of new Euclidean2DShapes.

Link copied to clipboard
open override val volatileMemory: MutableMap<ConvexGeometricShape<Position2D, Transformation2D>, Int>

The volatile memory of the agent: it models the ability to remember areas of the environment already visited since the start of the simulation. Each area is paired with the number of visits. Areas are assumed to be represented as ConvexGeometricShapes, as in NavigationGraphs.

Inheritors

Link copied to clipboard