haifa.shopsim.algorithms
Class BufferPriorityAlgorithm

java.lang.Object
  |
  +--haifa.shopsim.algorithms.AbstractAlgorithm
        |
        +--haifa.shopsim.algorithms.BufferPriorityAlgorithm
All Implemented Interfaces:
ShopAlgorithm
Direct Known Subclasses:
FBFSPriorityAlgorithm, LBFSPriorityAlgorithm

public abstract class BufferPriorityAlgorithm
extends AbstractAlgorithm

An abstract class with one important method: setPriority(Map map,List ops); When this method is implemented by a dervied class it defines the priority dispatching rule.


Field Summary
protected static java.lang.String EXPLANATION
           
(package private)  java.util.Map[] priorityMaps
          An array of priority maps, one for each machine.
 
Fields inherited from class haifa.shopsim.algorithms.AbstractAlgorithm
log, shopData, shopSimulation, shopState
 
Constructor Summary
BufferPriorityAlgorithm()
           
BufferPriorityAlgorithm(ShopData shopData_)
           
BufferPriorityAlgorithm(ShopData shopData_, ShopState shopState_)
           
BufferPriorityAlgorithm(ShopData shopData_, ShopState shopState_, java.io.PrintWriter log_)
           
 
Method Summary
 java.lang.String explanationString()
          Returns a string telling a little bit about what the algorithm does.
 boolean isDeterministic()
          Returns true if the algorithm is determinsitic.
protected abstract  void setPriority(java.util.Map map, java.util.List ops)
          Gets an empty map that is to be filled with priorites.
 void setShopData(ShopData shopData_)
          Set the algorithm's shopData object, this is a reference for the general topology of the job shop and for processing times.
 ShopCommand whatNow(int machineNumber)
          Very simply reads a command from console and returns a ShopCommmand object.
 
Methods inherited from class haifa.shopsim.algorithms.AbstractAlgorithm
quitCalled, reset, setEnabled, setLog, setShopSimulationObject, setShopStateObject, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface haifa.shopsim.ShopAlgorithm
getAlgorithmName
 

Field Detail

EXPLANATION

protected static final java.lang.String EXPLANATION

priorityMaps

java.util.Map[] priorityMaps
An array of priority maps, one for each machine. The keys in the maps are operation objects and the values are priorities. A high priorty is a low number.Priorities start at one.
Constructor Detail

BufferPriorityAlgorithm

public BufferPriorityAlgorithm()

BufferPriorityAlgorithm

public BufferPriorityAlgorithm(ShopData shopData_,
                               ShopState shopState_,
                               java.io.PrintWriter log_)

BufferPriorityAlgorithm

public BufferPriorityAlgorithm(ShopData shopData_,
                               ShopState shopState_)

BufferPriorityAlgorithm

public BufferPriorityAlgorithm(ShopData shopData_)
Method Detail

setShopData

public void setShopData(ShopData shopData_)
Description copied from interface: ShopAlgorithm
Set the algorithm's shopData object, this is a reference for the general topology of the job shop and for processing times.
Overrides:
setShopData in class AbstractAlgorithm

setPriority

protected abstract void setPriority(java.util.Map map,
                                    java.util.List ops)
Gets an empty map that is to be filled with priorites. And gets a list of operations of all of the operations on a machine. Should set a unique priority for each operation.

whatNow

public ShopCommand whatNow(int machineNumber)
Very simply reads a command from console and returns a ShopCommmand object.

explanationString

public java.lang.String explanationString()
Description copied from interface: ShopAlgorithm
Returns a string telling a little bit about what the algorithm does.
Overrides:
explanationString in class AbstractAlgorithm

isDeterministic

public boolean isDeterministic()
Description copied from interface: ShopAlgorithm
Returns true if the algorithm is determinsitic.