Opened 8 years ago

Closed 7 years ago

#4290 closed defect (invalid)

bug/regression: nested expandable connectors cause error in new release 1.11 not in previous 1.9.7

Reported by: sinisi@… Owned by: somebody
Priority: high Milestone: maint/1.11
Component: Frontend Version: v1.11.0
Keywords: expandable connector connect equation bug regression v1.11.0 v1.9.7 Cc:

Description

If I compile the attached toy model using omc v1.11.0 I get the following error:

Error processing file: A.mo
[/mnt/nfs/sinisi/A.mo:43:3-43:27:writable] Error: Failed to instantiate equation 
connect(busB1.y, bus.b1);.
Error: Error occurred while flattening model A

# Error encountered! Exiting...
# Please check the error message and the flags.

Execution failed!

Instead using omc v1.9.7 compilation process ends without any error.

I discovered that inverting the order of connect equation in model A from:

connect(busB1.y, bus.b1);                                                                                                                                                                            
connect(busB2.y, bus.b2);                                                                                                                                                                            
connect(busB1, b1.busB);                                                                                                                                                                             
connect(busB2, b2.busB);                                                                                                                                                                             
connect(bus, b1.bus);                                                                                                                                                                                
connect(bus, b2.bus);                                                                                                                                                                                
connect(const.y, bus.x);

to:

connect(busB1, b1.busB);                                                                                                                                                                             
connect(busB2, b2.busB);                                                                                                                                                                             
connect(bus, b1.bus);                                                                                                                                                                                
connect(bus, b2.bus);                                                                                                                                                                          
connect(const.y, bus.x);
connect(busB1.y, bus.b1);                                                                                                                                                                           
connect(busB2.y, bus.b2);

the problem is solved.

Attachments (2)

A.mo (802 bytes ) - added by sinisi@… 8 years ago.
P.mo (827 bytes ) - added by Francesco Casella 7 years ago.

Download all attachments as: .zip

Change History (4)

by sinisi@…, 8 years ago

Attachment: A.mo added

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

Component: BackendFrontend
Owner: changed from Lennart Ochel to somebody

comment:2 by Francesco Casella, 7 years ago

Resolution: invalid
Status: newclosed

I tried this model with Dymola, after building a proper package file (attached).

I got this diagnostic message:

Cannot introduce variables in two expandable connectors with
one connect-statements: at least one of them must exist:
connect(busB1.y, bus.b1);

Found in class P.A, D:/Temp/OMEdit/P.mo at line 45.

Cannot introduce variables in two expandable connectors with
one connect-statements: at least one of them must exist:
connect(busB2.y, bus.b2);

Found in class P.A, D:/Temp/OMEdit/P.mo at line 46.

The model contained invalid connect statements.

So, the model seems to be invalid.

by Francesco Casella, 7 years ago

Attachment: P.mo added
Note: See TracTickets for help on using tickets.