Class InfiniteHalls

  • All Implemented Interfaces:
    it.unibo.alchemist.model.Environment , it.unibo.alchemist.model.EuclideanEnvironment , it.unibo.alchemist.model.environments.Euclidean2DEnvironment , it.unibo.alchemist.model.physics.PhysicsEnvironment , it.unibo.alchemist.model.physics.environments.Physics2DEnvironment , java.io.Serializable , java.lang.Iterable

    
    public final class InfiniteHalls<T>
    extends LimitedContinuos2D<T>
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      double getEx()
      double getCi()
      double getCf()
      double getSi()
      double getSf()
      double getHallSize()
      boolean allowed(double xp, double yp) Checks whether a position is allowed or not.
      boolean isDoorsOpen()
      void setDoorsOpen(boolean isOpen)
      • Methods inherited from class it.unibo.alchemist.model.physics.environments.ContinuousPhysics2DEnvironment

        farthestPositionReachable, getHeading, getNodesWithin, getShape, getShapeFactory, makePosition, moveNodeToPosition, setHeading
      • Methods inherited from class it.unibo.alchemist.model.environments.AbstractEnvironment

        addGlobalReaction, addLayer, addNode, addTerminator, forEach, getDistanceBetweenNodes, getGlobalReactions, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, iterator, removeGlobalReaction, removeNode, setLinkingRule, setSimulation, spliterator, toString
      • Methods inherited from class it.unibo.alchemist.model.physics.environments.LimitedContinuos2D

        moveNodeToPosition
      • Methods inherited from class it.unibo.alchemist.model.environments.Abstract2DEnvironment

        getDimensions, getOffset, getSize, moveNodeToPosition
      • Methods inherited from class it.unibo.alchemist.model.environments.Euclidean2DEnvironment

        getOrigin, makePosition
      • Methods inherited from class it.unibo.alchemist.model.Environment

        makePosition
      • Methods inherited from class java.lang.Iterable

        iterator, spliterator
      • Methods inherited from class it.unibo.alchemist.model.EuclideanEnvironment

        getOrigin, moveNode
      • Methods inherited from class it.unibo.alchemist.model.physics.PhysicsEnvironment

        farthestPositionReachable, getHeading, getShape, getShapeFactory
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, double size)
        Parameters:
        incarnation - the incarnation to be used.
        size - the size of a single hall
      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, boolean allOpen)
        Parameters:
        incarnation - the incarnation to be used.
        allOpen - sets all the doors to open.
      • InfiniteHalls

        InfiniteHalls(Incarnation<T, Euclidean2DPosition> incarnation, double size, boolean allOpen)
        Parameters:
        incarnation - the incarnation to be used.
        size - the size of a single hall
        allOpen - sets all the doors to open.
    • Method Detail

      • getEx

         double getEx()
        Returns:

        external border margin

      • getCi

         double getCi()
        Returns:

        Central corridor initial margin

      • getCf

         double getCf()
        Returns:

        Central corridor initial margin

      • getSi

         double getSi()
        Returns:

        Other corridor initial margin

      • getSf

         double getSf()
        Returns:

        Other corridor initial margin

      • getHallSize

         double getHallSize()
        Returns:

        the hall size

      • allowed

         boolean allowed(double xp, double yp)

        Checks whether a position is allowed or not.

        Parameters:
        xp - the x coordinate
        yp - the y coordinate
        Returns:

        true if the position is allowed

      • isDoorsOpen

         boolean isDoorsOpen()
        Returns:

        true if the room has 4 open accesses, false otherwise

      • setDoorsOpen

         void setDoorsOpen(boolean isOpen)
        Parameters:
        isOpen - must be true if the user wants all the four exits of the room to be open.