diff --git a/assume/markets/clearing_algorithms/nodal_pricing.py b/assume/markets/clearing_algorithms/nodal_pricing.py index 89c127a1..717e0267 100644 --- a/assume/markets/clearing_algorithms/nodal_pricing.py +++ b/assume/markets/clearing_algorithms/nodal_pricing.py @@ -152,18 +152,24 @@ def clear( df_p_max_pu.update(p_max_pu) new_columns = p_max_pu.loc[:,~p_max_pu.columns.isin(df_p_max_pu.columns)] nodal_network.generators_t.p_max_pu = pd.concat([df_p_max_pu, new_columns], axis=1) + nodal_network.generators_t.p_max_pu.index.name = "snapshot" + nodal_network.generators_t.p_max_pu.columns.name = "Generator" # Update p_min_pu for generators df_p_min_pu = nodal_network.generators_t.p_min_pu df_p_min_pu.update(p_min_pu) new_columns = p_min_pu.loc[:,~p_min_pu.columns.isin(df_p_min_pu.columns)] nodal_network.generators_t.p_min_pu = pd.concat([df_p_min_pu, new_columns], axis=1) + nodal_network.generators_t.p_min_pu.index.name = "snapshot" + nodal_network.generators_t.p_min_pu.columns.name = "Generator" # Update marginal costs for generators df_costs = nodal_network.generators_t.marginal_cost df_costs.update(costs) new_columns = costs.loc[:,~costs.columns.isin(df_costs.columns)] nodal_network.generators_t.marginal_cost = pd.concat([df_costs, new_columns], axis=1) + nodal_network.generators_t.marginal_cost.index.name = "snapshot" + nodal_network.generators_t.marginal_cost.columns.name = "Generator" with suppress_output(): @@ -179,11 +185,9 @@ def clear( logger.error(f"Solver exited with {termination_condition}") raise Exception("Solver in redispatch market did not converge") - log_flows = True - # process dispatch data flows = self.process_dispatch_data( - network=nodal_network, orderbook_df=orderbook_df, log_flows=log_flows + network=nodal_network, orderbook_df=orderbook_df, log_flows=True ) # return orderbook_df back to orderbook format as list of dicts diff --git a/docker_configs/dashboard-definitions/ASSUME Comparison.json b/docker_configs/dashboard-definitions/ASSUME Comparison.json index cd17df9e..b165d5b3 100644 --- a/docker_configs/dashboard-definitions/ASSUME Comparison.json +++ b/docker_configs/dashboard-definitions/ASSUME Comparison.json @@ -26,14 +26,13 @@ "graphTooltip": 0, "id": 1, "links": [], - "liveNow": false, "panels": [ { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 6, "w": 24, @@ -50,7 +49,7 @@ "content": "# Welcome to our ASSUME Simulation Comparison Demo\n\nThis is the Grafana Dashboard helps you to compare the results of two simulation. Please note, this dashboard is still under development. Here you can visualize the differences between two simulations. So if some/most of the plots are 0 it just means that the results of your simulation are the same. \n\nYou are currently displaying the difference between:\n##### ${simulation_comp} - ${simulation}", "mode": "markdown" }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "title": "Overview Dashboard", "type": "text" }, @@ -68,9 +67,9 @@ "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" + "fieldConfig": { + "defaults": {}, + "overrides": [] }, "gridPos": { "h": 3, @@ -88,41 +87,8 @@ "content": "# Market-specific Data\n\nData specific for the market depending on the choice made at te top of the panel\n\n", "mode": "markdown" }, - "pluginVersion": "9.2.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n product_start AS \"time\",\n supply_volume\nFROM market_meta\nWHERE\n $__timeFilter(product_start)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "supply_volume" - ], - "type": "column" - } - ] - ], - "table": "market_meta", - "timeColumn": "product_start", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "pluginVersion": "11.3.1", + "title": "", "type": "text" }, { @@ -136,11 +102,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -149,6 +117,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -197,16 +166,18 @@ "showLegend": true }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", @@ -223,6 +194,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -445,11 +433,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -458,6 +448,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -511,7 +502,7 @@ "sort": "none" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -621,11 +612,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -634,6 +627,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -666,32 +660,7 @@ }, "unit": "megwatt" }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "Volume pp_4_1" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] + "overrides": [] }, "gridPos": { "h": 8, @@ -714,6 +683,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -835,6 +805,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -849,6 +820,9 @@ "lineWidth": 1, "scaleDistribution": { "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" } }, "mappings": [], @@ -912,6 +886,7 @@ "options": { "barRadius": 0, "barWidth": 0.97, + "fullHighlight": false, "groupWidth": 0.7, "legend": { "calcs": [], @@ -930,7 +905,7 @@ "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -978,7 +953,9 @@ "defaults": { "custom": { "align": "auto", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -1032,7 +1009,9 @@ }, "id": 76, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -1047,7 +1026,7 @@ } ] }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1139,6 +1118,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1210,11 +1190,11 @@ "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 3, "w": 24, @@ -1231,41 +1211,8 @@ "content": "# Unit Specific Data\n\nFor the chosen market and the chosen unit here the dispatch is displayed.", "mode": "markdown" }, - "pluginVersion": "9.2.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n \"Timestamp\" AS \"time\",\n volume\nFROM demand_meta\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "volume" - ], - "type": "column" - } - ] - ], - "table": "demand_meta", - "timeColumn": "\"Timestamp\"", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "pluginVersion": "11.3.1", + "title": "", "type": "text" }, { @@ -1279,11 +1226,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -1292,6 +1241,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" @@ -1348,12 +1298,14 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, @@ -1371,6 +1323,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "demand_meta", "timeColumn": "\"Timestamp\"", "timeColumnType": "timestamp", @@ -1387,12 +1356,13 @@ "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Gen_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\nleft join (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation_comp' AND\n unit in ($Gen_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", + "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation' AND\n unit in ($Gen_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\nleft join (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation_comp' AND\n unit in ($Gen_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", "refId": "B", "select": [ [ @@ -1404,6 +1374,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "demand_meta", "timeColumn": "\"Timestamp\"", "timeColumnType": "timestamp", @@ -1450,7 +1437,9 @@ }, "id": 26, "options": { + "afterRender": "", "content": "### General Information\n\nName: {{index}}
\nTechnology: {{technology}}
\n\n### Technical Specifications\nEmissions: {{emission_factor}} t/MWh
\nMaximum Power: {{max_power}} MW
\nMinimum Power: {{min_power}} MW
\nEfficiency: {{efficiency}}
\n\n##### Unit Operator: {{unit_operator}}\n ", + "contentPartials": [], "defaultContent": "The query didn't return any results.", "editor": { "format": "auto", @@ -1458,12 +1447,14 @@ "language": "markdown" }, "editors": [], - "everyRow": true, "externalScripts": [], "externalStyles": [], "helpers": "", - "styles": "" + "renderMode": "everyRow", + "styles": "", + "wrap": true }, + "pluginVersion": "5.4.0", "targets": [ { "datasource": { @@ -1513,11 +1504,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -1526,6 +1519,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1592,6 +1586,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1703,11 +1698,11 @@ "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 3, "w": 24, @@ -1724,41 +1719,8 @@ "content": "# Unit Specific Data\n\nFor the chosen market and the chosen unit here the dispatch is displayed.", "mode": "markdown" }, - "pluginVersion": "9.2.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n \"Timestamp\" AS \"time\",\n volume\nFROM demand_meta\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "volume" - ], - "type": "column" - } - ] - ], - "table": "demand_meta", - "timeColumn": "\"Timestamp\"", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "pluginVersion": "11.3.1", + "title": "", "type": "text" }, { @@ -1772,11 +1734,13 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -1785,6 +1749,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -1838,6 +1803,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1876,12 +1842,13 @@ "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\nleft join (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation_comp' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", + "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\nleft join (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation_comp' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", "refId": "B", "select": [ [ @@ -1893,6 +1860,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -1939,7 +1923,9 @@ }, "id": 37, "options": { + "afterRender": "", "content": "### General Information\n\nName: {{index}}
\nTechnology: {{technology}}
\n\n### Technical Specifications\nEmissions: {{emission_factor}} t/MWh
\nMaximum Power: {{max_power}} MW
\nMinimum Power: {{min_power}} MW
\nEfficiency: {{efficiency}}
\n\n##### Unit Operator: {{unit_operator}}\n ", + "contentPartials": [], "defaultContent": "The query didn't return any results.", "editor": { "format": "auto", @@ -1947,12 +1933,14 @@ "language": "markdown" }, "editors": [], - "everyRow": true, "externalScripts": [], "externalStyles": [], "helpers": "", - "styles": "" + "renderMode": "everyRow", + "styles": "", + "wrap": true }, + "pluginVersion": "5.4.0", "targets": [ { "datasource": { @@ -2001,11 +1989,11 @@ "id": 44, "panels": [ { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 3, "w": 24, @@ -2023,40 +2011,7 @@ "mode": "markdown" }, "pluginVersion": "9.2.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n \"Timestamp\" AS \"time\",\n volume\nFROM demand_meta\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "volume" - ], - "type": "column" - } - ] - ], - "table": "demand_meta", - "timeColumn": "\"Timestamp\"", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "title": "", "type": "text" }, { @@ -2104,8 +2059,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2179,7 +2133,7 @@ "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\njoin (\nSELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation_comp' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", + "rawSql": "select sim1.\"time\", sim2.\"dispatch\" - sim1.\"dispatch\" as \"dispatch\", sim1.unit from (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim1\njoin (\nSELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation_comp' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1\n) sim2\non sim1.unit = sim2.unit and sim1.time=sim2.time", "refId": "B", "select": [ [ @@ -2217,8 +2171,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2290,22 +2243,20 @@ } ], "repeat": "Storage_Units", - "repeatDirection": "h", "title": "Storage units data $Storage_Units", "type": "row" } ], - "refresh": false, - "schemaVersion": 37, - "style": "dark", + "preload": false, + "refresh": "", + "schemaVersion": 40, "tags": [], "templating": { "list": [ { "current": { - "selected": true, - "text": "learning_scenario_1_base", - "value": "learning_scenario_1_base" + "text": "example_01a_base", + "value": "example_01a_base" }, "datasource": { "type": "postgres", @@ -2313,23 +2264,19 @@ }, "definition": "SELECT \n simulation\nFROM power_plant_meta\ngroup by simulation;", "description": "Can choose which simulation we want to show ", - "hide": 0, "includeAll": false, - "multi": false, "name": "simulation", "options": [], "query": "SELECT \n simulation\nFROM power_plant_meta\ngroup by simulation;", "refresh": 1, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": true, - "text": "learning_scenario_2_base", - "value": "learning_scenario_2_base" + "text": "example_01a_base", + "value": "example_01a_base" }, "datasource": { "type": "postgres", @@ -2337,21 +2284,17 @@ }, "definition": "SELECT \n simulation\nFROM power_plant_meta\ngroup by simulation;", "description": "Simulation to which a comparison is made", - "hide": 0, "includeAll": false, - "multi": false, "name": "simulation_comp", "options": [], "query": "SELECT \n simulation\nFROM power_plant_meta\ngroup by simulation;", "refresh": 1, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, "text": "EOM", "value": "EOM" }, @@ -2361,23 +2304,23 @@ }, "definition": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "description": "Choose for which market the data is displayed", - "hide": 0, "includeAll": false, - "multi": false, "name": "market", "options": [], "query": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, - "text": "pp_1", - "value": "pp_1" + "text": [ + "Unit 1" + ], + "value": [ + "Unit 1" + ] }, "datasource": { "type": "postgres", @@ -2385,22 +2328,18 @@ }, "definition": "SELECT index\nFROM power_plant_meta\nwhere simulation = '$simulation';", "description": "Can choose which units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Gen_Units", "options": [], "query": "SELECT index\nFROM power_plant_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": true, "text": [ "demand_EOM" ], @@ -2414,25 +2353,20 @@ }, "definition": "SELECT index\nFROM demand_meta\nwhere simulation = '$simulation';", "description": "Can choose which units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Demand_Units", "options": [], "query": "SELECT index\nFROM demand_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" + "text": [], + "value": [] }, "datasource": { "type": "postgres", @@ -2440,16 +2374,13 @@ }, "definition": "SELECT index\nFROM storage_meta\nwhere simulation = '$simulation';", "description": "Can choose which storage units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Storage_Units", "options": [], "query": "SELECT index\nFROM storage_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" } @@ -2463,6 +2394,6 @@ "timezone": "", "title": "ASSUME: Compare scenarios", "uid": "vP8U8-q4k", - "version": 2, + "version": 5, "weekStart": "" -} +} \ No newline at end of file diff --git a/docker_configs/dashboard-definitions/ASSUME.json b/docker_configs/dashboard-definitions/ASSUME.json index 2ea384f7..a5ec97f0 100644 --- a/docker_configs/dashboard-definitions/ASSUME.json +++ b/docker_configs/dashboard-definitions/ASSUME.json @@ -26,14 +26,13 @@ "graphTooltip": 0, "id": 2, "links": [], - "liveNow": false, "panels": [ { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 4, "w": 24, @@ -50,7 +49,7 @@ "content": "# Welcome to our ASSUME demo\n\nThis is the Grafana Dashboard which makes interacting with the simulation data very easy.", "mode": "markdown" }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "title": "Overview Dashboard", "type": "text" }, @@ -68,9 +67,9 @@ "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" + "fieldConfig": { + "defaults": {}, + "overrides": [] }, "gridPos": { "h": 3, @@ -88,41 +87,8 @@ "content": "# Market-specific Data\n\nData specific for the market depending on the choice made at te top of the panel\n\n", "mode": "markdown" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n product_start AS \"time\",\n supply_volume\nFROM market_meta\nWHERE\n $__timeFilter(product_start)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "supply_volume" - ], - "type": "column" - } - ] - ], - "table": "market_meta", - "timeColumn": "product_start", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "pluginVersion": "11.3.1", + "title": "", "type": "text" }, { @@ -432,6 +398,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -613,6 +580,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -835,7 +803,7 @@ "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -968,7 +936,7 @@ } ] }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1061,6 +1029,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1132,11 +1101,11 @@ "type": "row" }, { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 3, "w": 24, @@ -1153,41 +1122,8 @@ "content": "# Unit Specific Data\n\nFor the chosen market and the chosen unit here the dispatch is displayed.", "mode": "markdown" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n \"Timestamp\" AS \"time\",\n volume\nFROM demand_meta\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "volume" - ], - "type": "column" - } - ] - ], - "table": "demand_meta", - "timeColumn": "\"Timestamp\"", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], + "pluginVersion": "11.3.1", + "title": "", "type": "text" }, { @@ -1278,6 +1214,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1286,7 +1223,7 @@ }, "format": "time_series", "group": [], - "hide": false, + "hide": true, "metricColumn": "none", "rawQuery": true, "rawSql": "SELECT\n $__timeGroupAlias(datetime,$__interval),\n avg(power) AS \"Market dispatch\",\n concat(unit_id, ' - ', market_id) as \"unit_id\"\nFROM market_dispatch\nWHERE\n $__timeFilter(datetime) AND\n simulation = '$simulation' AND\n unit_id in ($Gen_Units)\nGROUP BY 1, unit_id, power, market_id\nORDER BY 1", @@ -1317,12 +1254,13 @@ "type": "postgres", "uid": "P7B13B9DF907EC40C" }, - "format": "time_series", + "editorMode": "code", + "format": "table", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n $__timeGroupAlias(index,$__interval),\n avg(power) AS \"Actual dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Gen_Units)\nGROUP BY 1, unit, power\nORDER BY 1", + "rawSql": "SELECT\n time::timestamp,\n power,\n unit\nFROM unit_dispatch\nWHERE\n --$__timeFilter(index) AND\n simulation = '$simulation'\nORDER BY 1", "refId": "B", "select": [ [ @@ -1334,6 +1272,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "demand_meta", "timeColumn": "\"Timestamp\"", "timeColumnType": "timestamp", @@ -1534,7 +1489,7 @@ "sort": "desc" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1780,6 +1735,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -1952,18 +1908,19 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Gen_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Gen_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -1975,6 +1932,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -2103,18 +2077,19 @@ "sort": "none" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Gen_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Gen_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -2126,6 +2101,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -2239,12 +2231,14 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", @@ -2261,6 +2255,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "demand_meta", "timeColumn": "\"Timestamp\"", "timeColumnType": "timestamp", @@ -2277,12 +2288,13 @@ "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"Actual dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1", + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"Actual dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY 1, unit, power\nORDER BY 1", "refId": "B", "select": [ [ @@ -2294,6 +2306,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -2494,7 +2523,7 @@ "sort": "desc" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -2684,19 +2713,20 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n -energy_cashflow AS \"Cashflow\",\r\n unit\r\nFROM unit_dispatch d\r\nWHERE\r\n $__timeFilter(index) AND\r\n d.simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, power\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n -energy_cashflow AS \"Cashflow\",\r\n unit\r\nFROM unit_dispatch d\r\nWHERE\r\n $__timeFilter(time) AND\r\n d.simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, power\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -2708,6 +2738,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -2837,6 +2884,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -2944,19 +2992,20 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "table", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n sum(energy_cashflow)/sum(power) as \"Price per MW\",\n unit\nFROM unit_dispatch d\nWHERE\n $__timeFilter(index) AND\n d.simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY unit\nORDER BY 1", + "rawSql": "SELECT\n sum(energy_cashflow)/sum(power) as \"Price per MW\",\n unit\nFROM unit_dispatch d\nWHERE\n $__timeFilter(time) AND\n d.simulation = '$simulation' AND\n unit in ($Demand_Units)\nGROUP BY unit\nORDER BY 1", "refId": "A", "select": [ [ @@ -2968,6 +3017,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -3035,19 +3101,20 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n -power*1e3 as \"Volume\",\r\n unit\r\nFROM unit_dispatch d\r\nWHERE\r\n $__timeFilter(index) AND\r\n d.simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, power\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n -power*1e3 as \"Volume\",\r\n unit\r\nFROM unit_dispatch d\r\nWHERE\r\n $__timeFilter(time) AND\r\n d.simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, power\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -3059,6 +3126,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -3176,17 +3260,19 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n -energy_cashflow AS \"Cashflow\",\r\n -energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n -energy_cashflow AS \"Cashflow\",\r\n -energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Demand_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -3198,6 +3284,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -3311,12 +3414,14 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", @@ -3333,6 +3438,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "demand_meta", "timeColumn": "\"Timestamp\"", "timeColumnType": "timestamp", @@ -3349,12 +3471,13 @@ "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "hide": false, "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n $__timeGroupAlias(index,$__interval),\n power AS \"Actual dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(index) AND\n simulation = '$simulation' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1", + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n power AS \"Actual dispatch\",\n unit\nFROM unit_dispatch\nWHERE\n $__timeFilter(time) AND\n simulation = '$simulation' AND\n unit in ($Storage_Units)\nGROUP BY 1, unit, power\nORDER BY 1", "refId": "B", "select": [ [ @@ -3366,6 +3489,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -3553,6 +3693,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -3564,7 +3705,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n SOC AS \"State of Charge\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, SOC\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n SOC AS \"State of Charge\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, SOC\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -3732,7 +3873,7 @@ "sort": "desc" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -3987,6 +4128,7 @@ "sort": "none" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -4177,18 +4319,19 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -4200,6 +4343,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -4328,18 +4488,19 @@ "sort": "none" } }, - "pluginVersion": "9.2.15", + "pluginVersion": "11.3.1", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "time_series", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\r\n $__timeGroupAlias(index,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(index) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", + "rawSql": "SELECT\r\n $__timeGroupAlias(time,$__interval),\r\n energy_cashflow AS \"Cashflow\",\r\n energy_marginal_costs AS \"Production costs\",\r\n energy_cashflow - energy_marginal_costs AS \"Profit\",\r\n unit\r\nFROM unit_dispatch\r\nWHERE\r\n $__timeFilter(time) AND\r\n simulation = '$simulation' AND\r\n unit in ($Storage_Units)\r\nGROUP BY 1, unit, energy_cashflow, energy_marginal_costs\r\nORDER BY 1", "refId": "A", "select": [ [ @@ -4351,6 +4512,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "market_dispatch", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -4367,16 +4545,16 @@ "type": "timeseries" } ], + "preload": false, "refresh": "", - "schemaVersion": 39, + "schemaVersion": 40, "tags": [], "templating": { "list": [ { "current": { - "selected": false, - "text": "example_02e_base", - "value": "example_02e_base" + "text": "example_01a_base", + "value": "example_01a_base" }, "datasource": { "type": "postgres", @@ -4384,21 +4562,17 @@ }, "definition": "SELECT simulation\nFROM market_meta", "description": "Can choose which simulation we want to show ", - "hide": 0, "includeAll": false, - "multi": false, "name": "simulation", "options": [], "query": "SELECT simulation\nFROM market_meta", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, "text": "EOM", "value": "EOM" }, @@ -4408,23 +4582,23 @@ }, "definition": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "description": "Choose for which market the data is displayed", - "hide": 0, "includeAll": false, - "multi": false, "name": "market", "options": [], "query": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, - "text": "pp_1", - "value": "pp_1" + "text": [ + "Unit 1" + ], + "value": [ + "Unit 1" + ] }, "datasource": { "type": "postgres", @@ -4432,24 +4606,24 @@ }, "definition": "SELECT index\nFROM power_plant_meta\nwhere simulation = '$simulation';", "description": "Can choose which units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Gen_Units", "options": [], "query": "SELECT index\nFROM power_plant_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, - "text": "demand_EOM", - "value": "demand_EOM" + "text": [ + "demand_EOM" + ], + "value": [ + "demand_EOM" + ] }, "datasource": { "type": "postgres", @@ -4457,28 +4631,20 @@ }, "definition": "SELECT index\nFROM demand_meta\nwhere simulation = '$simulation';", "description": "Can choose which units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Demand_Units", "options": [], "query": "SELECT index\nFROM demand_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": true, - "text": [ - "Storage 1" - ], - "value": [ - "Storage 1" - ] + "text": [], + "value": [] }, "datasource": { "type": "postgres", @@ -4486,24 +4652,21 @@ }, "definition": "SELECT index\nFROM storage_meta\nwhere simulation = '$simulation';", "description": "Can choose which storage units we want to display ", - "hide": 0, "includeAll": false, - "label": "", "multi": true, "name": "Storage_Units", "options": [], "query": "SELECT index\nFROM storage_meta\nwhere simulation = '$simulation';", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" } ] }, "time": { - "from": "2019-03-01T00:00:00.000Z", - "to": "2019-04-30T23:59:59.000Z" + "from": "2019-01-01T02:50:49.533Z", + "to": "2019-01-03T00:53:27.762Z" }, "timepicker": { "refresh_intervals": [ @@ -4518,6 +4681,6 @@ "timezone": "utc", "title": "ASSUME: Main overview", "uid": "mQ3Lvkr4k", - "version": 4, + "version": 3, "weekStart": "" -} +} \ No newline at end of file diff --git a/docker_configs/dashboard-definitions/ASSUME_nodal.json b/docker_configs/dashboard-definitions/ASSUME_nodal.json index a9f31987..06c3589e 100644 --- a/docker_configs/dashboard-definitions/ASSUME_nodal.json +++ b/docker_configs/dashboard-definitions/ASSUME_nodal.json @@ -24,16 +24,15 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 1, + "id": 4, "links": [], - "liveNow": false, "panels": [ { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 4, "w": 24, @@ -50,81 +49,10 @@ "content": "# Nodal Analysing Board\n\nThis board can be used to visualize the Grid statistics and usage.\nAs well as the prices at different locations of the grid.", "mode": "markdown" }, - "pluginVersion": "11.0.0", + "pluginVersion": "11.3.1", "title": "Nodal Dashboard", "type": "text" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 30, - "panels": [], - "title": "Market Data", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 5 - }, - "id": 17, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "# Market-specific Data\n\nData specific for the market depending on the choice made at te top of the panel\n\n", - "mode": "markdown" - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P7B13B9DF907EC40C" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n product_start AS \"time\",\n supply_volume\nFROM market_meta\nWHERE\n $__timeFilter(product_start)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "supply_volume" - ], - "type": "column" - } - ] - ], - "table": "market_meta", - "timeColumn": "product_start", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "text" - }, { "datasource": { "type": "postgres", @@ -143,20 +71,37 @@ "color": "green", "value": null }, + { + "color": "#EAB839", + "value": 0.5 + }, { "color": "red", - "value": 80 + "value": 0.8 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "usage" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] }, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 8 + "y": 4 }, "id": 101, "options": { @@ -180,6 +125,7 @@ "clusterMinDistance": 0, "clusterValue": "size", "color": { + "field": "usage", "fixed": "dark-green" }, "enableGradient": false, @@ -199,7 +145,7 @@ "displayProperties": [ "bus0", "bus1", - "s_nom" + "usage" ], "location": { "geohash": "geometry", @@ -208,7 +154,7 @@ }, "name": "Grid Data", "query": "A", - "titleField": "bus0", + "titleField": "name", "type": "markers" } ], @@ -219,18 +165,19 @@ "zoom": 5 } }, - "pluginVersion": "9.2.15", + "pluginVersion": "1.4.4", "targets": [ { "datasource": { "type": "postgres", "uid": "P7B13B9DF907EC40C" }, + "editorMode": "code", "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n bus0, bus1, s_nom, ST_AsGeoJSON(ST_GeomFromEWKT(wkt_srid_4326)) as geometry, simulation\nFROM lines_geo\nwhere simulation = '$simulation' \nORDER BY 1", + "rawSql": "SELECT\n datetime, coalesce(abs(flow),0)/s_nom as \"usage\", l.line as name, bus0, bus1, ST_AsGeoJSON(ST_GeomFromEWKT(wkt_srid_4326)) as geometry, l.simulation\nFROM lines_geo l\nleft join grid_flows g on l.line = g.line and l.simulation = g.simulation\nWHERE\n $__timeFilter(datetime) AND\nl.simulation = '$simulation'\nORDER BY 1\n", "refId": "A", "select": [ [ @@ -242,6 +189,23 @@ } ] ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, "table": "lines_geo", "timeColumn": "datetime", "timeColumnType": "timestamp", @@ -251,6 +215,243 @@ "title": "Grid Information", "type": "orchestracities-map-panel" }, + { + "datasource": { + "type": "postgres", + "uid": "P7B13B9DF907EC40C" + }, + "description": "Overview of nodal results", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatt" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 103, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.3.1", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "P7B13B9DF907EC40C" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + }, + { + "params": [ + "unit_id" + ], + "type": "column" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroupAlias(datetime, $__interval), line, avg(flow) as flow from grid_flows where simulation = '$simulation'\nAND $__timeFilter(datetime)\nGROUP BY 1, line\nORDER BY 1;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "price" + ], + "type": "column" + }, + { + "params": [ + "avg" + ], + "type": "aggregate" + }, + { + "params": [ + "price" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "unit_id" + ], + "type": "column" + }, + { + "params": [ + "unit_id" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "market_orders", + "timeColumn": "start_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "text", + "name": "", + "params": [ + "market_id", + "=", + "'$market'" + ], + "type": "expression" + }, + { + "datatype": "text", + "name": "", + "params": [ + "simulation", + "=", + "'$simulation'" + ], + "type": "expression" + } + ] + } + ], + "title": "Grid Flows Nodal", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 30, + "panels": [], + "title": "Market Data", + "type": "row" + }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 17, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "# Market-specific Data\n\nData specific for the market depending on the choice made at te top of the panel\n\n", + "mode": "markdown" + }, + "pluginVersion": "11.3.1", + "title": "", + "type": "text" + }, { "datasource": { "type": "grafana-postgresql-datasource", @@ -336,7 +537,7 @@ "h": 8, "w": 24, "x": 0, - "y": 16 + "y": 17 }, "id": 11, "maxPerRow": 4, @@ -436,6 +637,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -466,7 +668,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -482,7 +685,7 @@ "h": 9, "w": 12, "x": 0, - "y": 24 + "y": 25 }, "id": 19, "options": { @@ -499,6 +702,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -614,6 +818,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", @@ -644,7 +849,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -660,7 +866,7 @@ "h": 9, "w": 12, "x": 12, - "y": 24 + "y": 25 }, "id": 20, "options": { @@ -677,6 +883,7 @@ "sort": "desc" } }, + "pluginVersion": "11.3.1", "targets": [ { "datasource": { @@ -775,15 +982,15 @@ "type": "timeseries" } ], - "schemaVersion": 39, + "preload": false, + "schemaVersion": 40, "tags": [], "templating": { "list": [ { "current": { - "selected": false, - "text": "example_01d_base", - "value": "example_01d_base" + "text": "example_01d_nodal_case", + "value": "example_01d_nodal_case" }, "datasource": { "type": "postgres", @@ -791,21 +998,17 @@ }, "definition": "SELECT simulation\nFROM market_meta", "description": "Can choose which simulation we want to show ", - "hide": 0, "includeAll": false, - "multi": false, "name": "simulation", "options": [], "query": "SELECT simulation\nFROM market_meta", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": { - "selected": false, "text": "DAM", "value": "DAM" }, @@ -815,25 +1018,21 @@ }, "definition": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "description": "Choose for which market the data is displayed", - "hide": 0, "includeAll": false, - "multi": false, "name": "market", "options": [], "query": "SELECT \n market_id\nFROM market_meta\nwhere simulation='$simulation'\ngroup by market_id ;", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "type": "query" } ] }, "time": { - "from": "2019-01-01T23:00:00.000Z", - "to": "2019-01-06T22:59:59.000Z" + "from": "2018-12-31T23:00:00.000Z", + "to": "2019-01-08T23:00:00.000Z" }, - "timeRangeUpdatedDuringEditOrView": false, "timepicker": { "refresh_intervals": [ "5s", @@ -847,6 +1046,6 @@ "timezone": "", "title": "ASSUME - Nodal view", "uid": "nodalview", - "version": 2, + "version": 21, "weekStart": "" -} +} \ No newline at end of file diff --git a/docker_configs/datasources/datasource.yml b/docker_configs/datasources/datasource.yml index d65932ad..00080fc3 100644 --- a/docker_configs/datasources/datasource.yml +++ b/docker_configs/datasources/datasource.yml @@ -22,7 +22,7 @@ datasources: password: assume jsonData: sslmode: "disable" - postgresVersion: 1200 + postgresVersion: 1600 timescaledb: true isDefault: true editable: true diff --git a/examples/inputs/example_01d/config.yaml b/examples/inputs/example_01d/config.yaml index 9829c7a3..79e85541 100644 --- a/examples/inputs/example_01d/config.yaml +++ b/examples/inputs/example_01d/config.yaml @@ -4,7 +4,7 @@ base: start_date: 2019-01-01 00:00 - end_date: 2019-01-06 00:00 + end_date: 2019-01-02 00:00 time_step: 1h save_frequency_hours: 24 diff --git a/examples/inputs/example_01d/lines.csv b/examples/inputs/example_01d/lines.csv index 3f7d5959..37f8d64c 100644 --- a/examples/inputs/example_01d/lines.csv +++ b/examples/inputs/example_01d/lines.csv @@ -1,4 +1,4 @@ -Line,bus0,bus1,s_nom,x,r +line,bus0,bus1,s_nom,x,r Line_N_S_1,north_1,south,5000.0,0.01,0.001 Line_N_S_2,north_2,south,5000.0,0.01,0.001 Line_N_N,north_1,north_2,5000.0,0.01,0.001