Package jasima.shopSim.prioRules.basic
Class RND
- java.lang.Object
-
- jasima.shopSim.core.PR
-
- jasima.shopSim.prioRules.basic.RND
-
- All Implemented Interfaces:
Serializable,Cloneable
public class RND extends PR
Implements the random rule, i.e., each waiting job has an equal chance of being selected.- Author:
- Torsten Hildebrandt
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RND()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeCalc(PriorityQueue<?> q)This method is called by a queue before evaluating it's elements.doublecalcPrio(PrioRuleTarget entry)Returns the priority value ofentry.PRclone()longgetSeedModify()voidsetSeedModify(long seedModify)Allows to modify the random number stream used.-
Methods inherited from class jasima.shopSim.core.PR
arrivesTooLate, getName, getOwner, getTieBreaker, init, keepIdle, primaryRule, setFinalTieBreaker, setOwner, setTieBreaker, toString
-
-
-
-
Method Detail
-
beforeCalc
public void beforeCalc(PriorityQueue<?> q)
Description copied from class:PRThis method is called by a queue before evaluating it's elements. Use it to do some initialization prior to calcPrio().- Overrides:
beforeCalcin classPR- Parameters:
q- The current queue.
-
calcPrio
public double calcPrio(PrioRuleTarget entry)
Description copied from class:PRReturns the priority value ofentry. This method has to be overwritten by a priority rule.
-
getSeedModify
public long getSeedModify()
-
setSeedModify
public void setSeedModify(long seedModify)
Allows to modify the random number stream used. This allows to switch to a different seed independently from the base seed used for an experiment. Therefore this attribute allows to test different random decisions for a single base seed, which can be useful if the base seed determines a certain scenario and the aim is to quantify the performance of RND for exactly this scenario by averaging over many random decisions.
-
-