|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--haifa.shopsim.GeneralShopDataArray
An implementation of a general shopData using arrays.
Field Summary | |
private int |
I
Number of machines |
private int[] |
jobRoutes
The length of this array is numJobTypes. |
private int[] |
numJobs
The length of this array is numJobTypes, each element determines how many jobs are from each type. |
private int |
numJobTypes
The different number of jobs types in the job shop |
private int[][] |
routes
Array of routes, each route being an array of operations |
private double[][] |
stepDurations
This is a ragged array of job durations per each step. |
Constructor Summary | |
GeneralShopDataArray(java.io.Reader reader)
Read according to file format as specified in example shop.dat |
Method Summary | |
java.util.List |
getCi(int i)
Returns a List of all operation in machine i. |
int |
getI()
Returns number of machines. |
java.lang.String[] |
getJobsOfRoute(int r)
Returns all of of route r. |
java.lang.String[] |
getJobsOfType(int t)
Returns all of the jobs of type t. |
int |
getK()
Returns the total number of steps/classes/buffers (sum of Kr) |
int |
getKr(int r)
Returns number of steps in route r |
int |
getMachine(Operation op)
Returns the machine that performs the following operation. |
int |
getN()
Returns total number of jobs |
int |
getNr(int r)
Returns number of jobs in route r |
int |
getNt(int t)
Returns the number of jobs of type t |
int |
getR()
Returns number of routes. |
java.util.List |
getRoute(int r)
Returns a List of all ShopData.Operation instances in route r |
int |
getRouteOfType(int t)
Returns the route of type t. |
int |
getSizeCi(int i)
Returns the number of operations in machine i. |
int |
getT()
Returns number of job types. |
int |
getTr(int r)
Returns the number of types of jobs that are on route r. |
int[] |
getTypesOfRoute(int r)
Returns an array of type numbers of jobs that are on route r. |
double |
getXto(int t,
int o)
Returns the processing time of job of type t, on step o of it's route. |
boolean |
isIdenticalJobs()
Ask if the shop has identical jobs. |
boolean |
isMostGeneralJobShop()
Ask if the shop is most general, not necessarily proportional nor similar. reply is true. |
boolean |
isProportinalJobs()
Ask if the shop has proportional jobs. |
boolean |
isSingleRoute()
Ask is shop is a jobshop with a single route same as getR()==1 |
static void |
main(java.lang.String[] args)
For testing |
java.lang.String |
toString()
Returns all info regarding jobshop in a displayable string |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int I
private int[][] routes
private int numJobTypes
private int[] numJobs
private int[] jobRoutes
private double[][] stepDurations
Constructor Detail |
public GeneralShopDataArray(java.io.Reader reader) throws JobShopFileFormatException, java.io.IOException
Method Detail |
public int getI()
getI
in interface ShopData
public int getR()
getR
in interface ShopData
public int getN()
getN
in interface ShopData
public int getT()
getT
in interface ShopData
public int getK()
getK
in interface ShopData
public int getNt(int t)
getNt
in interface ShopData
public int getTr(int r)
getTr
in interface ShopData
public int[] getTypesOfRoute(int r)
getTypesOfRoute
in interface ShopData
public java.lang.String[] getJobsOfType(int t)
getJobsOfType
in interface ShopData
public java.lang.String[] getJobsOfRoute(int r)
ShopData
getJobsOfRoute
in interface ShopData
public double getXto(int t, int o)
getXto
in interface ShopData
public int getRouteOfType(int t)
getRouteOfType
in interface ShopData
public int getKr(int r)
ShopData
getKr
in interface ShopData
public int getMachine(Operation op)
ShopData
getMachine
in interface ShopData
public int getNr(int r)
ShopData
getNr
in interface ShopData
public java.util.List getCi(int i)
getCi
in interface ShopData
public int getSizeCi(int i)
getSizeCi
in interface ShopData
public java.util.List getRoute(int r)
getRoute
in interface ShopData
public boolean isSingleRoute()
isSingleRoute
in interface ShopData
public boolean isIdenticalJobs()
isIdenticalJobs
in interface ShopData
public boolean isProportinalJobs()
isProportinalJobs
in interface ShopData
public boolean isMostGeneralJobShop()
isMostGeneralJobShop
in interface ShopData
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args) throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |