-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.CognitivePedestrian,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.Pedestrian,it.unibo.alchemist.model.interfaces.Pedestrian2D,it.unibo.alchemist.model.interfaces.nodes.NodeWithShape,it.unibo.alchemist.model.interfaces.nodes.NodeWithShape,java.io.Serializable,kotlin.Comparable,kotlin.collections.Iterable,kotlin.collections.MutableIterable
public final class CognitiveOrientingPedestrian2D<T extends Object, N extends ConvexPolygon, E extends Object> extends HomogeneousOrientingPedestrian2D<T, N, E> implements CognitivePedestrian<T, Euclidean2DPosition, Euclidean2DTransformation>
A cognitive OrientingPedestrian in the Euclidean world.
-
-
Field Summary
Fields Modifier and Type Field Description private final HeterogeneousPedestrianModel<T, Euclidean2DPosition, Euclidean2DTransformation>pedestrianModelprivate final CognitiveModelcognitiveModelprivate final EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E>environmentprivate final GeometricShape<Euclidean2DPosition, Euclidean2DTransformation>shapeprivate final FieldOfView2D<T>fieldOfViewprivate final List<InfluenceSphere>sensesprivate final PedestrianGroup<T, Euclidean2DPosition, Euclidean2DTransformation>membershipGroupprivate final Map<ConvexGeometricShape<Euclidean2DPosition, Euclidean2DTransformation>, Integer>volatileMemoryprivate final NavigationGraph<Euclidean2DPosition, Euclidean2DTransformation, Ellipse, DefaultEdge>cognitiveMapprivate final DoubleknowledgeDegree
-
Constructor Summary
Constructors Constructor Description CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, PedestrianGroup2D<T> group, Object age, String gender, Molecule danger)Allows to specify age and gender with a string. CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, PedestrianGroup2D<T> group, Object age, String gender)Allows to specify age and gender with a string. CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Object age, String gender)Allows to specify age and gender with a string. CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Double knowledgeDegree, Object age, String gender)Allows to specify age and gender with a string. CognitiveOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, PedestrianGroup2D<T> group, Age age, Gender gender, Molecule danger)CognitiveOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, PedestrianGroup2D<T> group, Age age, Gender gender)CognitiveOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Age age, Gender gender)
-
Method Summary
-
Methods inherited from class it.unibo.alchemist.model.interfaces.Pedestrian2D
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 it.unibo.alchemist.model.interfaces.OrientingPedestrian
registerVisit -
Methods inherited from class it.unibo.alchemist.model.implementations.nodes.CognitiveOrientingPedestrian2D
influencialPeople -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, PedestrianGroup2D<T> group, Object age, String gender, Molecule danger)
Allows to specify age and gender with a string.
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, PedestrianGroup2D<T> group, Object age, String gender)
Allows to specify age and gender with a string.
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Object age, String gender)
Allows to specify age and gender with a string.
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Double knowledgeDegree, Object age, String gender)
Allows to specify age and gender with a string.
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, PedestrianGroup2D<T> group, Age age, Gender gender, Molecule danger)
-
CognitiveOrientingPedestrian2D
CognitiveOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, PedestrianGroup2D<T> group, Age age, Gender gender)
-
-
Method Detail
-
getPedestrianModel
final HeterogeneousPedestrianModel<T, Euclidean2DPosition, Euclidean2DTransformation> getPedestrianModel()
The pedestrian model, containing its age, gender, and speed.
-
getCognitiveModel
CognitiveModel getCognitiveModel()
The CognitiveModel of the pedestrian, storing their mental state.
-
getEnvironment
EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> getEnvironment()
Access to the environment.
-
getFieldOfView
FieldOfView2D<T> getFieldOfView()
-
getSenses
List<InfluenceSphere> getSenses()
-
getMembershipGroup
abstract PedestrianGroup<T, Euclidean2DPosition, Euclidean2DTransformation> getMembershipGroup()
The group this pedestrian belongs to.
-
getVolatileMemory
Map<ConvexGeometricShape<Euclidean2DPosition, Euclidean2DTransformation>, 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<Euclidean2DPosition, Euclidean2DTransformation, Ellipse, 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.
-
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).
-
-
-
-