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

Is addEquation supported?

Is addEquation supported?

I spotted following line in OpenModelicaSystem.pdf

addEquation(A1<cref>,A2<expr>, A3<expr>)(??NotYetImplemented)
Adds the equation A2=A3 to the model named by A1.

I tried following script, but no luck. Any help will be appreciated.


class MyClass
    Real a;
end MyClass;

addEquation(MyClass, a, 10);

then I call list(); the equation was not added in.

I also tried

addEquation(MyClass, Code(a), Code(10));

still fail.

--------------------------------------

My question:
Is addEquation supported?
How can I add equation dynamically?

Edited by: milesma - Sep-28-15 05:59:38
There are 0 guests and 0 other users also viewing this topic