#3195 closed defect (fixed)
Translation error with integer inputs
Reported by: | Rüdiger Franke | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | trunk |
Keywords: | Cc: |
Description
This case is motivated by transformer models of the PowerSystems library that have integer inputs for tap changers. The models are of the form:
package InputIndex model Component parameter Real[3] data = {1, 2, 3}; input Integer index; Real x; output Real y; initial equation y = 0; equation x = data[1 + index]; der(y) = x - y; end Component; model Test Component c(index = 1); end Test; end InputIndex;
InputIndex.Test
gives the error messages:
[1] Translation Error Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed! [2] Symbolic Error Too many equations, over-determined system. The model has 3 equation(s) and 1 variable(s). [3] Translation Error Internal error pre-optimization module removeSimpleEquations failed.
See also:
PowerSystems.Examples.Spot.AC1ph_DC.Transformer
PowerSystems.Examples.Spot.AC3ph.Transformer
PowerSystems.Examples.Spot.TransformationAC1ph.TapChanger
PowerSystems.Examples.Spot.TransformationAC3ph.PhaseShifts
PowerSystems.Examples.Spot.TransformationAC1ph.TapChanger
...
Change History (12)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This issue seems to be fixed. If not, please reopen this ticket.
follow-up: 7 comment:6 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Well, none of the PowerSystems examples given above is working yet (see nightly tests). Basically the error message changed, e.g. for PowerSystems.Examples.Spot.AC1ph_DC.Transformer
:
Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 96 * Number of variables: 96 Error: An independent subset of the model has imbalanced number of equations (8) and variables (6). variables: TapChanger.cnt_2 TapChanger.cnt_1 TapChanger.tap_n TapChanger.tap_p $whenCondition2 $whenCondition1 equations: 1 : algorithm $whenCondition1 := time > TapChanger.t_switch_1[min(TapChanger.cnt_1, 2)]; when $whenCondition1 then TapChanger.cnt_1 := 1 + TapChanger.cnt_1; TapChanger.tap_p := TapChanger.preset_1[min(TapChanger.cnt_1, 3)]; end when; $whenCondition2 := time > TapChanger.t_switch_2[min(TapChanger.cnt_2, 2)]; when $whenCondition2 then TapChanger.cnt_2 := 1 + TapChanger.cnt_2; TapChanger.tap_n := TapChanger.preset_2[min(TapChanger.cnt_2, 3)]; end when; 2 : TapChanger.tap_p = 0.0 3 : TapChanger.tap_n = 0.0 Error: pre-optimization module encapsulateWhenConditions failed.
comment:7 by , 9 years ago
Replying to rfranke:
Well, none of the PowerSystems examples given above is working yet (see nightly tests). Basically the error message changed, e.g. for
PowerSystems.Examples.Spot.AC1ph_DC.Transformer
:
At least the model from the description is now working without any error/warning. So maybe there is another bug that causes the error for the PowerSystems examples. Anyway, we can keep this ticket for that.
comment:8 by , 9 years ago
I think the title of the ticket still matches. The example from the description was an attempt to break the problem down. You might close this ticket and open a new one if this helps.
comment:10 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
The ticket was re-opened in #3274. Close this one because the introductory example works now.
This is a bug in the optimization module "removeSimpleEquations". Right now, there was no time to investigate it properly. Hence, I just caught the failure and skipped failing equation subsystems for now (see r25002).
It is planned to revise (or even replace) the entire module, so maybe this is a suitable solution for now.