haifa.shopsim
Class FastAbstractShopData

java.lang.Object
  |
  +--haifa.shopsim.AbstractShopData
        |
        +--haifa.shopsim.FastAbstractShopData
All Implemented Interfaces:
ShopData
Direct Known Subclasses:
FastShopDataFromJBSFile, RLikeNShopData

public class FastAbstractShopData
extends AbstractShopData

An enhancement to the abstract shop data, it keeps some more data structures in memory (taking up more memory, but speeds up some method calls.

Version:
1.1

Field Summary
(package private)  java.util.List[] CiList
           
(package private)  int K
           
(package private)  java.util.List[] routesList
           
 
Fields inherited from class haifa.shopsim.AbstractShopData
I, R, routes, stepDurations
 
Constructor Summary
protected FastAbstractShopData()
          Creates new FastAbstractShopData
 
Method Summary
 java.util.List getCi(int i)
          Returns a List of all operation in machine i.
 int getK()
          Returns the total number of steps/classes/buffers (sum of Kr)
 java.util.List getRoute(int r)
          Returns a List of all ShopData.Operation instances in route r
 int getSizeCi(int i)
          Returns the number of operations in machine i.
protected  void setUpFastData()
          Is to be called by constructors of sub-classes.
 
Methods inherited from class haifa.shopsim.AbstractShopData
getI, getKr, getMachine, getMaxMachineMean, getMaxRouteMean, getMeanOfMachine, getMeanOfRoute, getMeanOfRouteOnMacine, getMeanOfRoutesOnMachine, getMeansOfRoutesOnMachines, getR, getXto, getXto, isSingleRoute, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

CiList

java.util.List[] CiList

routesList

java.util.List[] routesList

K

int K
Constructor Detail

FastAbstractShopData

protected FastAbstractShopData()
Creates new FastAbstractShopData
Method Detail

setUpFastData

protected void setUpFastData()
Is to be called by constructors of sub-classes.

getK

public int getK()
Returns the total number of steps/classes/buffers (sum of Kr)
Overrides:
getK in class AbstractShopData

getCi

public java.util.List getCi(int i)
Returns a List of all operation in machine i. The elements of the list are arrays of ShopData.Operation instances
Overrides:
getCi in class AbstractShopData

getSizeCi

public int getSizeCi(int i)
Returns the number of operations in machine i.
Overrides:
getSizeCi in class AbstractShopData

getRoute

public java.util.List getRoute(int r)
Returns a List of all ShopData.Operation instances in route r
Overrides:
getRoute in class AbstractShopData