Package jline.api.rl
Class RlEnvGeneral
java.lang.Object
jline.api.rl.RlEnvGeneral
General RL environment for queueing network control decisions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAction space map: for each action node index, stores the array of downstream node indices reachable from that node.final doublefinal int[]final int[]final Networkfinal intNumber of queues in the network.final int -
Constructor Summary
ConstructorsConstructorDescriptionRlEnvGeneral(Network model, int[] idxOfQueueInNodes, int[] idxOfActionNodes, int stateSize, double gamma) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetGamma()int[]int[]getModel()intintbooleanisInActionSpace(int[] state) Checks if actions can be taken from the given state.booleanisInStateSpace(int[] state) Checks if the given state vector is within the defined state space.voidreset()Resets the environment to its initial state.sample()Samples the next event from the environment using the SSA solver.voidupdate(Ret.SampleResult sampleResult) Updates the model state after an event using the SSA sample result.
-
Field Details
-
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 nqueuesNumber of queues in the network. -
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
-
getIdxOfQueueInNodes
public int[] getIdxOfQueueInNodes() -
getIdxOfActionNodes
public int[] getIdxOfActionNodes() -
getStateSize
public int getStateSize() -
getGamma
public double getGamma() -
getNqueues
public int getNqueues() -
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
Samples the next event from the environment using the SSA solver. -
update
Updates the model state after an event using the SSA sample result. -
reset
public void reset()Resets the environment to its initial state.
-