diff options
author | pravindalve | 2021-01-02 02:58:41 +0530 |
---|---|---|
committer | pravindalve | 2021-01-02 02:58:41 +0530 |
commit | d5804aa7215191ab059435f23955cf7e36411d43 (patch) | |
tree | c49b0b321313259fbae23b449b02a011892540b2 /UnitOperations.py | |
parent | 60d80b1c9f32d9e742f1622eb2ec458fe79ba765 (diff) | |
download | Chemical-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.py | 10 |
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 |