MergeSteps plugin corrected. operationTypes are updated correctly (booleans)

parent f650610b
...@@ -29,17 +29,17 @@ class MergeSteps(plugin.InputPreparationPlugin): ...@@ -29,17 +29,17 @@ class MergeSteps(plugin.InputPreparationPlugin):
technology = step["technology"] technology = step["technology"]
technology = technology.split("-")[0] technology = technology.split("-")[0]
# XXX loadType is always manual for this pilot # XXX loadType is always manual for this pilot
step["operationType"] = {"Load" : "Manual"} step["operationType"] = {"Load" : 1}
'''processingType + operator for processing''' '''processingType + operator for processing'''
# if the operator is defined as automatic or # if the operator is defined as automatic or
# XXX if the technology is EDM # XXX if the technology is EDM
# then set the processing type as automatic and remove the operator property # then set the processing type as automatic and remove the operator property
if step["operator"] == "Automatic"\ if step["operator"] == "Automatic"\
or step["technology"] == "EDM": or step["technology"] == "EDM":
step["operationType"]["Processing"] = "Automatic" step["operationType"]["Processing"] = 0
step.pop("operator") step.pop("operator")
else: else:
step["operationType"]["Processing"] = "Manual" step["operationType"]["Processing"] = 1
tempOperator = copy.deepcopy(step["operator"]) tempOperator = copy.deepcopy(step["operator"])
step["operator"] = {} step["operator"] = {}
step["operator"]["processing"] = [tempOperator] step["operator"]["processing"] = [tempOperator]
...@@ -68,9 +68,9 @@ class MergeSteps(plugin.InputPreparationPlugin): ...@@ -68,9 +68,9 @@ class MergeSteps(plugin.InputPreparationPlugin):
step["setupTime"] = stepToMerge["processingTime"] step["setupTime"] = stepToMerge["processingTime"]
# setupType + operator for setup # setupType + operator for setup
if stepToMerge["operator"] == "Automatic": if stepToMerge["operator"] == "Automatic":
step["operationType"]["Setup"] = "Automatic" step["operationType"]["Setup"] = 0
else: else:
step["operationType"]["Setup"] = "Manual" step["operationType"]["Setup"] = 1
try: try:
tempOperator = copy.deepcopy(step["operator"]) tempOperator = copy.deepcopy(step["operator"])
except: except:
......
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