-
- 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.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 class HomogeneousOrientingPedestrian2D<T extends Object, N extends ConvexPolygon, E extends Object> extends AbstractOrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, Ellipse, N, E, Euclidean2DShapeFactory> implements 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.
-
-
Field Summary
Fields Modifier and Type Field Description private 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 HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide, Double maxSide, PedestrianGroup2D<T> group)HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide, Double maxSide)HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide)HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree)HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Double knowledgeDegree)HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide, Double maxSide, PedestrianGroup2D<T> group)HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide, Double maxSide)HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide)HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree)
-
Method Summary
Modifier and Type Method Description EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E>getEnvironment()Access to the environment. GeometricShape<Euclidean2DPosition, Euclidean2DTransformation>getShape()FieldOfView2D<T>getFieldOfView()List<InfluenceSphere>getSenses()abstract PedestrianGroup<T, Euclidean2DPosition, Euclidean2DTransformation>getMembershipGroup()The group this pedestrian belongs to. 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. NavigationGraph<Euclidean2DPosition, Euclidean2DTransformation, Ellipse, DefaultEdge>getCognitiveMap()The cognitive map of the pedestrian. final DoublegetKnowledgeDegree()The knowledge degree of the agent concerning the environment. -
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide, Double maxSide, PedestrianGroup2D<T> group)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide, Double maxSide)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree, Double minSide)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, String nodeCreationParameter, Double knowledgeDegree)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(Incarnation<T, Euclidean2DPosition> incarnation, RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Double knowledgeDegree)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide, Double maxSide, PedestrianGroup2D<T> group)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide, Double maxSide)
-
HomogeneousOrientingPedestrian2D
HomogeneousOrientingPedestrian2D(RandomGenerator randomGenerator, EuclideanPhysics2DEnvironmentWithGraph<?, T, N, E> environment, Node<T> backingNode, Double knowledgeDegree, Double minSide)
-
-
Method Detail
-
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).
-
-
-
-