Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3396 closed defect (fixed)

Missing nominal attribute in integer tearing variables nlsData C structure

Reported by: Francesco Casella Owned by: Lennart Ochel
Priority: critical Milestone: 1.9.4
Component: Code Generation Version: trunk
Keywords: Cc: Willi Braun

Description

Please have a look at the result of this test

https://test.openmodelica.org/libraries/ThermoPower_Experimental/files/ThermoPower.Examples.HRB.Simulators.ClosedLoopSimulator.err

two integer variables are selected as tearing variables: $cse129.phase and $cse129.region

Wrong C code is generated as a result:

ThermoPower.Examples.HRB.Simulators.ClosedLoopSimulator_02nls.c:6513:54: error: no member named 'nominal' in 'struct INTEGER_ATTRIBUTE'
  nlsData->nominal[i] = $P$ATTRIBUTE$P$cse129$Pphase.nominal;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
ThermoPower.Examples.HRB.Simulators.ClosedLoopSimulator_02nls.c:6517:55: error: no member named 'nominal' in 'struct INTEGER_ATTRIBUTE'
  nlsData->nominal[i] = $P$ATTRIBUTE$P$cse129$Pregion.nominal;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.

This error popped up between Jul 6th and Jul 26th.

Change History (8)

comment:1 by Lennart Ochel, 9 years ago

What I can say just from the error message: It seems to be an issue with mixed systems – that means systems with both discrete and continuous iteration variables. That is currently not supported. The only good thing about it is, that it is already on my list ;-)
Anyway I can have a look at it tomorrow.

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

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:3 by Francesco Casella, 9 years ago

Resolution: fixed
Status: newclosed

Somehow this issue was resolved between Sep 10 and Sep 14.

I am closing the ticket.

comment:4 by Lennart Ochel, 9 years ago

I think this was somehow effected by separating the transformation of simulation and initialization. Maybe there is now some simplification applied to the system that omit the error.

comment:5 by Francesco Casella, 9 years ago

So, mixed systems are still not supported, basically?

in reply to:  5 comment:6 by Lennart Ochel, 9 years ago

Replying to casella:

So, mixed systems are still not supported, basically?

Yes, mixed systems are not handled in general (see also #3440). However, it is possible to solve those systems in some cases at least, due to a hack in the nonlinear solvers.

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

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

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

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.