haifa.shopsim.fastkernel
Class ThreadFastShopRun

java.lang.Object
  |
  +--haifa.shopsim.fastkernel.FastShopRun
        |
        +--haifa.shopsim.fastkernel.ThreadFastShopRun
All Implemented Interfaces:
java.lang.Runnable, ShopSimulation, ShopState

public class ThreadFastShopRun
extends FastShopRun
implements java.lang.Runnable

Implements a FastShopRun on it's own thread. This is usefull for working with GUI.

Version:
1.1

Inner classes inherited from class haifa.shopsim.fastkernel.FastShopRun
FastShopRun.Buffer, FastShopRun.Machine
 
Field Summary
(package private)  int counter
           
private  java.lang.Thread t
          The thread.
 
Fields inherited from class haifa.shopsim.fastkernel.FastShopRun
eventQ, expectedLowerBound, finishedJobs, firstBuffers, lastRestUpdateTime, listeners, log, machines, numBusyMachines, numSetJobs, postRunAction, problemSizeChooser, PROGRESS_STEP, Qmap, QPlusMap, randomTimeMaker, restingMap, shopAlgorithm, shopData, startTimeMillis, time, totalFinishedJobs
 
Fields inherited from interface haifa.shopsim.ShopSimulation
MAX_SIM_TIME
 
Constructor Summary
ThreadFastShopRun(ShopAlgorithm shopAlgorithm_, ShopData shopData_)
          Creates a new FastShopRun, setting the log to stdout.
ThreadFastShopRun(ShopAlgorithm shopAlgorithm_, ShopData shopData_, PostRunAction postRunAction_, java.io.PrintWriter log_)
          Creates new FastShopRun.
 
Method Summary
 void go()
          Start the simulation.
 void kill()
           
protected  void notifyListeners(ShopChangeEvent sce)
          Iterate over all of the listeners and send the the ShopChangeEvent.
 void run()
           
 
Methods inherited from class haifa.shopsim.fastkernel.FastShopRun
addShopChangeListener, askAgainAtCurrentTime, buildShop, getBusyMachines, getExpectedMachineLowerBound, getExpectedProcessingTime, getExpectedProcessingTimes, getFreeMachines, getInitialNr, getMachineActivities, getNumFinishedJobs, getQMap, getQPlusMap, getSchedulableOperations, getSchedulableOperations, getTime, getTotalFinishedJobs, isMachineDone, isMachineStarved, performSchedulingCommand, setProblemSizeChooser, setRandomTimeMaker, setUp, toRichString, toString, updateMachines
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

t

private java.lang.Thread t
The thread.

counter

int counter
Constructor Detail

ThreadFastShopRun

public ThreadFastShopRun(ShopAlgorithm shopAlgorithm_,
                         ShopData shopData_,
                         PostRunAction postRunAction_,
                         java.io.PrintWriter log_)
Creates new FastShopRun.

ThreadFastShopRun

public ThreadFastShopRun(ShopAlgorithm shopAlgorithm_,
                         ShopData shopData_)
Creates a new FastShopRun, setting the log to stdout.
Method Detail

go

public void go()
Description copied from class: FastShopRun
Start the simulation.
Overrides:
go in class FastShopRun

kill

public void kill()

run

public void run()
Specified by:
run in interface java.lang.Runnable

notifyListeners

protected void notifyListeners(ShopChangeEvent sce)
Iterate over all of the listeners and send the the ShopChangeEvent.
Overrides:
notifyListeners in class FastShopRun