Fill exogenous model data#
Among the whole CVXlab modeling process, this is the most time-consuming and
errors-prone step, especially for large models. Numerical data for exogenous
Data Tables are provided by the user in the blank input data file(s) generated
in the previous step and stored in the
<model_dir_name>/input_data directory by default.
Reading the generated input tables#
The generation options, file naming conventions, and supported combinations of
multiple_input_files and input_data_files_type are described in
Initialization of data structures.
Regardless of whether CVXlab exports one Excel workbook, multiple Excel files, or multiple CSV files, each exogenous data table follows the same normalized (long-format) structure: each row corresponds to one valid combination of coordinates of the Data Table, and the numerical value is stored in a single final column.
<id> |
<set_key_#>_Name |
… |
values |
|---|---|---|---|
<int> |
<str> |
<str> |
<int | float> |
Fields description
In each <data_table> tab, user fill input data the table above, structured
as follows:
Column name |
Description |
|---|---|
|
Unique identifier for each row. It is automatically generated by CVXlab and should not be modified by the user. |
|
Correspond to the names of all the Sets defining the coordinates of the Data Table. Entries in these columns are automatically generated and should not be modified by the user. |
|
Contains the numerical values of the Data Table. This is the only column that should be filled by the user. |
Notes#
Before start filling the data, it is recommended to carefully revise the model structure (i.e., Sets, related filters, definition of Data Tables, etc.). Indeed, every structural model change (such as, changing Sets coordinates or adding coordinates filters categories) will require SQLite database and input data file(s) to be re-generated from scratch.
When data structures are initialized, blank input data files are generated. In case of pre-existing version of such files, already be filled with data by the user, CVXlab prompts the user to choose whether to overwrite the existing file (and thus lose all the data already filled) or to keep it. It is suggested to keep a backup copy of the filled Excel file(s) before initializing data structures, to avoid losing data in case of accidental overwrite.