|
1 | | -# Copyright 2016-2023 Blue Marble Analytics LLC. |
2 | | -# |
3 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | -# you may not use this file except in compliance with the License. |
5 | | -# You may obtain a copy of the License at |
6 | | -# |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
8 | | -# |
9 | | -# Unless required by applicable law or agreed to in writing, software |
10 | | -# distributed under the License is distributed on an "AS IS" BASIS, |
11 | | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | -# See the License for the specific language governing permissions and |
13 | | -# limitations under the License. |
14 | | - |
15 | | -""" |
16 | | -All tables names in the GridPath database start with one of seven prefixes: |
17 | | -:code:`mod_`, :code:`subscenario_`, :code:`inputs_`, :code:`scenarios`, |
18 | | -:code:`options_`, :code:`status_`, or :code:`ui_`. This structure is meant to |
19 | | -organize the tables by their function. Below are descriptions of each table |
20 | | -type and its role, and of the kind of data tables of this type contain. |
21 | | -
|
22 | | -*********************** |
23 | | -The :code:`mod_` Tables |
24 | | -*********************** |
25 | | -The :code:`mod_` should not be modified except by developers. These contain |
26 | | -various data used by the GridPath platform to describe available |
27 | | -functionality, help enforce input data consistency and integrity, and aid in |
28 | | -validation. |
29 | | -
|
30 | | -*************************************************** |
31 | | -The :code:`subscenario_` and :code:`inputs_` Tables |
32 | | -*************************************************** |
33 | | -Most tables in the GridPath database have the :code:`subscenario_` and |
34 | | -:code:`inputs_` prefix. With a few exceptions, for each :code:`subscenario_` |
35 | | -table, there is a respective :code:`inputs_` table (i.e. the tables have the |
36 | | -same name except for the prefix). This is because the :code:`subscenario_` |
37 | | -tables contain the descriptions of the input data contained in the |
38 | | -:code:`inputs_` tables. For example the :code:`inputs_system_load` may |
39 | | -contain three different load profiles -- low, mid, and high; the |
40 | | -:code:`subscenarios_system_load` will then contain three rows, one for each |
41 | | -load profile, with its description and ID. The pairs of :code:`subscenario_` |
42 | | -and :code:`inputs_` are linked via an ID column: in the case of the system |
43 | | -load tables, that is the :code:`load_scenario_id` column. We call these |
44 | | -shared table keys *subscenario IDs*, as we use them to create a full |
45 | | -GridPath scenario in the :code:`scenarios` table. |
46 | | -
|
47 | | -*************************** |
48 | | -The :code:`scenarios` Table |
49 | | -*************************** |
50 | | -In GridPath, we use the term 'scenario' to describe a model run with a |
51 | | -particular set of inputs. Some of those inputs stay the same from scenario to |
52 | | -scenario and others we vary to understand their effect on the results. For |
53 | | -example, we could keep some input types like the zonal and transmission |
54 | | -topography, temporal resolution, resource availability, and policy |
55 | | -requirements the same across scenarios, but vary other input types, e.g. the |
56 | | -load profile, the cost of solar, and the operational characteristics of coal, |
57 | | -to create different scenarios. We call each of those inputs types a |
58 | | -'subscenario' since they are the building blocks of a full scenario. In |
59 | | -GridPath, you can create a scenario by populating a row of the |
60 | | -:code:`scenarios` table. The columns of the :code:`scenarios` table are |
61 | | -linked one of the 'building blocks' -- the data in :code:`inputs_` tables -- |
62 | | -via the respective *subscenario ID*. |
63 | | -
|
64 | | -For example, the :code:`load_scenario_id` column of the :code:`scenarios` table |
65 | | -references the :code:`load_scenario_id` column of the |
66 | | -:code:`subscenarios_system_load` table, which in turn determines which load |
67 | | -profile contained in the :code:`inputs_system_load` table the scenario |
68 | | -should use. In our example with three different load profiles, the data for |
69 | | -which are contained in the :code:`inputs_system_load` table, |
70 | | -:code:`subscenarios_system_load` will contain three rows with values of 1, |
71 | | -2, and 3 respectively in the :code:`load_scenario_id` column; in the |
72 | | -:code:`scenarios` table, the user would then be able to select a value of 1, |
73 | | -2, or 3 in the :code:`load_scenario_id` column to determine which load |
74 | | -profile the scenario should use. Similarly, we would select the solar costs |
75 | | -to use in the scenario via the :code:`projects_new_cost_scenario_id` column |
76 | | -of the :code:`scenarios` table (which is linked to the |
77 | | -:code:`subscenarios_project_new_cost` and :code:`inputs_project_new_cost` |
78 | | -tables) and the operational characteristics of coal to use via the |
79 | | -:code:`project_operational_chars_scenario_id` column (which is linked to the |
80 | | -:code:`subscenarios_project_operational_chars` and |
81 | | -:code:`inputs_project_operational_chars` tables). |
82 | | -
|
83 | | -*************************** |
84 | | -The :code:`options_` Tables |
85 | | -*************************** |
86 | | -Some GridPath run options can be specified via the database in the |
87 | | -:code:`options_` tables. Currently, this includes the solver options that |
88 | | -can be specified for a scenario run |
89 | | -
|
90 | | -************************** |
91 | | -The :code:`status_` Tables |
92 | | -************************** |
93 | | -GridPath keeps track of scenario validation and run status. The scenario |
94 | | -status is recorded in the :code:`scenarios` table (in the |
95 | | -:code:`validation_status_id` and :code:`run_status_id` columns) and an |
96 | | -additional detail can be found in the :code:`status_` tables. Currently, |
97 | | -this includes a single table: the :code:`status_validation` table, which |
98 | | -contains information about errors encountered during validation for each |
99 | | -scenario that has been validated. |
100 | | -
|
101 | | -********************** |
102 | | -The :code:`ui_` Tables |
103 | | -********************** |
104 | | -The :code:`ui_` tables are used to include and exclude components of the |
105 | | -GridPath user interface. |
106 | | -
|
107 | | -*********************** |
108 | | -The :code:`viz_` Tables |
109 | | -*********************** |
110 | | -The :code:`viz_` tables are used in the GridPath visualization suite, for |
111 | | -instance when determining in which color and order to plot the technologies in |
112 | | -the dispatch plot. |
113 | | -
|
114 | | -
|
115 | | -""" |
0 commit comments