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

OpenModelica.Scripting.simulate not found

OpenModelica.Scripting.simulate not found

Hi!

After installing OpenModelica 1.7.0 RC1 I get following errors when using simulate or buildModel in .mos -files in windows command prompt:

{"Error: Class OpenModelica.Scripting.simulate not found in scope <global scope> (looking for a function or record).", "TRANSLATION", "Error", "3"}

Example .mos -file:
loadFile("testi2.mo");
simulate(Model1, startTime=0,stopTime=1, numberOfIntervals=10, method="euler", outputFormat="plt");
getErrorString();

The model is simulated even though the error is shown, but I would like to get rid of the error message. What could be the reason for the errors?

Thanks!

-Teemu

Re: OpenModelica.Scripting.simulate not found

You are running the mos-script with +showErrorMessages, which will print anything added to the error buffer as soon as it can.
This is only really useful when debugging the compiler itself since these error-messages will be rolled back during the normal course of the compiler (it will try to perform an action just to see if it can). I believe the flag will also cause getErrorString() to always return the empty string current/smile

Re: OpenModelica.Scripting.simulate not found

Thanks for the fast and good reply! I got rid of +showErrorMessages, since I clearly don't need it.

-Teemu

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