Package jasima.shopSim.prioRules.meta
Class AdaptiveLAThreshold
- java.lang.Object
-
- jasima.shopSim.core.PR
-
- jasima.shopSim.prioRules.meta.LookaheadThreshold
-
- jasima.shopSim.prioRules.meta.AdaptiveLAThreshold
-
- All Implemented Interfaces:
Serializable,Cloneable
public class AdaptiveLAThreshold extends LookaheadThreshold
This class implements a rule with a max waiting time threshold value specified relative to the minimum time it takes to process any job waiting in the queue. maxWaitRelative has to be in the range [0,1]. The maximal useful waiting time actually is even a little smaller than 1: if a job arrives in say 10 time units, but to process the shortest job in queue also takes 10 time units, it could be finished exactly when the lookahead job arrives.This class does not take setup times into account.
- Author:
- Torsten Hildebrandt
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AdaptiveLAThreshold(double maxWaitRelative)AdaptiveLAThreshold(PR baseRule)AdaptiveLAThreshold(PR baseRule, double maxWaitRelative)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanarrivesTooLate(PrioRuleTarget prt)voidbeforeCalc(PriorityQueue<?> q)This method is called by a queue before evaluating it's elements.doublegetMaxWaitRelative()StringgetName()doublemaxProcTimeWaiting(PriorityQueue<?> q)voidsetMaxWaitRelative(double maxWaitRelative)-
Methods inherited from class jasima.shopSim.prioRules.meta.LookaheadThreshold
arrivesTooLate, calcPrio
-
Methods inherited from class jasima.shopSim.core.PR
clone, 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.
-
arrivesTooLate
public boolean arrivesTooLate(PrioRuleTarget prt)
- Specified by:
arrivesTooLatein classLookaheadThreshold
-
maxProcTimeWaiting
public double maxProcTimeWaiting(PriorityQueue<?> q)
-
getMaxWaitRelative
public double getMaxWaitRelative()
-
setMaxWaitRelative
public void setMaxWaitRelative(double maxWaitRelative)
-
-