Package jasima.shopSim.core
Class Job
- java.lang.Object
-
- jasima.shopSim.core.PrioRuleTarget
-
- jasima.shopSim.core.Job
-
- All Implemented Interfaces:
Notifier<Job,Job.JobEvent>,ValueStore,Cloneable
public class Job extends PrioRuleTarget implements Cloneable, ValueStore, Notifier<Job,Job.JobEvent>
Main work unit in a shop.- Author:
- Torsten Hildebrandt
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceJob.JobEventstatic classJob.JobMessage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Jobclone()static double[]computeDueDatesTWC(Job j, double ff)Computes operational due dates based on the total work content method, /* i.e., proportional to an operation's processing time.doublecurrProcTime()doublegetArriveTime()OperationgetCurrentOperation()doublegetCurrentOperationDueDate()WorkStationgetCurrMachine()doublegetDueDate()doublegetFinishTime()JobgetFuture()intgetJobNum()intgetJobType()JobgetMyFuture()Returns a clone of this Job switched to the next operation.StringgetName()double[]getOpDueDates()Operation[]getOps()doublegetRelDate()RoutegetRoute()ShopgetShop()doublegetStartTime()intgetTaskNumber()doublegetWeight()booleanisBatch()booleanisFuture()booleanisLastOperation()Jobjob(int i)Notifier<Job,Job.JobEvent>notifierImpl()voidnotifyNextMachine()Notify next machine of future arrival.intnumJobsInBatch()intnumOps()intnumOpsLeft()doubleprocSum()doubleremainingProcTime()voidsetArriveTime(double fl)voidsetCurrMachine(WorkStation currMachine)voidsetDueDate(double dueDate)voidsetFinishTime(double finishTime)Sets the completion time of the current operation.voidsetFuture(Job future)voidsetJobNum(int jobNum)voidsetJobType(int job)voidsetName(String name)voidsetOpDueDates(double[] opDueDates)voidsetOps(Operation[] ops)voidsetRelDate(double relDate)voidsetRoute(Route route)Sets theRoutethis object is following.voidsetStartTime(double startTime)Sets the start time of the current operation.voidsetTaskNumber(int tn)voidsetWeight(double weight)StringtoString()ValueStorevalueStoreImpl()Returns the implementation to use for adding ValueStore functionality.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jasima.core.util.observer.Notifier
addListener, addListener, addListener, fire, fire, getListener, numListener, removeCurrentListener, removeListener
-
Methods inherited from interface jasima.core.util.ValueStore
valueStoreContains, valueStoreGet, valueStoreGet, valueStoreGetAllKeys, valueStoreGetNumKeys, valueStorePut, valueStoreRemove, valueStoreUpdate
-
-
-
-
Constructor Detail
-
Job
public Job(Shop shop)
-
-
Method Detail
-
setArriveTime
public void setArriveTime(double fl)
-
getArriveTime
public double getArriveTime()
- Specified by:
getArriveTimein classPrioRuleTarget
-
setJobType
public void setJobType(int job)
-
getJobType
public int getJobType()
-
setTaskNumber
public void setTaskNumber(int tn)
-
getTaskNumber
public int getTaskNumber()
- Specified by:
getTaskNumberin classPrioRuleTarget
-
setCurrMachine
public void setCurrMachine(WorkStation currMachine)
-
getCurrMachine
public WorkStation getCurrMachine()
- Specified by:
getCurrMachinein classPrioRuleTarget
-
getCurrentOperation
public Operation getCurrentOperation()
- Specified by:
getCurrentOperationin classPrioRuleTarget
-
currProcTime
public double currProcTime()
- Specified by:
currProcTimein classPrioRuleTarget
-
procSum
public double procSum()
- Specified by:
procSumin classPrioRuleTarget
-
remainingProcTime
public double remainingProcTime()
- Specified by:
remainingProcTimein classPrioRuleTarget
-
numOps
public int numOps()
- Specified by:
numOpsin classPrioRuleTarget
-
numOpsLeft
public int numOpsLeft()
- Specified by:
numOpsLeftin classPrioRuleTarget
-
notifyNextMachine
public void notifyNextMachine()
Notify next machine of future arrival. This mehod is called whenever an operation is started. This method assumes isFinished to be set to the correct value before this method is called.
-
getMyFuture
public Job getMyFuture()
Returns a clone of this Job switched to the next operation.- Returns:
- The future clone of this job.
-
isFuture
public boolean isFuture()
- Specified by:
isFuturein classPrioRuleTarget
-
isLastOperation
public boolean isLastOperation()
-
getShop
public Shop getShop()
- Specified by:
getShopin classPrioRuleTarget
-
getDueDate
public double getDueDate()
- Specified by:
getDueDatein classPrioRuleTarget
-
setDueDate
public void setDueDate(double dueDate)
-
getWeight
public double getWeight()
- Specified by:
getWeightin classPrioRuleTarget
-
setWeight
public void setWeight(double weight)
-
getFuture
public Job getFuture()
-
setFuture
public void setFuture(Job future)
-
setRelDate
public void setRelDate(double relDate)
-
getRelDate
public double getRelDate()
- Specified by:
getRelDatein classPrioRuleTarget
-
setJobNum
public void setJobNum(int jobNum)
-
getJobNum
public int getJobNum()
- Specified by:
getJobNumin classPrioRuleTarget
-
setFinishTime
public void setFinishTime(double finishTime)
Sets the completion time of the current operation. This is called by a machine whenever processing starts.- Parameters:
finishTime- The finish time of the currentOperation.
-
getFinishTime
public double getFinishTime()
-
getStartTime
public double getStartTime()
-
setStartTime
public void setStartTime(double startTime)
Sets the start time of the current operation. This is used internally and called by a machine whenever processing starts.- Parameters:
startTime- The start time of the current operation.
-
setOpDueDates
public void setOpDueDates(double[] opDueDates)
-
getOpDueDates
public double[] getOpDueDates()
-
getCurrentOperationDueDate
public double getCurrentOperationDueDate()
- Specified by:
getCurrentOperationDueDatein classPrioRuleTarget
-
setOps
public void setOps(Operation[] ops)
-
getOps
public Operation[] getOps()
- Specified by:
getOpsin classPrioRuleTarget
-
job
public Job job(int i)
- Specified by:
jobin classPrioRuleTarget
-
numJobsInBatch
public int numJobsInBatch()
- Specified by:
numJobsInBatchin classPrioRuleTarget
-
computeDueDatesTWC
public static double[] computeDueDatesTWC(Job j, double ff)
Computes operational due dates based on the total work content method, /* i.e., proportional to an operation's processing time.- Parameters:
j- The job for which to compute operation due dates.ff- The due date factor to use.- Returns:
- An array containing operation due dates for each operation of
j.
-
isBatch
public boolean isBatch()
- Specified by:
isBatchin classPrioRuleTarget
-
getName
public String getName()
- Specified by:
getNamein classPrioRuleTarget
-
setName
public void setName(String name)
-
getRoute
public Route getRoute()
- Returns:
- The route this object is following (might be null).
-
setRoute
public void setRoute(Route route)
Sets theRoutethis object is following. This might benull, as not every job has to be created using aRoute(e.g. in a dynamic job shop where eachJobhas its unique rule).- Parameters:
route- The route this Job is following.
-
valueStoreImpl
public ValueStore valueStoreImpl()
Description copied from interface:ValueStoreReturns the implementation to use for adding ValueStore functionality.- Specified by:
valueStoreImplin interfaceValueStore
-
notifierImpl
public Notifier<Job,Job.JobEvent> notifierImpl()
- Specified by:
notifierImplin interfaceNotifier<Job,Job.JobEvent>
-
-