OSMEnvironment

This class serves as template for more specific implementations of environments using a map. It encloses the navigation logic, but leaves the subclasses to decide how to provide map data (e.g. loading from disk or rely on online services). The data is then stored in-memory for performance reasons.

Parameters

<T>

concentration type

Constructors

Link copied to clipboard
constructor(incarnation: Incarnation<T, GeoPosition>)
Builds a new OSMEnvironment without an actual backing map.
constructor(incarnation: Incarnation<T, GeoPosition>, file: String)
Builds a new OSMEnvironment, with nodes not forced on streets.
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, onStreets: Boolean)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, onStreets: Boolean, onlyOnStreets: Boolean)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, approximation: Int)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, approximation: Int, onStreets: Boolean, onlyOnStreets: Boolean)

Properties

Link copied to clipboard
The default value for approximating the positions comparison.
Link copied to clipboard
The default value for the discard of nodes too far from streets option.
Link copied to clipboard
The default value for the force nodes on streets option.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var simulation: Simulation<T, P>

Functions

Link copied to clipboard
open fun addGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
fun addLayer(m: Molecule, l: Layer<T, P>)
Link copied to clipboard
fun addNode(node: Node<T>, p: P): Boolean
Link copied to clipboard
fun addTerminator(terminator: Predicate<Environment<T, P>>)
Link copied to clipboard
open fun computeRoute(node: Node<T>, coord: GeoPosition): Route<GeoPosition>
open fun computeRoute(node: Node<T>, node2: Node<T>): Route<GeoPosition>
open fun computeRoute(node: Node<T>, coord: GeoPosition, options: GraphHopperOptions): Route<GeoPosition>
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem.
Link copied to clipboard
open fun enableBenchmark()
Link copied to clipboard
fun forEach(action: Consumer<in Node<T>>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getNodeByID(id: Int): Node<T>
Link copied to clipboard
Link copied to clipboard
fun getNodesWithinRange(center: Node<T>, range: Double): ListSet<Node<T>>
Link copied to clipboard
Link copied to clipboard
fun getPosition(node: Node<T>): P
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
open fun makePosition(coordinates: Array<Number>): GeoPosition
Link copied to clipboard
open fun moveNodeToPosition(node: Node<T>, newpos: P)
Link copied to clipboard
Link copied to clipboard
fun removeNode(node: Node<T>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun toString(): String