From 5f64439f9f1a172c83b79fc9f3d09b816fdc91b9 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Fri, 31 Mar 2023 15:12:29 +0800 Subject: [PATCH] Enhance epa3 junction inp in --- api/s2_junctions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/s2_junctions.py b/api/s2_junctions.py index 28aadd0..cbe3c1b 100644 --- a/api/s2_junctions.py +++ b/api/s2_junctions.py @@ -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