-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Node,it.unibo.alchemist.model.interfaces.OrientingAgent,it.unibo.alchemist.model.interfaces.OrientingPedestrian,it.unibo.alchemist.model.interfaces.Pedestrian,it.unibo.alchemist.model.interfaces.nodes.NodeWithShape,java.io.Serializable,kotlin.Comparable,kotlin.collections.Iterable,kotlin.collections.MutableIterable
public abstract class AbstractOrientingPedestrian<T extends Object, P extends Position<P>, Vector<P>, A extends GeometricTransformation<P>, L extends ConvexGeometricShape<P, A>, N extends ConvexGeometricShape<P, A>, E extends Object, F extends GeometricShapeFactory<P, A>> extends AbstractHomogeneousPedestrian<T, P, A, F> implements 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.
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<ConvexGeometricShape<P, A>, Integer>volatileMemoryprivate final NavigationGraph<P, A, L, DefaultEdge>cognitiveMapprivate final EnvironmentWithGraph<?, T, P, A, N, E>environmentprivate final DoubleknowledgeDegreeprivate final List<InfluenceSphere>sensesprivate final InfluenceSpherefieldOfViewprivate final PedestrianGroup<T, P, A>membershipGroupprivate final GeometricShape<P, A>shape
-
Constructor Summary
Constructors Constructor Description AbstractOrientingPedestrian(RandomGenerator randomGenerator, EnvironmentWithGraph<?, T, P, A, N, E> environment, Node<T> backingNode, Double knowledgeDegree, PedestrianGroup<T, P, A> group, Double minArea)
-
Method Summary
Modifier and Type Method Description Map<ConvexGeometricShape<P, A>, Integer>getVolatileMemory()The volatile memory of the agent: it models the ability to remember areas of the environment already visited since the start of the simulation. NavigationGraph<P, A, L, DefaultEdge>getCognitiveMap()The cognitive map of the pedestrian. EnvironmentWithGraph<?, T, P, A, N, E>getEnvironment()final DoublegetKnowledgeDegree()The knowledge degree of the agent concerning the environment. List<InfluenceSphere>getSenses()abstract InfluenceSpheregetFieldOfView()The field of view of the pedestrian. abstract PedestrianGroup<T, P, A>getMembershipGroup()The group this pedestrian belongs to. abstract GeometricShape<P, A>getShape()-
Methods inherited from class it.unibo.alchemist.model.interfaces.OrientingPedestrian
registerVisit, speed -
Methods inherited from class it.unibo.alchemist.model.interfaces.nodes.NodeWithShape
addReaction, cloneNode, contains, getConcentration, getContents, getId, getMoleculeCount, getReactions, removeConcentration, removeReaction, setConcentration -
Methods inherited from class it.unibo.alchemist.model.interfaces.Node
compareTo, iterator -
Methods inherited from class kotlin.collections.MutableIterable
forEach, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getVolatileMemory
Map<ConvexGeometricShape<P, A>, Integer> getVolatileMemory()
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.
-
getCognitiveMap
NavigationGraph<P, A, L, DefaultEdge> getCognitiveMap()
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.
-
getEnvironment
EnvironmentWithGraph<?, T, P, A, N, E> getEnvironment()
-
getKnowledgeDegree
final Double getKnowledgeDegree()
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).
-
getSenses
List<InfluenceSphere> getSenses()
-
getFieldOfView
abstract InfluenceSphere getFieldOfView()
The field of view of the pedestrian.
-
getMembershipGroup
abstract PedestrianGroup<T, P, A> getMembershipGroup()
The group this pedestrian belongs to.
-
getShape
abstract GeometricShape<P, A> getShape()
-
-
-
-