Enhance epa3 junction inp in

This commit is contained in:
WQY\qiong
2023-03-31 15:12:29 +08:00
parent 453f3cbfe7
commit 5f64439f9f

View File

@@ -150,8 +150,8 @@ def inp_in_junction(line: str, demand_outside: bool) -> str:
id = str(tokens[0])
elevation = float(tokens[1])
demand = float(tokens[2]) if num_without_desc >= 3 else None
pattern = str(tokens[3]) if num_without_desc >= 4 else None
demand = float(tokens[2]) if num_without_desc >= 3 and tokens[2] != '*' else None
pattern = str(tokens[3]) if num_without_desc >= 4 and tokens[3] != '*' else None
pattern = f"'{pattern}'" if pattern != None else 'null'
desc = str(tokens[-1]) if has_desc else None