Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

How to use conditional input for model with coupled state variables

How to use conditional input for model with coupled state variables

Dear,


In my case, I want to use conditional input for model which consists of fully coupled state variables.
I have tried,
                   if use fixed input, it works well;
                   if use non-fully coupled state variables, it works well;
Below is a simple example from my real project:
Could anyone give me some suggestions?



model test

Real x,y,z;
Real I;

equation


if y< 4 then
  I =10;
else
  I = -10;
end if;

der(x) = 5*z + I;
z+y = 4;
y = 2*x;



end test;

There are 0 guests and 0 other users also viewing this topic
You are here: