Commit 185f5763 authored by Georgios Dagkakis's avatar Georgios Dagkakis

change in machine so that break time is set correctly when operator is released

parent 19103d18
...@@ -1196,9 +1196,12 @@ class Machine(CoreObject): ...@@ -1196,9 +1196,12 @@ class Machine(CoreObject):
operator.schedule[-1]["exitTime"] = self.env.now operator.schedule[-1]["exitTime"] = self.env.now
elif not operator.schedule[-1]["station"].get("id", None)== "off-shift": elif not operator.schedule[-1]["station"].get("id", None)== "off-shift":
operator.schedule[-1]["exitTime"] = self.env.now operator.schedule[-1]["exitTime"] = self.env.now
# operator.schedule[-1]["entity"] = self.getActiveObjectQueue()[0] # if the operator becomes unavailable
if not self.currentOperator.onShift: if (not self.currentOperator.onShift) or self.currentOperator.onBreak:
operator.timeLastShiftEnded=self.env.now if not self.currentOperator.onShift:
operator.timeLastShiftEnded=self.env.now
if self.currentOperator.onBreak:
operator.timeLastBreakStarted=self.env.now
operator.unAssign() # set the flag operatorAssignedTo to None operator.unAssign() # set the flag operatorAssignedTo to None
operator.workingStation=None operator.workingStation=None
self.toBeOperated = False self.toBeOperated = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment