Interface MapEnvironment
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.BenchmarkableEnvironment
,it.unibo.alchemist.model.Environment
,java.io.Serializable
,java.lang.Iterable
public interface MapEnvironment<T, O extends RoutingServiceOptions<O>, S extends RoutingService<GeoPosition, O>> implements BenchmarkableEnvironment<T, P>
-
-
Method Summary
Modifier and Type Method Description abstract Route<GeoPosition>
computeRoute(Node<T> node, Node<T> node2)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. abstract Route<GeoPosition>
computeRoute(Node<T> node, GeoPosition coord)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. abstract Route<GeoPosition>
computeRoute(Node<T> node, GeoPosition coord, O options)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. abstract Route<GeoPosition>
computeRoute(GeoPosition p1, GeoPosition p2)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. abstract Route<GeoPosition>
computeRoute(GeoPosition from, GeoPosition to, O options)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. abstract S
getRoutingService()
-
Methods inherited from class it.unibo.alchemist.model.BenchmarkableEnvironment
enableBenchmark, getBenchmarkResult
-
Methods inherited from class it.unibo.alchemist.model.Environment
addGlobalReaction, addLayer, addNode, addTerminator, getDimensions, getDistanceBetweenNodes, getGlobalReactions, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getOffset, getPosition, getSimulation, getSize, getSizeInDistanceUnits, isTerminated, makePosition, moveNodeToPosition, removeGlobalReaction, removeNode, setLinkingRule, setSimulation
-
Methods inherited from class java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
computeRoute
abstract Route<GeoPosition> computeRoute(Node<T> node, Node<T> node2)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. It's up to the specific it.unibo.alchemist.model.Action calling this method to effectively move nodes along the path. It uses the fastest path as metric.
- Parameters:
node
- The start nodenode2
- the second node's position will be used as destination- Returns:
A Route object describing the path the node should follow
-
computeRoute
abstract Route<GeoPosition> computeRoute(Node<T> node, GeoPosition coord)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. It's up to the specific it.unibo.alchemist.model.Action calling this method to effectively move nodes along the path.
-
computeRoute
abstract Route<GeoPosition> computeRoute(Node<T> node, GeoPosition coord, O options)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. It's up to the specific it.unibo.alchemist.model.Action calling this method to effectively move nodes along the path.
-
computeRoute
abstract Route<GeoPosition> computeRoute(GeoPosition p1, GeoPosition p2)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. It's up to the specific it.unibo.alchemist.model.Action calling this method to effectively move nodes along the path.
- Parameters:
p1
- start positionp2
- end position The absolute coordinate where this node wants to move to- Returns:
A Route object describing the path the node should follow
-
computeRoute
abstract Route<GeoPosition> computeRoute(GeoPosition from, GeoPosition to, O options)
This method relies on the map data, and computes a route towards some absolute coordinate solving a TSP problem. It's up to the specific it.unibo.alchemist.model.Action calling this method to effectively move nodes along the path.
- Parameters:
from
- start positionto
- end position The absolute coordinate where this node wants to move tooptions
- options to use.- Returns:
A Route object describing the path the node should follow
-
getRoutingService
abstract S getRoutingService()
- Returns:
the RoutingService for this environment
-
-
-
-