Class RewardTwins

java.lang.Object
jline.examples.parity.RewardTwins

public final class RewardTwins extends Object
python/examples/advanced/rewardModel/: setReward and the SolverCTMC reward surface, getAvgReward and getTranReward.

WHAT A REWARD SEES. A RewardFunction is handed the AGGREGATE state row and the NetworkStruct, so state.at(node, class) of the reference is the at(jline.util.matrix.Matrix, jline.lang.NetworkStruct, jline.lang.nodes.Node, int) helper below: entry ist*K + r of the row, with ist the STATION index and not the node one -- a Source occupies a block of its own, which is why every reward here resolves the station through sn.nodeToStation rather than counting nodes.

THE Reward.* TEMPLATES ARE USED WHERE THE REFERENCE USES THEM. Reward.queueLength, Reward.utilization and Reward.blocking carry the same semantics as the Python factory methods -- utilization is min(jobs, nservers), blocking the indicator of the station sitting at its capacity -- so an example that names a template gets the template and only the genuinely custom rewards are written out.

The example is spelled two ways and both are registered here, as in the C++ twin. MATLAB, which names the corpus, calls it rewardModel_*; the Python twin's file stem is reward_model_*. There is NO symlink reconciling them -- an earlier version of this comment said there was. The mapping is data, in pythonScriptAliases of goldens/corpus.json, read by the parity suite and by doc/latex/exdoc.py.

  • Method Details

    • rewardModelMm1k

      public static void rewardModelMm1k()
      reward_model_mm1k.py: the four rewards of an M/M/1/K, in steady state and over a finite horizon, against the analytical law.
    • rewardModelTemplates

      public static void rewardModelTemplates()
      reward_model_templates.py: the three reward templates on an M/M/1/10.
    • rewardModelAggregation

      public static void rewardModelAggregation()
      reward_model_aggregation.py: the aggregation operations of a state view.
    • rewardModelMulticlass

      public static void rewardModelMulticlass()
      reward_model_multiclass.py: per-class rewards at a two-server PS station.