- Index
- » Programming
- » Modelica Language
- » How to avoid unwanted solutions for...
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 :-)
- Index
- » Programming
- » Modelica Language
- » How to avoid unwanted solutions for...