haifa.shopsim.lab
Class AbstractProblemSizeChooser

java.lang.Object
  |
  +--haifa.shopsim.lab.AbstractProblemSizeChooser
All Implemented Interfaces:
ProblemSizeChooser
Direct Known Subclasses:
DefaultProblemSizeChooser, GeneralProblemSizeChooser, ProportionalProblemSizeChooser, WeissPropSizeChooser

public abstract class AbstractProblemSizeChooser
extends java.lang.Object
implements ProblemSizeChooser

Maintains references to the shop data and the Nr[] array. To be derived to working problem size choosers.

Version:
0.6

Field Summary
protected  int[] Nr
          The array of number of jobs on each route
protected  ShopData shopData
          A reference to the shop Data object.
 
Constructor Summary
  AbstractProblemSizeChooser()
          Creates new AbstractProblemSizeChooser
protected AbstractProblemSizeChooser(ShopData shopData_)
           
 
Method Summary
 int getN()
          Sums the values of Nr[] and returns the sum.
 int[] getNr()
          Returns an array, spcifing how many jobs are to be in each route.
 void setData(ShopData shopData_)
          Set the shop data object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

Nr

protected int[] Nr
The array of number of jobs on each route

shopData

protected ShopData shopData
A reference to the shop Data object.
Constructor Detail

AbstractProblemSizeChooser

protected AbstractProblemSizeChooser(ShopData shopData_)

AbstractProblemSizeChooser

public AbstractProblemSizeChooser()
Creates new AbstractProblemSizeChooser
Method Detail

setData

public void setData(ShopData shopData_)
Set the shop data object. If Nr[] is null or not of the correct size it is reinitilized
Specified by:
setData in interface ProblemSizeChooser

getNr

public int[] getNr()
Returns an array, spcifing how many jobs are to be in each route.
Specified by:
getNr in interface ProblemSizeChooser

getN

public int getN()
Sums the values of Nr[] and returns the sum. This is the total number of jobs.