Skip to content

Commit

Permalink
Merge pull request #41 from GAMS-dev/custom-importer
Browse files Browse the repository at this point in the history
Custom importer, renderer and scenario comparison
  • Loading branch information
FFiand authored Mar 12, 2024
2 parents ad4d081 + acd3faa commit 6f8367e
Show file tree
Hide file tree
Showing 62 changed files with 7,827 additions and 1,565 deletions.
637 changes: 615 additions & 22 deletions README.md

Large diffs are not rendered by default.

260 changes: 151 additions & 109 deletions app_README.md

Large diffs are not rendered by default.

109 changes: 33 additions & 76 deletions conf_times_miro/times_miro.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"theme": "browser",
"customCss": true,
"customCss": true,
"excelIncludeMeta": true,
"excelIncludeEmptySheets": true,
"autoGenInputGraphs": true,
Expand Down Expand Up @@ -54,21 +54,6 @@
"gmsbratio": {
"newAlias": "Basis indicator"
},
"gmsrunlocation": {
"newAlias": "Location of Run file"
},
"gmsbotime": {
"newAlias": "First year available (BOTIME)"
},
"gmseotime": {
"newAlias": "Last year available (EOTIME)"
},
"gmsobj": {
"newAlias": "Choice of objective function formulations"
},
"gmsrunmode": {
"newAlias": "whether to create a MIRO scenario or solve TIMES"
},
"dd_prc_desc": {
"newAlias": "Process Description"
},
Expand Down Expand Up @@ -118,17 +103,7 @@
"rendererName": "mirowidget_scenddmap",
"alias": "Settings",
"apiVersion": 2,
"widgetSymbols": ["extensions", "milestonyr", "solveropt", "timeslice", "gmsobj", "gmsrunlocation", "gmsbotime", "gmseotime", "gmsbratio", "gmsreslim", "gmssolver", "gmsrunmode"]
},
"gmsrunmode": {
"widgetType": "dropdown",
"alias": "Mode to run",
"choices": ["solve", "create"],
"selected": "solve",
"noHcube": true,
"clearValue": false,
"multiple": false,
"label": "Mode to run"
"widgetSymbols": ["extensions", "milestonyr", "solveropt", "timeslice", "gmsbratio", "gmsreslim", "gmssolver", "dd_prc_desc", "dd_com_desc"]
},
"gmssolver": {
"widgetType": "dropdown",
Expand Down Expand Up @@ -162,42 +137,6 @@
"noHcube": false,
"label": "Basis indicator (bRatio)"
},
"gmsbotime": {
"widgetType": "numericinput",
"decimal": 0,
"decimalCharacter": ".",
"digitGroupSeparator": ",",
"label": "First year available (BOTIME)",
"min": 1850,
"max": 2200,
"value": 1960
},
"gmseotime": {
"widgetType": "numericinput",
"decimal": 0,
"decimalCharacter": ".",
"digitGroupSeparator": ",",
"label": "Last year available (EOTIME)",
"min": 1850,
"max": 2200,
"value": 2200
},
"gmsrunlocation": {
"widgetType": "textinput",
"alias": "Location of RUN file (for initialization)",
"value": " ",
"label": "Location of RUN file"
},
"gmsobj": {
"widgetType": "dropdown",
"alias": "Objective function formulation",
"choices": ["ALT", "AUTO", "LIN", "MOD", "STD"],
"selected": "MOD",
"noHcube": false,
"clearValue": false,
"multiple": false,
"label": "Objective function formulation"
},
"cubeinput": {
"widgetType": "table",
"tableType": "pivot",
Expand All @@ -217,13 +156,6 @@
}
}
},
"outputAttachments": [
{
"filename": "miroScenario.gdx",
"execPerm": false,
"throwError": false
}
],
"overwriteHeaderAliases": {
"cubeinput": {
"newHeaders": ["Symbol", "Type", "DD File", "User Constraint", "Region", "Year", "Process", "Commodity", "Time Slice", "Limit Types", "Currencies", "Gen1", "Gen2", "Gen3", "value"]
Expand Down Expand Up @@ -253,7 +185,7 @@
"newHeaders": ["DD file", "Region", "Commodity", "Description"]
}
},
"extraClArgs": ["--gmsrunopt=local", "--DDPREFIX=dd_files/"],
"extraClArgs": ["--gmsrunopt=local", "--DDPREFIX=dd_files/", "--runmode=run"],
"readme": {
"tabTitle": "Readme",
"filename": "app_README.md",
Expand All @@ -266,17 +198,42 @@
"hidePivotControls": false,
"fixedColumns": true
},
"inputGroups": [
"customDataImport": [
{
"name": "Symbol descriptions",
"members": ["dd_prc_desc", "dd_com_desc"],
"sameTab": false
"label": "XLSX or DD files",
"symNames": [
"solveropt",
"scenddmap",
"timeslice",
"milestonyr",
"extensions",
"dd_prc_desc",
"dd_com_desc",
"gmssolver",
"cubeinput",
"gmsreslim",
"gmsbratio"
],
"functionName": "miroimport_times",
"localFileInput": {
"label": "Please upload zipped XLSX or DD files here. A RUN file is optional and must be part of the zip archive.",
"multiple": true,
"accept": [
".zip"
]
}
}
],
"layoutSettings": {
"maxTabsExpandedInput": 5,
"maxTabsExpandedOutput": 5,
"maxTabsExpandedPivotComp": 5,
"maxTabsExpandedSplitComp": 5,
"maxTabsExpandedTabComp": 5
},
"handsontable": {
"stretchH": "last",
"readonly": false,
"manualColumnResize": true,
"contextMenu": {
"enabled": true,
"allowRowEdit": true,
Expand Down
6 changes: 3 additions & 3 deletions conf_times_miro/times_miro_io.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
},
"_scalars": {
"alias": "Input Scalars",
"symnames": ["gmssolver", "gmsreslim", "gmsbratio", "gmsbotime", "gmseotime", "gmsobj", "gmsrunlocation", "gmsrunmode"],
"symtext": ["Solver for TIMES", "Time limit for solve", "Basis indicator", "Adjustment for total available time span of years available in the model", "Adjustment for total available time span of years available in the model", "Choice of objective function formulations", "Location of Run file", "whether to create a MIRO scenario or solve TIMES"],
"symtypes": ["set", "parameter", "parameter", "parameter", "parameter", "set", "set", "set"],
"symnames": ["gmssolver", "gmsreslim", "gmsbratio"],
"symtext": ["Solver for TIMES", "Time limit for solve", "Basis indicator"],
"symtypes": ["set", "parameter", "parameter"],
"headers": {
"scalar": {
"type": "string",
Expand Down
Binary file modified data_times_miro/default.gdx
Binary file not shown.
Binary file added example/Schema.xlsx
Binary file not shown.
Binary file added example/Schema_Technology.xlsx
Binary file not shown.
Binary file added example/Schema_colors.xlsx
Binary file not shown.
Loading

0 comments on commit 6f8367e

Please sign in to comment.