Remove old inp in routine
This commit is contained in:
@@ -66,30 +66,9 @@ def set_emitter(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
# [EPA3][IN][OUT]
|
||||
# node Ke (exponent pattern)
|
||||
#--------------------------------------------------------------
|
||||
class InpEmitter:
|
||||
def __init__(self, line: str) -> None:
|
||||
tokens = line.split()
|
||||
|
||||
num = len(tokens)
|
||||
has_desc = tokens[-1].startswith(';')
|
||||
num_without_desc = (num - 1) if has_desc else num
|
||||
|
||||
self.junction = str(tokens[0])
|
||||
self.coefficient = float(tokens[1])
|
||||
|
||||
|
||||
def inp_in_emitter(section: list[str]) -> ChangeSet:
|
||||
cs = ChangeSet()
|
||||
for s in section:
|
||||
# skip comment
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
obj = InpEmitter(s)
|
||||
cs.append(g_update_prefix | {'type': 'emitter', 'junction': obj.junction, 'coefficient': obj.coefficient})
|
||||
return cs
|
||||
|
||||
|
||||
def inp_in_emitter_new(line: str) -> str:
|
||||
def inp_in_emitter(line: str) -> str:
|
||||
tokens = line.split()
|
||||
|
||||
num = len(tokens)
|
||||
|
||||
Reference in New Issue
Block a user