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

How to avoid unwanted solutions for variables

How to avoid unwanted solutions for variables

Hello all

I have a model with variables that can have more than one solution. To try to avoid this, I have used the min and max when declaring the variable. However Modelica just informs that the min or max has been passed, but it does not try to avoid the unwanted solutions.

Do you know how to "force" the system to use the right solutions, or tricks to avoid ths?

Best regards
Koldo

Re: How to avoid unwanted solutions for variables

I think it really depends on the situation that you have. Can you give an example?

Re: How to avoid unwanted solutions for variables

Well, I think the question is relevant. However in my case I have found the root cause of the problem: a couple of tan() functions. Just replacing tan() with atan2(), the problem has been solved, because tan() introduces artificial discontinuities and multiple solutions. Certainly, after analising the case and reading this, tan() function is as dangerous as a bag of bombs :-)

Edited by: Koldo - Sep-11-14 06:41:09
There are 0 guests and 0 other users also viewing this topic
You are here: