|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javaSimulation.Linkage | +--javaSimulation.Link | +--javaSimulation.Process | +--haifa.shopsim.kernel.Machine
This class is an enity in the simulation. It's state represents the state of a machine working in the job shop at a given point in time. It contains a HashMap of Machine.JobClass objects. Each of these objects has a reference to the machine that passes jobs of such a class to the current machine and to the machine which is the destination of jobs after they are finished. (These do not have to be machines but actually JobHolders (they can also be route ends and starts).
The Machine class uses it's reference to the shopRun class to ask questions such as who to schedule, and if quit has been called.
Inner Class Summary | |
private class |
Machine.JobClass
This inner class represents a buffer in a machine. |
Field Summary | |
private java.util.HashMap |
classes
Maps the classes(buffers) in a shop. |
private int |
machineNumber
The machine number of the machine as specified by the shopData. |
private boolean |
processing
Determines whether the machine is currently processing a job or is idle. |
(package private) double |
restTime
|
private ShopData |
shopData
A reference to the data. |
private ShopRun |
shopRun
A reference to the ShopRun object, the main process. |
Fields inherited from class javaSimulation.Process |
after, after_code, at, at_code, before, before_code, delay, delay_code, direct_code, EVTIME, MAIN, myCoroutine, PRED, prior, SQS, SUC, TERMINATED |
Constructor Summary | |
(package private) |
Machine(ShopData shopData_,
int machineNumber_,
ShopRun shopRun_)
Constructor sets up all of the buffers (JobClass objects). |
Method Summary | |
void |
actions()
The actions that a machine performs are the following: If all buffers are empty, call the doSchedule method which will handle things with the shop algorithm and determine which buffer to draw from next. |
(package private) void |
bindInput(Operation op,
JobHolder input_)
Convinience class that helps setup network of routes. |
(package private) void |
bindOutput(Operation op,
JobHolder output_)
Convencie class that helps setup network of routes. |
void |
getJob(Job job)
Get a job and put in the appropriate JobClass. |
(package private) java.util.Map |
getQMap()
Returns a map of the Q lengths for each of the operations that the job has. |
(package private) boolean |
isEmpty()
Returns true if all buffers for machine are empty. |
(package private) boolean |
isProcessing()
Returns true if the Machine is currently processing a job. |
java.lang.String |
toString()
Returns the machineNumber in a string. |
Methods inherited from class javaSimulation.Process |
|
Methods inherited from class javaSimulation.Link |
follow, into, out, precede |
Methods inherited from class javaSimulation.Linkage |
pred, prev, suc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
private boolean processing
private java.util.HashMap classes
private ShopData shopData
private int machineNumber
private ShopRun shopRun
double restTime
Constructor Detail |
Machine(ShopData shopData_, int machineNumber_, ShopRun shopRun_)
Method Detail |
boolean isProcessing()
void bindInput(Operation op, JobHolder input_)
void bindOutput(Operation op, JobHolder output_)
java.util.Map getQMap()
boolean isEmpty()
public void actions()
actions
in class javaSimulation.Process
public java.lang.String toString()
toString
in class java.lang.Object
public void getJob(Job job)
getJob
in interface JobHolder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |