Two-dimensional constant lists with an index on the LHS do not generate code correctly. For instance, this model:
DimA: A1, A2, A3 ~~|
DimB: B1, B2 ~~|
DimC: C1, C2 ~~|
p[DimA, DimB, C1]=
0, 0;
0, 0;
0, 0;
~~|
emits the following error message when generating C code:
_p[_a1,_b1] → _p[0][0] not found in C names
The LHS only contains the dimension subscripts, thus the search through C names that contain all three subscripts fails. Constant lists are separated into individual equations that assign one constant value to each combination of subscripts resolved into indices. The code generator assumes that only the separation dimensions are present on the LHS.
Two-dimensional constant lists with an index on the LHS do not generate code correctly. For instance, this model:
emits the following error message when generating C code:
The LHS only contains the dimension subscripts, thus the search through C names that contain all three subscripts fails. Constant lists are separated into individual equations that assign one constant value to each combination of subscripts resolved into indices. The code generator assumes that only the separation dimensions are present on the LHS.