- Index
- » Programming
- » Modelica Language
- » how to access parameter from another...
how to access parameter from another model
how to access parameter from another model
I created two models A and B, in model A, its algorithm requires some parameters from model B to trigger a conditional event, vise versa for that in model B. So how do I gain the access to the parameters from another model and use that to trigger the events from the current model?
i.e.
model A
discrete x;
Boolean conditionA;
algorithm
when pre(conditionB) then
x := 3
end when
end A;
model B
discrete y ;
Boolean conditionB;
algorithm
when pre(conditionA) then
y := 5;
end when;
end B;
in this case, the model A need access to the Boolean variable "condition" in model B.
not sure if this is an appropriate example, please help me. thanks in advance!
- Index
- » Programming
- » Modelica Language
- » how to access parameter from another...