Closed paciorek closed 1 year ago
Per discussion in NCT issue 457, this approach won't work because it prevents use of setInits
to generally change values.
See next PR that avoids the RHSonly as data issue and simply addresses determ nodes as data.
This fixes issues #1324 and #1326 by:
setData
withsetInits
if the value fromsetData
is NA.setData
insetInits
and thesetInits
value is different from thesetData
value and not NA.includeRHSonly
flag toisDeterm
with defaultFALSE
and then updating some uses ofisDeterm
in our codebase to setincludeRHSonly
to TRUE.varValue
(when checking for deterministic data) andisDataVarValue
(when setting data flags) usingeval
with the scalar node names (similar to howisDataFromGraphID
works). This avoids setting the data flag to TRUE for deterministic and RHSonly elements of a variable that has data elements. Note that positions inisDataEnv$x
can still be TRUE for positions that do not correspond to any nodes (e.g., ifx[1]
is not defined at all in the model, but the user provides a non-NA value forx[1]
insetData
).Note that I have not yet added various tests, in particular the CR-type example where there are undefined nodes in a variable, such as
y[i, 3:6]
defined buty[i, 1:2]
undefined. I will also review the changes again carefully.