Closed joseph03choi closed 3 months ago
Please provide a complete MWE. There isn't enough code here to reproduce the problem (e.g. PIcontroller
references Stream
and ValveSignal
which aren't defined here)
Closing unless code shows up that allows for reproducing. Indeed I have no idea how to get the error that is being referenced here.
@discrete_events
or@continuous_events
can not "see" connector variables from outside components or its own component variables. Example component:I'm able to connect all my components, use
@mtkbuild
, and create anODEProblem()
, but when I get tosolve()
, I getERROR: UndefVarError: picontroller₊readingsIn₊c_B not defined
. I’ve isolated@discrete_events
as the issue here because whenever I replacereadingsIn.c_B
in the@discrete_events
block with some number, everything is able to run properly (although I get the wrong solution of course).Similarly,
@discrete_events
or@continuous_events
can not see its own component variables unless it has a derivative term. For example:@discrete_events
can't see the variableB
, and I getERROR: UndefVarError: picontroller₊B not defined
.@discrete_events
can only seeB
if I do something likeD(B) ~ 0
, but then I can’t doB ~ readingsIn.c_B
because @mtkbuild will tell me I have too many equations.