collocation optimization algorithm does not support models with events

4 posts / 0 new
Last post
Gary
Offline
Joined: 2011-01-18
collocation optimization algorithm does not support models with events

Hi
How can I set up  a  variable TL, when time<=1 is 0, else is 1. I can run the example in the Dymola with "TL=0+(if time<1 then 0 else 1);", but in the JModelica.org , there is an Exception: The collocation optimization algorithm does not support models with events. Please consider using the noEvent()  operator or rewriting the model.
 I don`t know how to deal with this problem.
I need your help.
Thank you!
 

fredrik
Offline
Joined: 2011-08-26
I have very little knowledge

I have very little knowledge regarding this, but the following might work:
 
TL=noEvent(if time<1 then 0 else 1);
 
Feel free to try it, or wait for someone who is more knowledgeable to reply.

jakesson
Offline
Joined: 2009-03-14
Hi Gary,   Fredrik's

Hi Gary,
 
Fredrik's suggestion should work. Discontinuities are usually difficult to handle in optimization problems, but thare are exceptions, like time dependent switches in fixed horizon optimal control problems.
 
Best
/Johan

Gary
Offline
Joined: 2011-01-18
Thank you. I'v solved the

Thank you. I'v solved the problem.

Login or register to post comments