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
  • Index
  • » Users
  • » robarn
  • » Profile

Posts

Posts

Thank you!

I forgot to use: setCommandLineOptions("-g=Optimica");

Now it works

Thank you for your help, ElMastro
This is what I was trying but it doesn't work
I tried to change the working directory in OMEdit and also in Compiler CLI. But the error is the same. I will keep on trying.

May you tell me what version of OpenModelica and OMEdit are you using? In my case:
OMEdit v1.13.2 (64-bit) - Connected to v1.13.2 (64-bit)
And I am working on a folder without spaces or symbols in its name

Or maybe you can send me an image of the Compiler CLI window after the execution of the optimization command (the three lines)

Thank you

I have always used OMShell instead of Compiler CLI
How do you run the three lines of "optimization ..." in the Compiler CLI?
I always get the error:

Code:


"Error occurred building AST
Syntax Error
[<interactive>:1:0-1:12:writable] Error: Parser error: Unexpected token near: optimization (IDENT)"

I have tried to run it in the command line and also as a script. In this second case I obtain "Failed" as output of the runScript command

Sorry ElMastro

I don't understand your question.
Once you run "optimize(nmpcBatchReactor, numberOfIntervals=16, stopTime=1, tolerance=1e-8) " I see that you obtain a correct execution: LOG_SUCCESS. And your log for results it seems correct
So I don't know why you receive "Error occurred building AST Syntax Error"
When I run the optimize funcion I obtaint a result log similar to yours and I can access the .mat results file without problem

Best regards

Hello

I'm trying to use IpOpt for dynamic optimization of an electrical model created with OMEdit but I always get the "Failed to build model:" message

I could complete the BatchReactor.mo example of the User's guide but the optimization for the attached simple example always fail
PruebaRLIpOpt.mo

The model can be loaded in the shell but the optimization command returns error:

optimize(nmpcPruebaRL, numberOfIntervals=16,stopTime=1,tolerance=1e-8)

Can someone provide an example of using OpIpt with a model built with OMEdit? Or any idea about how I should create my optimization problem?

Thank you

  • Index
  • » Users
  • » robarn
  • » Profile
You are here: