haifa.shopsim
Interface ShopAlgorithm

All Known Subinterfaces:
GUIAlgorithm
All Known Implementing Classes:
AbstractAlgorithm

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), a ShopSimulation object and a log into which it writes infomration regarding it's processing.

Version:
1.1

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.
 void reset()
          Resets the algorithm.
 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 setShopSimulationObject(ShopSimulation shopSimulation)
          Set the algorithm's shop simulation object.
 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 what the machine should do.
 

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 what the machine should do.


reset

public void reset()
Resets the algorithm. This method may have various meaninings depending on the algorithm implemented. It must be called by the user of the algorithm, prior to every run. This user is the shop simulation object. The method must be called as late as possible (that is after all refrences have been set.)

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.

setShopSimulationObject

public void setShopSimulationObject(ShopSimulation shopSimulation)
Set the algorithm's shop simulation object. The algorithm may interact with a shop simulation object by giving it askAgainAtCurrentTime(machine number) signals.

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.