|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--haifa.shopsim.lab.ShopStatistics
This object is the result of an observation of a shop simulation run. It holds the data that describes the manner in which the run occured. This data is then to be analyzed. The object offers methods for updating the data. These methods are to be used by a StatisticsCollector object. Note that a ShopStatistics object maybe in a sealed state meanning that it is not changable anymore. Currently, the changing methods do not inforce this state.
The pieces of infomration that this object holds are:
This information is not minimal, but it doesn't hurt to much to store all of it (good for debugging.) Note:
Field Summary | |
protected boolean |
finished
true when the job shop is finished and this object is not to be changed any more. |
protected double[] |
finishTimes
The completion time of each machine (when it doesn't have material upstream. |
protected double |
flowTime
The flow time. |
protected int |
I
The number of machines in the shop. |
protected long |
numSimulationEvents
The number of simulation events were fired |
protected double[] |
restForGoodTimes
The time during which a machine was resting because it was finished. |
protected double[] |
restTimes
The times during which each machine rests. |
protected long |
serialNum
Gets the unique serial number (unique per JVM). |
protected static long |
serialNumCounter
A serial number counter of the shopStatistics run. |
protected double[] |
starveTimes
The times during which each machine has material up stream but isn't working. |
protected double[] |
willingRestTimes
The time during which each machine had a job but was willing to rest. |
protected double[] |
workTimes
The times during which each machine is working. |
Constructor Summary | |
ShopStatistics(int I_)
Creates new ShopStatatistics for a given number of machines. |
Method Summary | |
double[] |
getFinishTimes()
Returns a reference to the finsih times array. |
double |
getFlowTime()
Returns the total flow time. |
int[] |
getLastWorkingMachines()
Get the array of Last working machine indexs (indexes start at 1). |
double |
getMakeSpan()
Returns the makespan. |
int[] |
getMostWorkingMachines()
Get the array of most working machine indexes (indexs start at 1), (this may often be one machine. |
double[] |
getRestForGoodTimes()
Returns a reference to the restForGoodTimes array. |
double[] |
getRestTimes()
Returns a reference to the resttimes array. |
double[] |
getStarveTimes()
Returns a reference to the starve times array. |
double[] |
getWillingRestTimes()
Returns a reference to the willing rest times array. |
double[] |
getWorkTimes()
Returns a reference to the work times array. |
void |
incEvents()
Increments the count of number of simulation events. |
void |
increaseFlowTime(double delta)
Increases the flowtime by delta. |
void |
increaseRestForGoodTime(int machineNum,
double delta)
Increases the rest for good time of a machine. |
void |
increaseRestTime(int machineNum,
double delta)
Increases the rest time of a machine. |
void |
increaseStarveTime(int machineNum,
double delta)
Increases the starve time of a machine. |
void |
increaseWillingRestTime(int machineNum,
double delta)
Increases the willing rest time of a machine. |
void |
increaseWorkTime(int machineNum,
double delta)
Increases the work time of a machine. |
boolean |
isComplete()
Returns true if the statistics object is sealed. |
void |
maybeSetFinishTime(int machineNum,
double finishTime)
Updates the finish time of a machine if it still hasn't been updated (if it hasn't registered as finished yet.) |
void |
seal()
Tell the shop statistics that there is no more incoming information. |
void |
setFinishTime(int machineNum,
double finishTime)
Sets the finish time for a machine. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static long serialNumCounter
protected long serialNum
protected int I
protected double[] finishTimes
protected double[] workTimes
protected double[] restTimes
protected double[] starveTimes
protected double[] willingRestTimes
protected double[] restForGoodTimes
protected double flowTime
protected boolean finished
protected long numSimulationEvents
Constructor Detail |
public ShopStatistics(int I_)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public void incEvents()
public void setFinishTime(int machineNum, double finishTime)
public void maybeSetFinishTime(int machineNum, double finishTime)
public void increaseWorkTime(int machineNum, double delta)
public void increaseRestTime(int machineNum, double delta)
public void increaseStarveTime(int machineNum, double delta)
public void increaseRestForGoodTime(int machineNum, double delta)
public void increaseWillingRestTime(int machineNum, double delta)
public void increaseFlowTime(double delta)
public void seal()
public boolean isComplete()
public double getMakeSpan()
public double getFlowTime()
public int[] getLastWorkingMachines()
public int[] getMostWorkingMachines()
public double[] getWorkTimes()
public double[] getStarveTimes()
public double[] getFinishTimes()
public double[] getRestTimes()
public double[] getWillingRestTimes()
public double[] getRestForGoodTimes()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |