Opened 7 years ago

Closed 7 years ago

#4818 closed defect (fixed)

Incorrect C code generated from NF-flattened model involving a record

Reported by: Francesco Casella Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check Modelica.Electrical.Machines.Examples.DCMachines.DCEE_Start. The following error is reported:

In file included from ./Modelica_3.2.2_Modelica.Electrical.Machines.Examples.DCMachines.DCEE_Start_model.h:18:
./Modelica_3.2.2_Modelica.Electrical.Machines.Examples.DCMachines.DCEE_Start_functions.h:16:109:
error: unknown type name 'Modelica_Electrical_Machines_Losses_BrushParameters'
modelica_real omc_Modelica_Electrical_Machines_Losses_DCMachines_brushVoltageDrop(threadData_t *threadData, Modelica_Electrical_Machines_Losses_BrushParameters _brushParameters, modelica_real _i);

Appartently, there is something wrong in the generated DAE structure that eventually leads to this problem

Change History (2)

comment:1 by Per Östlund, 7 years ago

This particular case seems to have been solved, presumably by cecca7d. But I suspect the issue isn't so much fixed as worked around, and might still occur in other cases. I'll keep this ticket open until I've been able to test this more thoroughly, records in general needs a lot more work.

comment:2 by Francesco Casella, 7 years ago

Resolution: fixed
Status: newclosed

Now this model fails in all likelyhood because of #4817

Note: See TracTickets for help on using tickets.