All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.alchemist.model.cognitive.OrientingProperty.kt Maven / Gradle / Ivy

There is a newer version: 35.0.0
Show newest version
/*
 * Copyright (C) 2010-2023, Danilo Pianini and contributors
 * listed, for each module, in the respective subproject's build.gradle.kts file.
 *
 * This file is part of Alchemist, and is distributed under the terms of the
 * GNU General Public License, with a linking exception,
 * as described in the file LICENSE in the Alchemist distribution's top directory.
 */

package it.unibo.alchemist.model.cognitive

import it.unibo.alchemist.model.NodeProperty
import it.unibo.alchemist.model.Position
import it.unibo.alchemist.model.environments.EnvironmentWithGraph
import it.unibo.alchemist.model.geometry.ConvexShape
import it.unibo.alchemist.model.geometry.Transformation
import it.unibo.alchemist.model.geometry.Vector
import it.unibo.alchemist.model.geometry.navigationgraph.NavigationGraph

/**
 * A node's capability to orient.
 */
interface OrientingProperty : NodeProperty
    where P : Position

, P : Vector

, A : Transformation

, L : ConvexShape, N : ConvexShape { /** * 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]). */ val knowledgeDegree: Double /** * The environment in which the node moves. */ val environment: EnvironmentWithGraph<*, T, P, A, N, E> /** * The cognitive map of the agent. It's a graph composed of landmarks (elements of the environment easy to * remember due to their uniqueness) and spatial relations between them. It's modeled as a [NavigationGraph]. */ val cognitiveMap: NavigationGraph /** * 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 [ConvexShape]s, as in [NavigationGraph]s. */ val volatileMemory: MutableMap, Int> /** * Registers a visit to the provided [area] in the agent's [volatileMemory]. */ fun > registerVisit(area: M) { volatileMemory[area] = (volatileMemory[area] ?: 0) + 1 } /** * Creates a landmark entirely contained in the given area. If such area contains one or more destinations, the * returned landmark must contain at least one of them. */ fun createLandmarkIn(area: N): L }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy