Sorry, my problem has nothing to do with if-expressions I think my
problem is that I have initiated (in the protected section) variables
with the same name because I thought they were truly local to the
class.  Is there a possibility to specify local variable in OM?

Thanks

     Dieter

dieter <[EMAIL PROTECTED]> writes:

> Hi,
>
> I try to restrict a variable (inPort.flowrate) to positive values:
>
> equation
>   ...
>   qt = b*s *  dp*s^2 / (12*m*l);
>   q = e0*V*n;
>   qq = q - qt;
>   inPort.flowrate = if q > qt then qq else 0.;
>
> the values of qt, q, qq seem to be right but the values of
> inPort.flowrate are NOT equal to q - qt (but some other very small
> values).  Where am I wrong?
>
> Thanks
> --
>     Best wishes
>
>     H. Dieter Wilhelm
>     Darmstadt, Germany
>

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

Reply via email to