Package jline.api.rl

Class RlEnvGeneral

java.lang.Object
jline.api.rl.RlEnvGeneral

public class RlEnvGeneral extends Object
General RL environment for queueing network control decisions.
  • Field Details

    • model

      public final Network model
    • idxOfQueueInNodes

      public final int[] idxOfQueueInNodes
    • idxOfActionNodes

      public final int[] idxOfActionNodes
    • stateSize

      public final int stateSize
    • gamma

      public final double gamma
    • nqueues

      public final int nqueues
      Number of queues in the network.
    • actionSpace

      public final HashMap<Integer,int[]> actionSpace
      Action space map: for each action node index, stores the array of downstream node indices reachable from that node.
  • Constructor Details

    • RlEnvGeneral

      public RlEnvGeneral(Network model, int[] idxOfQueueInNodes, int[] idxOfActionNodes, int stateSize, double gamma)
  • Method Details

    • getModel

      public Network getModel()
    • getIdxOfQueueInNodes

      public int[] getIdxOfQueueInNodes()
    • getIdxOfActionNodes

      public int[] getIdxOfActionNodes()
    • getStateSize

      public int getStateSize()
    • getGamma

      public double getGamma()
    • getNqueues

      public int getNqueues()
    • getActionSpace

      public HashMap<Integer,int[]> getActionSpace()
    • isInStateSpace

      public boolean isInStateSpace(int[] state)
      Checks if the given state vector is within the defined state space.
    • isInActionSpace

      public boolean isInActionSpace(int[] state)
      Checks if actions can be taken from the given state.
    • sample

      public GeneralSampleEvent sample()
      Samples the next event from the environment using the SSA solver.
    • update

      public void update(Ret.SampleResult sampleResult)
      Updates the model state after an event using the SSA sample result.
    • reset

      public void reset()
      Resets the environment to its initial state.