Commit 403d7e86 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in plugin

parent a5dd97b9
......@@ -40,7 +40,13 @@ class AddBatchStations(plugin.InputPreparationPlugin):
predecessorClass=nodes[predecessorId]['_class']
if predecessorClass=='Dream.BatchDecomposition':
data['graph']['node'][node_id]['_class']='Dream.BatchScrapMachineAfterDecompose'
# loop through the nodes to find the machines that do need addition
machinesThatNeedAddition={}
for node_id, node in nodes.iteritems():
if node['_class']=='Dream.BatchScrapMachine' and self.checkIfMachineNeedsAddition(data,node_id,standardBatchUnits):
machinesThatNeedAddition[node_id]=node
# loop in BatchDecompositions to change the classes to BatchDecompositionBlocking
for node_id, node in nodes.iteritems():
if node['_class']=='Dream.BatchDecomposition':
......@@ -61,12 +67,6 @@ class AddBatchStations(plugin.InputPreparationPlugin):
predecessorClass=nodes[predecessorId]['_class']
if predecessorClass=='Dream.BatchSource':
data['graph']['node'][node_id]['_class']='Dream.BatchDecompositionStartTime'
# loop through the nodes to find the machines that do need addition
machinesThatNeedAddition={}
for node_id, node in nodes.iteritems():
if node['_class']=='Dream.BatchScrapMachine' and self.checkIfMachineNeedsAddition(data,node_id,standardBatchUnits):
machinesThatNeedAddition[node_id]=node
# loop through the nodes
for node_id, node in machinesThatNeedAddition.iteritems():
......
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