Class GraphWalk

java.lang.Object
casa.lepton.walk.GraphWalk
All Implemented Interfaces:
Walk
Direct Known Subclasses:
DynGraphWalk, LimitedAreaGraphWalk, TractorWalk

public class GraphWalk extends Object implements Walk
An instance of type GraphWalk defines a mobility model for a random walk that follows edges in a geo-referenced graph.
  • Field Details

    • area

      public casa.util.geom.AreaCar area
    • minWait

      public long minWait
    • maxWait

      public long maxWait
    • minSpeed

      public double minSpeed
    • maxSpeed

      public double maxSpeed
    • pauseType

      public String pauseType
    • graph

      public org.graphstream.graph.Graph graph
    • random

      public Random random
    • walk_

      protected static GraphWalk walk_
  • Constructor Details

    • GraphWalk

      public GraphWalk(casa.util.geom.AreaCar area, long minWait, long maxWait, double minSpeed, double maxSpeed, org.graphstream.graph.Graph graph, String pauseType, Random random)
  • Method Details

    • getDefault

      public static GraphWalk getDefault(OppNodeProperties props)
      Creates and returns an instance of GraphWalk, using system properties (if defined) in order to initialize this object, and using default values otherwise.
      Returns:
      a GraphWalk object, initialized using either system properties or default values
    • readGraph

      protected static org.graphstream.graph.Graph readGraph(String fname)
    • getWalker

      public Walker getWalker(long time, String nodeId)
      Description copied from interface: Walk
      Returns a new Walker that will move according to the mobility model implemented in this instance of Walk.
      Specified by:
      getWalker in interface Walk
      Parameters:
      time - the time of creation of this walker
      Returns:
      a new Walker, whose mobility starts at the specified time
    • getShortestPath

      public org.graphstream.graph.Path getShortestPath(String departureNode, String targetNode)
    • putShape

      public void putShape(String id, casa.util.geom.Shape shape)
    • getShape

      public casa.util.geom.Shape getShape(String id)
    • getArea

      public casa.util.geom.AreaCar getArea()
      Description copied from interface: Walk
      Returns the area in which this walk is defined.
      Specified by:
      getArea in interface Walk
      Returns:
      the AreaCar in which this walk is defined