You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct data variables read from an Excel or CSV file may have a dimension on the LHS. In this case, the data is a 2D matrix with time on one axis and the dimension indices on the other axis. We handled this before, but assumed that there would be just one subscript on the LHS, and took the first one as the dimension to apply the data table to. But if there is more than one subscript, this can fail if the subscript is not the first one. For instance, in this model:
DimA: A1, A2 ~~|
DimB: B1, B2 ~~|
i[A1, DimB] = GET DIRECT DATA('e_data.csv', ',', 'A', 'B2') ~~|
j[A1, DimB] = i[A1, DimB] ~~|
FINAL TIME = 2050 ~~|
INITIAL TIME = 1990 ~~|
TIME STEP = 1 ~~|
SAVEPER = TIME STEP ~~|
the dimension for the table data is the second subscript, and the wrong column is read from the table.
The text was updated successfully, but these errors were encountered:
Instead of assuming that the first subscript is the one to use for the data, consult the separationDims property in the variable, and then find the subscript that uses that dimension. It will be an index that was previously separated on the dimension. Use the numeric index value to offset to the correct row or column in the table.
Direct data variables read from an Excel or CSV file may have a dimension on the LHS. In this case, the data is a 2D matrix with time on one axis and the dimension indices on the other axis. We handled this before, but assumed that there would be just one subscript on the LHS, and took the first one as the dimension to apply the data table to. But if there is more than one subscript, this can fail if the subscript is not the first one. For instance, in this model:
the dimension for the table data is the second subscript, and the wrong column is read from the table.
The text was updated successfully, but these errors were encountered: