haifa.shopsim
Interface ShopAlgorithm

All Known Implementing Classes:
GUIforComputerAlgorithm, GUIAlgorithm, SimpleRandomAlgorithm, CyclicAlgorithm

public interface ShopAlgorithm

A ShopAlgorithm (GFA,CFA,manual etc...) has associations to a ShopState object (An object representing the current state of the shop), a ShopData object (the shop topology and jobs processing times), and a log into which it writes infomration regarding it's processing.

It is recommended that the constructors will not be heavy.


Method Summary
 java.lang.String explanationString()
          Returns a string telling a little bit about what the algorithm does.
 java.lang.String getAlgorithmName()
          Returns a name of the algorithm.
 boolean isDeterministic()
          Returns true if the algorithm is determinsitic.
 boolean quitCalled()
          Returns true when the algorithm decided that it is time to quit.
 void setLog(java.io.PrintWriter log)
          The algorithm writes decision information to the log.
 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.
 void setShopStateObject(ShopState shopState)
          Set the algorithm's ShopState object.
 ShopCommand whatNow(int machineNumber)
          Returns a ShopCommand class which has the directions on the next immidiate action to do for the specific machine. This method looks at the shop state objects and decides.
 

Method Detail

whatNow

public ShopCommand whatNow(int machineNumber)
Returns a ShopCommand class which has the directions on the next immidiate action to do for the specific machine.

This method looks at the shop state objects and decides.


quitCalled

public boolean quitCalled()
Returns true when the algorithm decided that it is time to quit.

setShopStateObject

public void setShopStateObject(ShopState shopState)
Set the algorithm's ShopState object. The algorithm looks at this Object and makes decisions based on it whenever the whatNow message is called.

setShopData

public 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.

setLog

public void setLog(java.io.PrintWriter log)
The algorithm writes decision information to the log.

explanationString

public java.lang.String explanationString()
Returns a string telling a little bit about what the algorithm does.

isDeterministic

public boolean isDeterministic()
Returns true if the algorithm is determinsitic.

getAlgorithmName

public java.lang.String getAlgorithmName()
Returns a name of the algorithm.