haifa.shopsim
Interface ShopSimulation

All Known Implementing Classes:
FastShopRun

public interface ShopSimulation

This is an interface for a Job Shop Simulation Scheme.

Version:
1.1

Field Summary
static double MAX_SIM_TIME
          A simualation may not run past this time.
 
Method Summary
 void addShopChangeListener(ShopChangeListener scl)
          Registers an additional listener with the shop simulation that is notified everytime the job shop changes.
 boolean askAgainAtCurrentTime(int machineNumber_)
          Instructs the shop simulation to ask the algorithm for another ShopCommand for the specific machine number at the current simulation time.
 void go()
          Starts the job shop simulation.
 void setProblemSizeChooser(ProblemSizeChooser problemSizeChooser_)
          Set the ProblemSizeChooser.
 void setRandomTimeMaker(RandomTimeMaker randomTimeMaker_)
          Set the randomTimeMaker.
 

Field Detail

MAX_SIM_TIME

public static final double MAX_SIM_TIME
A simualation may not run past this time.
Method Detail

addShopChangeListener

public void addShopChangeListener(ShopChangeListener scl)
Registers an additional listener with the shop simulation that is notified everytime the job shop changes.

go

public void go()
Starts the job shop simulation.

setProblemSizeChooser

public void setProblemSizeChooser(ProblemSizeChooser problemSizeChooser_)
Set the ProblemSizeChooser.

setRandomTimeMaker

public void setRandomTimeMaker(RandomTimeMaker randomTimeMaker_)
Set the randomTimeMaker.

askAgainAtCurrentTime

public boolean askAgainAtCurrentTime(int machineNumber_)
Instructs the shop simulation to ask the algorithm for another ShopCommand for the specific machine number at the current simulation time. This is needed when the algorithm has issued a rest command for the machine and when called again at the current time, it decides that it would like the machine not to rest. Note that the shop simulation object will do the asking again only at cases where the machine is scheduled as restiong.

If the machine is not scheduled as resting at the current time, then the shop simulation will not ask the algorithm and will return a false value (other wise, it returns a true value).