Reputation: 45
Please help me with a simple task.
I have the function delta=f(time). See the picture.
I need to find value of "time" when "delta" became zero and assign the time's value to some parameter. For example-I can see on the picture that the time which match with delta=0 is approximately 9.3. I can assign to Real variable X=9.3. But can I do it automatically? I mean can Modelica can asign 9.3 to X?
P.S. I use when/while/if statement, but they works until duration, but I need to find a single event (when delta=0).
Upvotes: 1
Views: 76
Reputation: 9421
I don't understand your PS. A when
clause is the way to do this, and it is simple:
Real X;
equation
when delta<=0 then
X := time;
end when;
What's the problem with that?
Upvotes: 3