Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5711 closed defect (fixed)

Symbolic error

Reported by: ahaumer@… Owned by: Per Östlund
Priority: critical Milestone: 1.14.0
Component: New Instantiation Version: v1.13.2
Keywords: Cc: christian.kral@…

Description

Consider the enclosed example (Examples.PolyphaseRectifier):
OM v 1.13.2 reports a Symbolic Error:
Too few equations, under-determined system. The model has 1202 equation(s) and 1208 variable(s).
For sure the system is balanced (it simulates in Dymola 2020).

Attachments (1)

Polyphase.mo (31.9 KB ) - added by anonymous 5 years ago.
Example that demonstrates the bug

Download all attachments as: .zip

Change History (13)

by anonymous, 5 years ago

Attachment: Polyphase.mo added

Example that demonstrates the bug

comment:1 by Francesco Casella, 5 years ago

Toni, can you please try with 1.14.0-dev.beta2? It is likely that the issue is solved already.

Thanks!

comment:2 by Francesco Casella, 5 years ago

Priority: blockercritical

Only regressions are blockers for 1.14.0, otherwise we release whatever we have.

comment:3 by ahaumer@…, 5 years ago

I tried with 1.14.0-dev.beta2, now number of unknowns = number of equations, but:
"each" for proagation of parameters to an array of arrays of diodes is not evaluated correctly!
I'll try to reformulate the parameter propagation to avoid each, but still you face a problem with "each"!

comment:4 by massimo ceraolo, 5 years ago

On my computer opening Polyphase.Examples.PolyphaseRectifier, and then asking a "Check Model", causes OMEdit to crash (Crash report just sent).

Checked with v1.14-dev.beta2 for Win 64.

in reply to:  3 comment:5 by Francesco Casella, 5 years ago

Replying to ahaumer@…:

I tried with 1.14.0-dev.beta2, now number of unknowns = number of equations, but:
"each" for proagation of parameters to an array of arrays of diodes is not evaluated correctly!

@ahaumer, could you please write down what is the expected evaluation and where it is different from the current omc output? This can be useful to improve the quality of the new frontend.

Thanks!

comment:6 by ahaumer@…, 5 years ago

record PolyphaseRectifierData "Data record for polyphase rectifier"

parameter Integer m(final min=2)=6 "Number of phases";
parameter Integer mSystems=numberOfSymmetricBaseSystems(m) "Number of base systems";
parameter Integer mBasic=integer(m/mSystems) "Number of phases per base system";

...
end PolyphaseRectifierData;
model PolyphaseRectifier "Demonstrate a polyphase diode rectifier"

parameter PolyphaseRectifierData data;

...

Modelica.Electrical.MultiPhase.Ideal.IdealDiode diode1[data.mSystems](

each m=data.mBasic,
each Ron=fill(1e-6, data.mBasic),
each Goff=fill(1e-6, data.mBasic),
each Vknee=fill(0, data.mBasic));

...
end PolyphaseRectifier;
This example is included in PR #3237 for MSL 4.0.0-dev.
"continuous-integration/travis-ci/pr — The Travis CI build failed." - very bad!

i.e. we have an array of mSystems multiphase diodes, each one containing an array of mBasic singlephase diodes, and their parameters should be filled with the same values ("each" of the arrays of the singlephase diodes with the same array of parameters).
Something wrong with that construct? Dymola 2020 doesn't complain about it.
OM 1.14.0-dev.beta2: a long list of error messages during translation dealing with those parameters:
Modelica.Electrical.Polyphase.Examples.PolyphaseRectifier_08bnd.c:804:86: error: incompatible types when assigning to type 'modelica_real {aka double}' from type 'real_array {aka struct base_array_s}'

data->simulationInfo->realParameter[507] /* diode2[2].idealDiode[3].Vknee PARAM */ = tmp0;

comment:7 by ahaumer@…, 5 years ago

@ceraolo is right:
Checking the example causes OM 1.14.0-dev.beta2 to crash.
Just sent the crash report.
Translating produces the above mentioned error.

in reply to:  4 comment:8 by Per Östlund, 5 years ago

Replying to ceraolo:

On my computer opening Polyphase.Examples.PolyphaseRectifier, and then asking a "Check Model", causes OMEdit to crash (Crash report just sent).

Fixed in 4cd847e7.

comment:9 by Francesco Casella, 5 years ago

Component: *unknown*New Instantiation
Owner: changed from somebody to Per Östlund
Status: newassigned

comment:10 by Per Östlund, 5 years ago

Resolution: fixed
Status: assignedclosed

The remaining compilation issue was fixed in 57ea0be6, and the model now simulates successfully.

comment:11 by Francesco Casella, 5 years ago

Nice! I hope there are many other models in the testsuite that benefit from this fix. I just started a Jenkins job to check that.

in reply to:  11 comment:12 by Per Östlund, 5 years ago

Replying to casella:

Nice! I hope there are many other models in the testsuite that benefit from this fix. I just started a Jenkins job to check that.

No need, it was tested during the night. See results. The impact was fairly small, but at least there were no regressions.

Note: See TracTickets for help on using tickets.