Fix demand model converter
This commit is contained in:
@@ -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' }
|
||||
|
||||
Reference in New Issue
Block a user