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!
collocation optimization algorithm does not support models with events
Mon, 2012-03-26 09:31
#1
collocation optimization algorithm does not support models with events
Mon, 2012-03-26 20:43
#2
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.
Thu, 2012-03-29 11:27
#3
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
Thu, 2012-03-29 11:52
#4
Thank you. I'v solved the
Thank you. I'v solved the problem.