From 33e370475e24b50a1a71a7ef5091a0140b45d911 Mon Sep 17 00:00:00 2001 From: Parth Dagia Date: Thu, 2 Apr 2026 11:58:50 +0530 Subject: [PATCH] fix: adopt v5.5 Variables.json and register missing result groups (#392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align result metadata with upstream MUIO v5.5 as the authoritative source. Variables.json fixes: - OV, NONTU, UDCI_d, UDCE_d: fill empty unit rules with correct values - TEP: CapUnitId → milion Currency (cost variable, not capacity) - AEL_d: EmiUnit → milion Currency / EmiUnit (shadow price composite unit) - EB_d: CapUnitId → milion Currency / EmiUnit, rename to "Energy Balance" - ROA: add /years divisor for rate unit - ROPBT, ROUBT: add /years divisor for rate units Const.Class.js: - Add R, RYC, RYCn to RESULTGROUPNAMES, RESULTPARAMORDER, and RESULTPARAMCOLORS so the pivot UI can navigate to Objective Value, commodity shadow prices, and constraint shadow prices. --- WebAPP/Classes/Const.Class.js | 35 +++++--- WebAPP/DataStorage/Variables.json | 128 ++++++++++++++++++++---------- 2 files changed, 107 insertions(+), 56 deletions(-) diff --git a/WebAPP/Classes/Const.Class.js b/WebAPP/Classes/Const.Class.js index 1a1040a13..ca668f6fb 100644 --- a/WebAPP/Classes/Const.Class.js +++ b/WebAPP/Classes/Const.Class.js @@ -96,8 +96,11 @@ export const GROUPNAMES = { } export const RESULTGROUPNAMES = { + "R" :"Region", "RT" :"Region, technology", "RYT" :"Region, year, technology", + "RYC" :"Region, year, commodity", + "RYCn" :"Region, year, constraint", "RYE" :"Region, year, emission", "RYS" :"Region, year, storage", "RYTM" :"Region, year, technology, mode of operation", @@ -158,25 +161,31 @@ export const PARAMCOLORS = { "RYCTs": "greenLight" } -export const RESULTPARAMORDER = [ - "RT" , - "RYT" , - "RYE" , +export const RESULTPARAMORDER = [ + "R" , + "RT" , + "RYT" , + "RYC" , + "RYCn" , + "RYE" , "RYS" , - "RYTM" , - "RYTC" , - "RYTE" , - "RYTTs" , - "RYCTs" , - "RYTEM" , - "RYTCTs" , - "RYTMTs" , - "RYTCMTs" + "RYTM" , + "RYTC" , + "RYTE" , + "RYTTs" , + "RYCTs" , + "RYTEM" , + "RYTCTs" , + "RYTMTs" , + "RYTCMTs" ]; export const RESULTPARAMCOLORS = { + "R": "orange", "RT": "blue", "RYT": "blueLight", + "RYC": "grey", + "RYCn": "pink", "RYE": "yellow", "RYS": "red", "RYTM": "pink", diff --git a/WebAPP/DataStorage/Variables.json b/WebAPP/DataStorage/Variables.json index c15ae6630..6e51fabd5 100644 --- a/WebAPP/DataStorage/Variables.json +++ b/WebAPP/DataStorage/Variables.json @@ -7,7 +7,7 @@ "unitRule": { "cat": [ { - "var": "" + "var": "number" } ] } @@ -117,7 +117,11 @@ "value": "Number Of New Technology Units", "name": "NumberOfNewTechnologyUnits", "unitRule": { - "cat": [] + "cat": [ + { + "var": "number" + } + ] } }, { @@ -154,21 +158,10 @@ "unitRule": { "cat": [ { - "var": "CapUnitId" - } - ] - } - } - ], - "RYC": [ - { - "id": "EB_d", - "value": "Shadow price - Annual Commodity Balance", - "name": "EBb4_EnergyBalanceEachYear4_ICR", - "unitRule": { - "cat": [ + "var": "milion" + }, { - "var": "CapUnitId" + "var": "Currency" } ] } @@ -182,33 +175,16 @@ "unitRule": { "cat": [ { - "var": "EmiUnit" - } - ] - } - } - ], - "RYCn": [ - { - "id": "UDCI_d", - "value": "Shadow price - UDC Inequality", - "name": "UDC1_UserDefinedConstraintInequality", - "unitRule": { - "cat": [ + "var": "milion" + }, { - "var": "" - } - ] - } - }, - { - "id": "UDCE_d", - "value": "Shadow price - UDC Equality", - "name": "UDC2_UserDefinedConstraintEquality", - "unitRule": { - "cat": [ + "var": "Currency" + }, { - "var": "" + "var": "divide" + }, + { + "var": "EmiUnit" } ] } @@ -251,7 +227,6 @@ ] } }, - { "id": "SVS", "value": "Salvage Value Storage", @@ -283,6 +258,55 @@ } } ], + "RYC": [ + { + "id": "EB_d", + "value": "Shadow price - Energy Balance", + "name": "EBb4_EnergyBalanceEachYear4_ICR", + "unitRule": { + "cat": [ + { + "var": "milion" + }, + { + "var": "Currency" + }, + { + "var": "divide" + }, + { + "var": "EmiUnit" + } + ] + } + } + ], + "RYCn": [ + { + "id": "UDCI_d", + "value": "Shadow price - UDC Inequality", + "name": "UDC1_UserDefinedConstraintInequality", + "unitRule": { + "cat": [ + { + "var": "number" + } + ] + } + }, + { + "id": "UDCE_d", + "value": "Shadow price - UDC Equality", + "name": "UDC2_UserDefinedConstraintEquality", + "unitRule": { + "cat": [ + { + "var": "number" + } + ] + } + } + ], "RYTM": [ { "id": "TATABM", @@ -386,6 +410,12 @@ "cat": [ { "var": "ActUnitId" + }, + { + "var": "divide" + }, + { + "var": "years" } ] } @@ -412,6 +442,12 @@ "cat": [ { "var": "CommUnit" + }, + { + "var": "divide" + }, + { + "var": "years" } ] } @@ -424,6 +460,12 @@ "cat": [ { "var": "CommUnit" + }, + { + "var": "divide" + }, + { + "var": "years" } ] } @@ -441,4 +483,4 @@ } } ] -} \ No newline at end of file +}