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

usage of the linearize() script

usage of the linearize() script

Hello,

When using the linearize function on my .mo object I get the following error

>> linearize("model.mo")
[<interactive>:1:1-1:0:writable] Error: Class linearize not found in scope <global scope> (looking for a function or record).

I'm using OMShell and using cd() I'm verifying that i'm in the correct folder. OMEdit version is 1.10. I've tried to first load the file, and the Modelica Library, without succes.

Does anyone know how I can resolve this issue?

Re: usage of the linearize() script

See here how to use the linearize function https://build.openmodelica.org/Document … arize.html

You need to first load the file using the loadFile API https://build.openmodelica.org/Document … dFile.html
Then call the linearize on your model.

For example if your model is named "M" then,
loadFile("model.mo")
linearize(M)

Adeel.

Re: usage of the linearize() script

Thanks for the quick reply and your help. It works :-)

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