Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4867 closed defect (fixed)

[NF] Evaluate scalar product and power operator

Reported by: Francesco Casella Owned by: Martin Sjölund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check Modelica.Blocks.Examples.NoiseExamples.DrydenContinuousTurbulence. The following error is reported:

[OMCompiler/Compiler/NFFrontEnd/NFCeval.mo:1115:20-1115:79:writable] 
Error: Internal error NFCeval.evalBuiltinSqrt got invalid arguments 
({182.88 ^ 2.0 / 72.01599999999999 ^ 2.0, 5.078871361919574, 1.0} * 
({182.88 ^ 2.0 / 72.01599999999999 ^ 2.0, 5.078871361919574, 1.0}))

as far as I understand, the expression between parentheses is a scalar product, so it should result in a scalar output, which should be a legitimate argument for the sqrt() function.

Change History (9)

comment:1 by Francesco Casella, 7 years ago

Component: *unknown*New Instantiation
Milestone: Future2.0.0
Owner: changed from somebody to Per Östlund

comment:2 by Martin Sjölund, 7 years ago

The main issue here is that evalBuiltinSqrt only works if it is sent a Real literal; if any of the subexpressions fail to evaluate, it will print this message (even if it is the exponentiation that fails, if I guess correctly).

comment:3 by Martin Sjölund, 7 years ago

Owner: changed from Per Östlund to Martin Sjölund
Status: newaccepted

comment:4 by Martin Sjölund, 7 years ago

Milestone: 2.0.01.13.0
Summary: NFCeval.evalBuiltinSqrt does not handle a scalar product argument[NF] Evaluate scalar product and power operator

comment:6 by Francesco Casella, 7 years ago

Milestone: 1.13.02.0.0

So far, all the tickets involving the NF were closed with milestone 2.0.0, meaning that the change will be effecive with 2.0.0, when the NF will become the default one.

It is true that you can get the feature with 1.13.0 and -d=newInst, but that is meant as an experimental feature, not as a released feature.

Is that ok?

comment:7 by Martin Sjölund, 7 years ago

I suppose, but that makes it harder to figure out when something was actually added to the compiler.

comment:8 by Martin Sjölund, 7 years ago

Resolution: fixed
Status: acceptedclosed

in reply to:  7 comment:9 by Francesco Casella, 7 years ago

Replying to sjoelund.se:

I suppose, but that makes it harder to figure out when something was actually added to the compiler.

For that, we have a nice link to the PR :)

Note: See TracTickets for help on using tickets.