#5001 closed defect (fixed)
Issue with Spice3 models in NF
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.Spice3.Examples.Graetz. The removeSimpleEquations
module fails.
I flattened the model with the old and new FE. The equations seem to me equivalent, considering that the connection equations for 3 effort variables can be equivalently stated in the form a = b; b = c;
as well as in the form a = b; a = c;
The only other difference I spotted was in the way a connection equation for flow variables is rendered:
D2.n.i = (-D2.icap) - D2.cc.m_dCurrent - D2.igmin; // Old FE D2.n.i = (-(D2.cc.m_dCurrent + D2.igmin)) - D2.icap; // New FE
Of course the unary minus operator and the binary minus operator look the same when pretty printed, but maybe the -
in the NF-produced AST is the binary operator, and that causes the removeSimpleEquations module to fail.
There are many other Spice3 models failing in the same place, so I guess this is a commonplace issue, please check.
Change History (5)
follow-up: 2 comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 7 years ago
comment:3 by , 7 years ago
comment:5 by , 7 years ago
Replying to casella:
Ops :)
Good thing you caught that, after correcting that slight misstep the Graetz model now simulates without issues.
Fixed in 1ed0e9d. But it seems like the Spice3 models doesn't really like the "put parameter bindings in initial equations and make them fixed" strategy, because it fails during initialization and complains a lot about missing values.