haifa.shopsim.lab
Class BatchRunner

java.lang.Object
  |
  +--haifa.shopsim.lab.BatchRunner

public class BatchRunner
extends java.lang.Object

This class is run from the command line. It runs job shops and serializes the ShopStatistics Objects into files. These files may later either be view with the RichStatReader class or appended in the mathematicaShopRun format to the some text file using the DataFileWriter class. Note that if the class is told to run with an outputfile named outToday, it will create the files outToday1, outToday2 etc. Each having a batch size of results. Be carefull when you use it.

Version:
1.2

Field Summary
(package private) static int batchSize
          The batch size.
(package private)  java.lang.String jbsFileName
          The file name of the jbs file.
(package private)  int numSamples
          The number of samples to be sampled on each size.
(package private)  java.lang.String outputFileName
          The current file that gets the output.
(package private)  RandomTimeMaker randomTimeMaker
           
(package private)  ShopAlgorithm shopAlgorithm
           
(package private)  ShopData shopData
           
(package private)  FastShopRun simulator
           
(package private)  ProblemSizeChooser sizeChooser
           
(package private)  int[] sizes
          The array of sizes that are to be sampled.
(package private)  RichStatisticsCollector statColl
           
(package private) static java.lang.String USAGE
          Defines the parameters that are to be given at the command line.
 
Constructor Summary
BatchRunner(ShopAlgorithm shopAlgorithm_, ShopData shopData_, RandomTimeMaker randomTimeMaker_, ProblemSizeChooser sizeChooser_, int numSamples_, int[] sizes_, java.lang.String jbsFileName_, java.lang.String outputFileName_)
          Creates new BatchRunner
 
Method Summary
static void doIdentical(java.lang.String[] args)
           
protected  void doIt()
           
static void doLarge(java.lang.String[] args)
          Reads parameters accroding to "-l" specification and runs batch runner.
static void doProp(java.lang.String[] args)
           
static void main(java.lang.String[] args)
          Usage is as seen in USAGE
private static ShopAlgorithm setAlgorithm(java.lang.String arg)
          Returns a shop algorithm based on the argument.
static RandomTimeMaker setRV(java.lang.String arg)
          Returns an RV object based on the argument.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

jbsFileName

java.lang.String jbsFileName
The file name of the jbs file. This is used by the RichShopStatistics.

outputFileName

java.lang.String outputFileName
The current file that gets the output.

simulator

FastShopRun simulator

shopAlgorithm

ShopAlgorithm shopAlgorithm

randomTimeMaker

RandomTimeMaker randomTimeMaker

sizeChooser

ProblemSizeChooser sizeChooser

shopData

ShopData shopData

statColl

RichStatisticsCollector statColl

numSamples

int numSamples
The number of samples to be sampled on each size.

sizes

int[] sizes
The array of sizes that are to be sampled.

batchSize

static int batchSize
The batch size.

USAGE

static final java.lang.String USAGE
Defines the parameters that are to be given at the command line.
Constructor Detail

BatchRunner

public BatchRunner(ShopAlgorithm shopAlgorithm_,
                   ShopData shopData_,
                   RandomTimeMaker randomTimeMaker_,
                   ProblemSizeChooser sizeChooser_,
                   int numSamples_,
                   int[] sizes_,
                   java.lang.String jbsFileName_,
                   java.lang.String outputFileName_)
            throws java.lang.Exception
Creates new BatchRunner
Method Detail

doIt

protected void doIt()
             throws java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Usage is as seen in USAGE

doIdentical

public static void doIdentical(java.lang.String[] args)
                        throws java.lang.Exception

doProp

public static void doProp(java.lang.String[] args)
                   throws java.lang.Exception

doLarge

public static void doLarge(java.lang.String[] args)
                    throws java.lang.Exception
Reads parameters accroding to "-l" specification and runs batch runner.

setAlgorithm

private static ShopAlgorithm setAlgorithm(java.lang.String arg)
Returns a shop algorithm based on the argument.

setRV

public static RandomTimeMaker setRV(java.lang.String arg)
Returns an RV object based on the argument.