AbstractOrientingPedestrian

abstract class AbstractOrientingPedestrian<T, P : Position<P>, Vector<P>, A : GeometricTransformation<P>, L : ConvexGeometricShape<P, A>, N : ConvexGeometricShape<P, A>, E, F : GeometricShapeFactory<P, A>>(randomGenerator: RandomGenerator, environment: EnvironmentWithGraph<*, T, P, A, N, E>, backingNode: Node<T>, knowledgeDegree: Double, group: PedestrianGroup<T, P, A>?, minArea: Double) : AbstractHomogeneousPedestrian<T, P, A, F> , OrientingPedestrian<T, P, A, L, DefaultEdge>

An abstract OrientingPedestrian, contains an algorithm for the generation of a pseudo-random cognitiveMap. The creation of landmarks is left to subclasses via factory method (see createLandmarkIn).

The environment must feature a navigation graph.

Parameters

T

the concentration type.

P

the Position type and Vector type for the space this pedestrian is inside.

A

the transformations supported by the shapes in this space.

L

the type of landmarks in the pedestrian's cognitiveMap.

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.

F

the type of the shape factory provided by the environment.

Constructors

Link copied to clipboard
fun <T, P : Position<P>, Vector<P>, A : GeometricTransformation<P>, N : ConvexGeometricShape<P, A>, E> AbstractOrientingPedestrian(randomGenerator: RandomGenerator, environment: EnvironmentWithGraph<*, T, P, A, N, E>, backingNode: Node<T>, knowledgeDegree: Double, group: PedestrianGroup<T, P, A>? = null, minArea: Double = 10.0)

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<P, A>> 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<P, A, L, 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 val environment: EnvironmentWithGraph<*, T, P, A, N, E>
Link copied to clipboard
abstract val fieldOfView: InfluenceSphere

The field of view of the pedestrian.

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
abstract val membershipGroup: PedestrianGroup<T, P, A>

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
abstract val shape: GeometricShape<P, A>
Link copied to clipboard
open override val volatileMemory: MutableMap<ConvexGeometricShape<P, A>, 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