Opened 12 years ago

Closed 12 years ago

#1959 closed defect (fixed)

Modelica.Blocks.Routing.Extractor doesn't work

Reported by: Peter Junglas Owned by: Willi Braun
Priority: high Milestone: 1.9.0
Component: Backend Version: trunk
Keywords: event Cc:

Description

In the attached model the input is a const 4-vector, the index runs periodically from 1 to 4. The output is not the corresponding vector element, but is constant.

Attachments (1)

TestExtractor.mo (2.6 KB ) - added by Peter Junglas 12 years ago.
model file

Download all attachments as: .zip

Change History (5)

by Peter Junglas, 12 years ago

Attachment: TestExtractor.mo added

model file

comment:1 by Adrian Pop, 12 years ago

Hi,

Can you add a bit more info on this:
What MSL are you using?
What should the output look like?

Cheers,
Adrian Pop/

in reply to:  1 comment:2 by Peter Junglas, 12 years ago

Sure. I'm using MSL 3.2.1, OpenModelica 1.9.0 beta 2, r14139 as of today.

The extractor gets the vector [1.1, 2.2, 3.3, 4.4] as input u, the index runs cyclically from 1 to 4, changing every second. Therefore the output should be (1.1, 2.2, 3.3, 4.4, 1.1, 2.2, ..), changing every second. But it is constant, = 1.1 .

If I use my own extractor block using the MSL code but dropping the line

"when {initial(),change(index)} then"

(and the "end when" of course)

then it works. So I assume there is a problem with OpenModelicas event handling.

Two further remarks:

  • Yesterday the sawtooth block worked, today it runs amok! Have a look at its output in TestExtractor to see what I mean!
  • In OMEdit you cannot connect the multiplexer output with the extractor input. OMEdit asks for an index, then (giving "1") shows an error message ("Unmatched dimension"). Obviously it cannot connect vector signals.

Hope that helps.

Greetings from Diepholz/Germany

Peter

comment:3 by Willi Braun, 12 years ago

Keywords: event added
Owner: changed from probably noone to Willi Braun
Status: newaccepted

The issue with sawtooth is fixed in r14197.

The other problem with the extractor is that we don't generate events for functions ceil, floor, div, mod, rem.

comment:4 by Willi Braun, 12 years ago

Resolution: fixed
Status: acceptedclosed

fixed in r14235.

Last edited 12 years ago by Adrian Pop (previous) (diff)
Note: See TracTickets for help on using tickets.