Class AbstractEnvironment

    • Field Detail

      • currentWorld

        protected int currentWorld
      • timestamp

        protected int timestamp
    • Constructor Detail

      • AbstractEnvironment

        protected AbstractEnvironment()
    • Method Detail

      • getWorldIndex

        public final int getWorldIndex()
        Description copied from interface: IEnvironment
        Returns the world number.
        Specified by:
        getWorldIndex in interface IEnvironment
        Returns:
        current world index
      • getTimeStamp

        public final int getTimeStamp()
        Description copied from interface: IEnvironment
        Return the current time stamp. It differs from world index since it never decrements.
        Specified by:
        getTimeStamp in interface IEnvironment
        Returns:
        the timestamp
      • makeBitSet

        public IStateBitSet makeBitSet​(int size)
        Factory pattern: new IStateBitSet objects are created by the environment
        Specified by:
        makeBitSet in interface IEnvironment
        Parameters:
        size - initial size of the IStateBitSet
        Returns:
        IStateBitSet
      • worldPopUntil

        public void worldPopUntil​(int w)
        Backtracks to the w previous choice point in the tree search
        Specified by:
        worldPopUntil in interface IEnvironment
        Parameters:
        w - world index to pop to
      • fakeHistoryNeeded

        public boolean fakeHistoryNeeded()
        Specified by:
        fakeHistoryNeeded in interface IEnvironment
        Returns:
        true if building fake history is needed (the condition is satisfied).
      • buildFakeHistoryOn

        public void buildFakeHistoryOn​(ICondition condition)
        Description copied from interface: IEnvironment
        Force to build fake history when a stored object on a particular condition. The default condition is ICondition.FALSE.
        Specified by:
        buildFakeHistoryOn in interface IEnvironment
        Parameters:
        condition - to satisfy to build fake history