Fix demand model converter

This commit is contained in:
WQY\qiong
2023-03-09 00:01:48 +08:00
parent 402451eb71
commit 0e1522f8e6

View File

@@ -390,7 +390,10 @@ def generate_v3(cs: ChangeSet) -> ChangeSet:
if tokens[0].upper() == OPTION_QUALITY_TRACE and len(tokens) >= 2:
cs_v3 |= { 'TRACE_NODE' : tokens[1] }
elif key == 'DEMAND MODEL':
cs_v3 |= { map[key] : OPTION_V3_DEMAND_MODEL_POWER }
if op[key] == OPTION_DEMAND_MODEL_DDA:
cs_v3 |= { map[key] : OPTION_V3_DEMAND_MODEL_FIXED }
else:
cs_v3 |= { map[key] : OPTION_V3_DEMAND_MODEL_POWER }
if len(cs_v3) > 0:
cs_v3 |= g_update_prefix | { 'type' : 'option_v3' }