Package jline.lang
Class OutputStrategy
java.lang.Object
jline.lang.OutputStrategy
- All Implemented Interfaces:
Serializable
Class modelling the output section of a Node
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic List<RoutingStrategy> Routing strategies an OutputStrategy may carry. -
Constructor Summary
ConstructorsConstructorDescriptionOutputStrategy(JobClass jobClass, RoutingStrategy routingStrategy) OutputStrategy(JobClass jobClass, RoutingStrategy routingStrategy, Node destination, double probability) -
Method Summary
Modifier and TypeMethodDescriptionintdoubleint[]Returns the node indices that consult the RL value function.intReturns the RL state-size hint.Returns the RL value function, or null when RL routing is not configured.int[]Returns the per-axis shape of the tabular RL value function.booleanvoidsetDestination(Node destination) voidsetKchoicesK(int k) voidsetKchoicesWithMemory(boolean withMemory) voidsetProbability(double probability) voidsetRlParams(Matrix valueFunction, int[] vfShape, int[] nodesNeedAction, int stateSize) Stores the RL routing parameters on this strategy.voidsetRoutingStrategy(RoutingStrategy routingStrategy)
-
Field Details
-
legalStrategies
Routing strategies an OutputStrategy may carry. RL belongs here: it is a state-dependent routing strategy on the same footing as JSQ and KCHOICES (see Network.refreshRouting, Network.sub_rl, SnHasSDRouting and the RoutingStrategy_RL feature), and Node.setRLRouting installs it through this class. Omitting it made setRLRouting throw, so RL routing could not be configured at all. FIRING is excluded: a Transition's outgoing arcs are described by its firing outcomes, not by an output strategy.
-
-
Constructor Details
-
OutputStrategy
public OutputStrategy(JobClass jobClass, RoutingStrategy routingStrategy, Node destination, double probability) -
OutputStrategy
-
-
Method Details
-
getDestination
-
setDestination
-
getJobClass
-
getProbability
public double getProbability() -
setProbability
public void setProbability(double probability) -
getRoutingStrategy
-
setRoutingStrategy
-
getKchoicesK
public int getKchoicesK() -
setKchoicesK
public void setKchoicesK(int k) -
isKchoicesWithMemory
public boolean isKchoicesWithMemory() -
getRlValueFunction
Returns the RL value function, or null when RL routing is not configured.- Returns:
- the value function
-
getRlValueFunctionShape
public int[] getRlValueFunctionShape()Returns the per-axis shape of the tabular RL value function.- Returns:
- the shape, or null when not configured
-
getRlNodesNeedAction
public int[] getRlNodesNeedAction()Returns the node indices that consult the RL value function.- Returns:
- the node indices, or null when not configured
-
getRlStateSize
public int getRlStateSize()Returns the RL state-size hint.- Returns:
- 0 for tabular, >0 for linear approximation, <0 for JSQ fallback
-
setRlParams
Stores the RL routing parameters on this strategy.- Parameters:
valueFunction- the value functionvfShape- per-axis sizes of the tabular value functionnodesNeedAction- node indices that consult the value functionstateSize- 0 = tabular, >0 = linear approximation, <0 = JSQ fallback
-
setKchoicesWithMemory
public void setKchoicesWithMemory(boolean withMemory)
-