summaryrefslogtreecommitdiff
path: root/UnitOperations.py
diff options
context:
space:
mode:
authorpravindalve2021-01-02 02:58:41 +0530
committerpravindalve2021-01-02 02:58:41 +0530
commitd5804aa7215191ab059435f23955cf7e36411d43 (patch)
treec49b0b321313259fbae23b449b02a011892540b2 /UnitOperations.py
parent60d80b1c9f32d9e742f1622eb2ec458fe79ba765 (diff)
downloadChemical-Simulator-GUI-d5804aa7215191ab059435f23955cf7e36411d43.tar.gz
Chemical-Simulator-GUI-d5804aa7215191ab059435f23955cf7e36411d43.tar.bz2
Chemical-Simulator-GUI-d5804aa7215191ab059435f23955cf7e36411d43.zip
Added functionality for labeling the ports
Diffstat (limited to 'UnitOperations.py')
-rw-r--r--UnitOperations.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/UnitOperations.py b/UnitOperations.py
index 8a3f8db..ed2864c 100644
--- a/UnitOperations.py
+++ b/UnitOperations.py
@@ -9,8 +9,8 @@ class UnitOperation():
def __init__(self):
self.OM_data_eqn = ''
self.OM_data_init = ''
- self.input_stms = []
- self.output_stms = []
+ self.input_stms = {}
+ self.output_stms = {}
self.compounds = [c[:c.index('(')] for c in compound_selected]
self.name = ''
self.mode = None
@@ -56,11 +56,11 @@ class UnitOperation():
self.variables[k]['value'] = v
self.mode_val = params[self.mode]
- def add_connection(self,flag,UnitOpr):
+ def add_connection(self,flag,sourceId, UnitOpr):
if flag==1: # Input stream if flag is 1
- self.input_stms.append(UnitOpr)
+ self.input_stms[sourceId] = UnitOpr
else :
- self.output_stms.append(UnitOpr)
+ self.output_stms[sourceId] = UnitOpr
def set_pos(self,pos):
self.pos = pos