Class GraphWalker

java.lang.Object
casa.lepton.walk.GraphWalker
All Implemented Interfaces:
Walker
Direct Known Subclasses:
DynGraphWalker, LimitedAreaGraphWalker, TractorWalker

public class GraphWalker extends Object implements Walker
The mobility of a mobile element that moves along an underlying graph.
  • Field Details

    • walk_

      protected GraphWalk walk_
    • pauseType

      public String pauseType
    • step_

      protected Step step_
    • speed_

      protected double speed_
    • departureNode_

      protected org.graphstream.graph.Node departureNode_
    • arrivalNode_

      protected org.graphstream.graph.Node arrivalNode_
    • path_

      protected List<org.graphstream.graph.Node> path_
  • Constructor Details

    • GraphWalker

      protected GraphWalker()
    • GraphWalker

      public GraphWalker(GraphWalk walk, long time, String pauseType)
  • Method Details

    • getWalk

      public Walk getWalk()
      Description copied from interface: Walker
      Returns an Walk object that defines the mobility model of this Walker.
      Specified by:
      getWalk in interface Walker
      Returns:
      the kind of Walk of this Walker.
    • getStep

      public Step getStep()
      Description copied from interface: Walker
      Returns a Step object that defines the current step of this Walker.
      Specified by:
      getStep in interface Walker
      Returns:
      the current Step of this Walker.
    • getCoord

      protected casa.util.geom.CoordCar getCoord(org.graphstream.graph.Node node)
    • getShape

      protected casa.util.geom.Shape getShape(String id, String area)
    • getCoordAround

      protected casa.util.geom.CoordCar getCoordAround(org.graphstream.graph.Node node)
    • getUniformValue

      protected double getUniformValue(double min, double max)
    • getPosition

      public casa.util.geom.CoordCar getPosition(long time)
      Description copied from interface: Walker
      Returns a CoordCar object that defines the position of this Walker at the specified time.
      Specified by:
      getPosition in interface Walker
      Parameters:
      time - the time for which the position is requested
      Returns:
      the position of this Walker at the specified time
    • selectNode

      protected org.graphstream.graph.Node selectNode(String pauseType)
    • computeNextPath

      public void computeNextPath(long time)
    • getStep

      protected Step getStep(long time, org.graphstream.graph.Node depNode, org.graphstream.graph.Node arrNode, boolean endOfPath)
    • nextStep2

      public Step nextStep2(long time)
    • nextStep

      public Step nextStep(long time)
    • nextStep

      public Step nextStep()
      Description copied from interface: Walker
      Returns a Step object that defines the next step of this Walker.
      Specified by:
      nextStep in interface Walker
      Returns:
      the next Step of this Walker.