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 interface
Job.JobEvent
static class
Job.JobMessage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
clone()
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.double
currProcTime()
double
getArriveTime()
Operation
getCurrentOperation()
double
getCurrentOperationDueDate()
WorkStation
getCurrMachine()
double
getDueDate()
double
getFinishTime()
Job
getFuture()
int
getJobNum()
int
getJobType()
Job
getMyFuture()
Returns a clone of this Job switched to the next operation.String
getName()
double[]
getOpDueDates()
Operation[]
getOps()
double
getRelDate()
Route
getRoute()
Shop
getShop()
double
getStartTime()
int
getTaskNumber()
double
getWeight()
boolean
isBatch()
boolean
isFuture()
boolean
isLastOperation()
Job
job(int i)
Notifier<Job,Job.JobEvent>
notifierImpl()
void
notifyNextMachine()
Notify next machine of future arrival.int
numJobsInBatch()
int
numOps()
int
numOpsLeft()
double
procSum()
double
remainingProcTime()
void
setArriveTime(double fl)
void
setCurrMachine(WorkStation currMachine)
void
setDueDate(double dueDate)
void
setFinishTime(double finishTime)
Sets the completion time of the current operation.void
setFuture(Job future)
void
setJobNum(int jobNum)
void
setJobType(int job)
void
setName(String name)
void
setOpDueDates(double[] opDueDates)
void
setOps(Operation[] ops)
void
setRelDate(double relDate)
void
setRoute(Route route)
Sets theRoute
this object is following.void
setStartTime(double startTime)
Sets the start time of the current operation.void
setTaskNumber(int tn)
void
setWeight(double weight)
String
toString()
ValueStore
valueStoreImpl()
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:
getArriveTime
in classPrioRuleTarget
-
setJobType
public void setJobType(int job)
-
getJobType
public int getJobType()
-
setTaskNumber
public void setTaskNumber(int tn)
-
getTaskNumber
public int getTaskNumber()
- Specified by:
getTaskNumber
in classPrioRuleTarget
-
setCurrMachine
public void setCurrMachine(WorkStation currMachine)
-
getCurrMachine
public WorkStation getCurrMachine()
- Specified by:
getCurrMachine
in classPrioRuleTarget
-
getCurrentOperation
public Operation getCurrentOperation()
- Specified by:
getCurrentOperation
in classPrioRuleTarget
-
currProcTime
public double currProcTime()
- Specified by:
currProcTime
in classPrioRuleTarget
-
procSum
public double procSum()
- Specified by:
procSum
in classPrioRuleTarget
-
remainingProcTime
public double remainingProcTime()
- Specified by:
remainingProcTime
in classPrioRuleTarget
-
numOps
public int numOps()
- Specified by:
numOps
in classPrioRuleTarget
-
numOpsLeft
public int numOpsLeft()
- Specified by:
numOpsLeft
in 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:
isFuture
in classPrioRuleTarget
-
isLastOperation
public boolean isLastOperation()
-
getShop
public Shop getShop()
- Specified by:
getShop
in classPrioRuleTarget
-
getDueDate
public double getDueDate()
- Specified by:
getDueDate
in classPrioRuleTarget
-
setDueDate
public void setDueDate(double dueDate)
-
getWeight
public double getWeight()
- Specified by:
getWeight
in 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:
getRelDate
in classPrioRuleTarget
-
setJobNum
public void setJobNum(int jobNum)
-
getJobNum
public int getJobNum()
- Specified by:
getJobNum
in 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:
getCurrentOperationDueDate
in classPrioRuleTarget
-
setOps
public void setOps(Operation[] ops)
-
getOps
public Operation[] getOps()
- Specified by:
getOps
in classPrioRuleTarget
-
job
public Job job(int i)
- Specified by:
job
in classPrioRuleTarget
-
numJobsInBatch
public int numJobsInBatch()
- Specified by:
numJobsInBatch
in 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:
isBatch
in classPrioRuleTarget
-
getName
public String getName()
- Specified by:
getName
in 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 theRoute
this object is following. This might benull
, as not every job has to be created using aRoute
(e.g. in a dynamic job shop where eachJob
has its unique rule).- Parameters:
route
- The route this Job is following.
-
valueStoreImpl
public ValueStore valueStoreImpl()
Description copied from interface:ValueStore
Returns the implementation to use for adding ValueStore functionality.- Specified by:
valueStoreImpl
in interfaceValueStore
-
notifierImpl
public Notifier<Job,Job.JobEvent> notifierImpl()
- Specified by:
notifierImpl
in interfaceNotifier<Job,Job.JobEvent>
-
-