Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3396 closed defect (fixed)

Missing nominal attribute in integer tearing variables nlsData C structure

Reported by: casella Owned by: lochel
Priority: critical Milestone: 1.9.4
Component: Code Generation Version: trunk
Keywords: Cc: wbraun

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 Changed 9 years ago by lochel

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 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.3 to 1.9.4

Moved to new milestone 1.9.4

comment:3 Changed 9 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed

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

I am closing the ticket.

comment:4 Changed 9 years ago by lochel

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 follow-up: Changed 9 years ago by casella

So, mixed systems are still not supported, basically?

comment:6 in reply to: ↑ 5 Changed 9 years ago by lochel

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 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:8 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.