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

correction in plugin

parent a5dd97b9
...@@ -41,6 +41,12 @@ class AddBatchStations(plugin.InputPreparationPlugin): ...@@ -41,6 +41,12 @@ class AddBatchStations(plugin.InputPreparationPlugin):
if predecessorClass=='Dream.BatchDecomposition': if predecessorClass=='Dream.BatchDecomposition':
data['graph']['node'][node_id]['_class']='Dream.BatchScrapMachineAfterDecompose' 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 # loop in BatchDecompositions to change the classes to BatchDecompositionBlocking
for node_id, node in nodes.iteritems(): for node_id, node in nodes.iteritems():
if node['_class']=='Dream.BatchDecomposition': if node['_class']=='Dream.BatchDecomposition':
...@@ -62,12 +68,6 @@ class AddBatchStations(plugin.InputPreparationPlugin): ...@@ -62,12 +68,6 @@ class AddBatchStations(plugin.InputPreparationPlugin):
if predecessorClass=='Dream.BatchSource': if predecessorClass=='Dream.BatchSource':
data['graph']['node'][node_id]['_class']='Dream.BatchDecompositionStartTime' 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 # loop through the nodes
for node_id, node in machinesThatNeedAddition.iteritems(): for node_id, node in machinesThatNeedAddition.iteritems():
# find BatchScrapMachines that process batches # find BatchScrapMachines that process batches
......
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