Class AbstractRG2DMover

    • Method Detail

      • isStartRandomlyOption

        public final boolean isStartRandomlyOption()
        Returns:
        true if initialized with random trip
      • setStartRandomlyOption

        public final void setStartRandomlyOption​(boolean startRandomlyFlag)
        Parameters:
        startRandomlyFlag - true means initialize with random trip
      • moveToCenterOfCell

        public void moveToCenterOfCell​(RectangularCell2D cell)
        Move to the center of the cell
        Parameters:
        cell - the cell
      • moveToInsideCellRandomly

        public void moveToInsideCellRandomly​(RectangularCell2D cell)
        Moves to a random location within the specified cell
        Parameters:
        cell - the cell to move in
      • setInitialPositionRandomly

        public void setInitialPositionRandomly()
        Randomly set the initial position using the getRandomCoordinate()
      • getRandomCoordinate

        public CoordinateIfc getRandomCoordinate()
        Randomly generates a coordinate using the RectangularGridModel
        Returns:
        the coordinate
      • getGridModel

        public final RectangularGridModel getGridModel()
        Returns:
        the RectangularGridSpatialModel2D
      • getCurrentCell

        public final RectangularCell2D getCurrentCell()
        Returns:
        the current cell of the mover
      • selectNeighborRandomly

        public RectangularCell2D selectNeighborRandomly()
        Does not include the core cell in the neighborhood
        Returns:
        a randomly selected cell using the cell selector
      • getRectagularGrid

        public final RectangularGridSpatialModel2D getRectagularGrid()
        Returns:
        the RectanularGridSpatialModel2D that contains the mover
      • getNeighborhoodList

        protected java.util.List<RectangularCell2D> getNeighborhoodList()
        A list of the Moore neighborhood for this mover. The core cell is not included in the list
        Returns: