minor corrections to UpdateWIP plugin

parent fc437e91
...@@ -10,7 +10,7 @@ class UpdateWIP(plugin.InputPreparationPlugin): ...@@ -10,7 +10,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
""" """
def getWIPIds(self): def getWIPIds(self):
"""""" """returns the ids of the parts that are in the WIP dictionary"""
wipIDs = [] wipIDs = []
for key in self.data["input"]["BOM"].get("WIP", {}).keys() for key in self.data["input"]["BOM"].get("WIP", {}).keys()
wipIDs.append(key) wipIDs.append(key)
...@@ -76,11 +76,11 @@ class UpdateWIP(plugin.InputPreparationPlugin): ...@@ -76,11 +76,11 @@ class UpdateWIP(plugin.InputPreparationPlugin):
completedComponents.append(componentID) completedComponents.append(componentID)
# if the entity is still in the system then update the WIP info # if the entity is still in the system then update the WIP info
if not componentID in wipToBeRemoved: if not componentID in wipToBeRemoved:
wip["componentID"]["station"] = currentStation wip[componentID]["station"] = currentStation
wip["componentID"]["sequence"] = current_step["sequence"] wip[componentID]["sequence"] = current_step["sequence"]
wip["componentID"]["task_id"] = current_step["task_id"] wip[componentID]["task_id"] = current_step["task_id"]
if not exitTime: if not exitTime:
wip["componentID"]["remainingProcessingTime"] = {"Fixed": {"mean": remainingProcessingTime}} wip[componentID]["remainingProcessingTime"] = {"Fixed": {"mean": remainingProcessingTime}}
# if the entity is not recognized within the current WIP then check if it should be created # if the entity is not recognized within the current WIP then check if it should be created
# first the flag designComplete and the completedComponents list must be updated # first the flag designComplete and the completedComponents list must be updated
for component in orderComponents: for component in orderComponents:
...@@ -105,9 +105,9 @@ class UpdateWIP(plugin.InputPreparationPlugin): ...@@ -105,9 +105,9 @@ class UpdateWIP(plugin.InputPreparationPlugin):
insertWIPitem = True insertWIPitem = True
if insertWIPitem: if insertWIPitem:
wip["componentID"]["station"] = route[0]["stationIdsList"][0] wip[componentID]["station"] = route[0]["stationIdsList"][0]
wip["componentID"]["sequence"] = route[0]["sequence"] wip[componentID]["sequence"] = route[0]["sequence"]
wip["componentID"]["task_id"] = route[0]["task_id"] wip[componentID]["task_id"] = route[0]["task_id"]
# remove the idle entities # remove the idle entities
for entityID in wipToBeRemoved: for entityID in wipToBeRemoved:
assert wip.pop(entityID, None), "while trying to remove WIP that has concluded it's route, nothing is removed" assert wip.pop(entityID, None), "while trying to remove WIP that has concluded it's route, nothing is removed"
......
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