#5797 closed defect (fixed)
Disabling tearing breaks code generation in power system model when algorithms are involved
Reported by: | Francesco Casella | Owned by: | Mahder Alemseged Gebremedhin |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | Cc: | Andreas Heuermann, Karim Adbdelhak, Andrea Bartolini, adrien.guironnet@… |
Description
Please consider the PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork
model. When running it with the embedded defaults, the nonlinear equations in the initialization problem are subject to tearing, and this cause the loss of some critical start value information, making the solution a bit difficult and, when using the kinsol solver instead of the default, causing convergence to the wrong solution.
The proper way to solve this issue is to skip tearing and use a sparse solver. In this case, we have theoretical results that guarantee convergence to the required solution with a few iterations.
Unfortunately, if I add the --tearingMethod=minimalTearing
translation flag, I get the following errors:
PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c: In function 'initializeStaticDataNLS1506': PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16900:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[79].attribute /* GEN8.AVR.limiterWithLag.satON */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16901:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[79].attribute /* GEN8.AVR.limiterWithLag.satON */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16902:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[79].attribute /* GEN8.AVR.limiterWithLag.satON */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16904:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[65].attribute /* $whenCondition37 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16905:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[65].attribute /* $whenCondition37 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16906:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[65].attribute /* $whenCondition37 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16908:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[64].attribute /* $whenCondition36 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16909:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[64].attribute /* $whenCondition36 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16910:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[64].attribute /* $whenCondition36 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16912:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[66].attribute /* $whenCondition38 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16913:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[66].attribute /* $whenCondition38 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16914:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[66].attribute /* $whenCondition38 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16916:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[63].attribute /* $whenCondition35 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16917:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[63].attribute /* $whenCondition35 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16918:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[63].attribute /* $whenCondition35 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16920:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[67].attribute /* $whenCondition39 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16921:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[67].attribute /* $whenCondition39 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16922:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[67].attribute /* $whenCondition39 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16924:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[69].attribute /* $whenCondition40 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16925:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[69].attribute /* $whenCondition40 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:16926:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[69].attribute /* $whenCondition40 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17328:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[55].attribute /* $whenCondition28 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17329:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[55].attribute /* $whenCondition28 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17330:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[55].attribute /* $whenCondition28 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17332:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[52].attribute /* $whenCondition25 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17333:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[52].attribute /* $whenCondition25 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17334:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[52].attribute /* $whenCondition25 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17336:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[51].attribute /* $whenCondition24 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17337:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[51].attribute /* $whenCondition24 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17338:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[51].attribute /* $whenCondition24 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17340:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[54].attribute /* $whenCondition27 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17341:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[54].attribute /* $whenCondition27 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17342:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[54].attribute /* $whenCondition27 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17344:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[50].attribute /* $whenCondition23 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17345:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[50].attribute /* $whenCondition23 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17346:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[50].attribute /* $whenCondition23 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17348:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[53].attribute /* $whenCondition26 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17349:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[53].attribute /* $whenCondition26 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17350:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[53].attribute /* $whenCondition26 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17352:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[77].attribute /* GEN3.AVR.limiterWithLag.satON */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17353:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[77].attribute /* GEN3.AVR.limiterWithLag.satON */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:17354:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[77].attribute /* GEN3.AVR.limiterWithLag.satON */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18212:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[60].attribute /* $whenCondition32 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18213:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[60].attribute /* $whenCondition32 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18214:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[60].attribute /* $whenCondition32 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18216:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[62].attribute /* $whenCondition34 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18217:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[62].attribute /* $whenCondition34 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18218:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[62].attribute /* $whenCondition34 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18220:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[59].attribute /* $whenCondition31 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18221:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[59].attribute /* $whenCondition31 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18222:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[59].attribute /* $whenCondition31 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18224:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[78].attribute /* GEN6.AVR.limiterWithLag.satON */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18225:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[78].attribute /* GEN6.AVR.limiterWithLag.satON */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18226:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[78].attribute /* GEN6.AVR.limiterWithLag.satON */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18228:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[61].attribute /* $whenCondition33 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18229:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[61].attribute /* $whenCondition33 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18230:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[61].attribute /* $whenCondition33 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18232:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[56].attribute /* $whenCondition29 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18233:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[56].attribute /* $whenCondition29 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18234:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[56].attribute /* $whenCondition29 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18236:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[58].attribute /* $whenCondition30 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18237:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[58].attribute /* $whenCondition30 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18238:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[58].attribute /* $whenCondition30 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18448:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[43].attribute /* $whenCondition17 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18449:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[43].attribute /* $whenCondition17 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18450:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[43].attribute /* $whenCondition17 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18452:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[45].attribute /* $whenCondition19 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18453:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[45].attribute /* $whenCondition19 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18454:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[45].attribute /* $whenCondition19 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18456:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[44].attribute /* $whenCondition18 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18457:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[44].attribute /* $whenCondition18 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18458:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[44].attribute /* $whenCondition18 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18460:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[76].attribute /* GEN2.AVR.limiterWithLag.satON */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18461:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[76].attribute /* GEN2.AVR.limiterWithLag.satON */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18462:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[76].attribute /* GEN2.AVR.limiterWithLag.satON */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18464:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[49].attribute /* $whenCondition22 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18465:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[49].attribute /* $whenCondition22 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18466:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[49].attribute /* $whenCondition22 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18468:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[48].attribute /* $whenCondition21 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18469:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[48].attribute /* $whenCondition21 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18470:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[48].attribute /* $whenCondition21 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18472:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[47].attribute /* $whenCondition20 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18473:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[47].attribute /* $whenCondition20 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:18474:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[47].attribute /* $whenCondition20 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c: In function 'initializeStaticDataNLS926': PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19449:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[42].attribute /* $whenCondition16 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19450:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[42].attribute /* $whenCondition16 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19451:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[42].attribute /* $whenCondition16 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19453:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[39].attribute /* $whenCondition13 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19454:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[39].attribute /* $whenCondition13 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19455:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[39].attribute /* $whenCondition13 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19457:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[41].attribute /* $whenCondition15 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19458:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[41].attribute /* $whenCondition15 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19459:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[41].attribute /* $whenCondition15 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19461:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[40].attribute /* $whenCondition14 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19462:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[40].attribute /* $whenCondition14 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19463:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[40].attribute /* $whenCondition14 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19465:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[37].attribute /* $whenCondition11 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19466:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[37].attribute /* $whenCondition11 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19467:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[37].attribute /* $whenCondition11 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19469:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[38].attribute /* $whenCondition12 */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19470:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[38].attribute /* $whenCondition12 */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19471:94: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[38].attribute /* $whenCondition12 */.max; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19473:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal' sysData->nominal[i] = data->modelData->booleanVarsData[75].attribute /* GEN1.AVR.limiterWithLag.satON */.nominal; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19474:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min' sysData->min[i] = data->modelData->booleanVarsData[75].attribute /* GEN1.AVR.limiterWithLag.satON */.min; ^ PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork_02nls.c:19475:107: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max' sysData->max[i++] = data->modelData->booleanVarsData[75].attribute /* GEN1.AVR.limiterWithLag.satON */.max;
which eventually cause the code generation process to fail. Note that the tearing method option I am using is meant to keep tearing out discrete variables from implicit equations - apparently something goes wrong in this case.
This ultiately prevents me to use --daeMode
on the largest examples I want to show at the OpenModelic Workshop Tutoria on the PowerGrids library next Feb 4, because that option selects the KINSOL solver, which converges to the wrong solution if tearing is not skipped.
@maghe930@, @AnHeuermann, would you mind having a look and see if this is a quick fix? This might also help improving the coverage ratio of MSL wth daeMode, which is currently quite dismal, see report compared to what we can get with the standard approach.
I'll send you the library code in a separate e-mail
Thanks!
Change History (16)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Error: Internal error BackendDAE.adjacencyRowEnhanced failed for eqn: algorithm GEN8.AVR.limiterWithLag.satON := $START.GEN8.AVR.limiterWithLag.satON; $whenCondition40 := $START.$whenCondition40; $whenCondition39 := $START.$whenCondition39; $whenCondition38 := $START.$whenCondition38; $whenCondition37 := $START.$whenCondition37; $whenCondition36 := $START.$whenCondition36; $whenCondition35 := $START.$whenCondition35; $whenCondition35 := GEN8.AVR.limiterWithLag.u > GEN8.AVR.limiterWithLag.uMax; $whenCondition36 := GEN8.AVR.limiterWithLag.u < GEN8.AVR.limiterWithLag.uMin; $whenCondition37 := GEN8.AVR.limiterWithLag.u < GEN8.AVR.limiterWithLag.uMax and GEN8.AVR.limiterWithLag.u > GEN8.AVR.limiterWithLag.uMin; $whenCondition38 := GEN8.AVR.limiterWithLag.useLag and GEN8.AVR.limiterWithLag.state == GEN8.AVR.limiterWithLag.State.notSat; $whenCondition39 := GEN8.AVR.limiterWithLag.useLag and GEN8.AVR.limiterWithLag.state == GEN8.AVR.limiterWithLag.State.upperSat and time - GEN8.AVR.limiterWithLag.saturationLimitReached > GEN8.AVR.limiterWithLag.LagMax; $whenCondition40 := GEN8.AVR.limiterWithLag.useLag and GEN8.AVR.limiterWithLag.state == GEN8.AVR.limiterWithLag.State.lowerSat and time - GEN8.AVR.limiterWithLag.saturationLimitReached > GEN8.AVR.limiterWithLag.LagMin; if not GEN8.AVR.limiterWithLag.useLag then GEN8.AVR.limiterWithLag.satON := true; end if; [/home/aheuermann1/workspace/OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1826:6-1826:71:writable] Error: Internal error function pathFound failed [/home/aheuermann1/workspace/OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1772:5-1772:78:writable] Error: Internal error function matchDiscreteVars failed [/home/aheuermann1/workspace/OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1746:3-1746:73:writable] Error: Internal error function minimalTearing failed
Apparently in BackendDAEUtil.testSolvabilityForEquation
algorithms are not handled yet.
I think an algorithm equation is solvable for it's outputs. Let's see if I can fix this today.
comment:3 by , 5 years ago
I made some progress. BackendDAEUtil.testSolvabilityForEquation
is working now (on my Branch).
Updated error messages:
"Warning: The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. Warning: Minimal Tearing is ignoring tearingSelect annotation for discrete variables. Error: Could not match variable 2132 [/.../OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1778:5-1778:78:writable] Error: Internal error function matchDiscreteVars failed [/.../OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1746:3-1746:73:writable] Error: Internal error function minimalTearing failed Warning: Minimal Tearing is ignoring tearingSelect annotation for discrete variables. [/.../OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1832:6-1832:71:writable] Error: Internal error function pathFound failed [/.../OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1778:5-1778:78:writable] Error: Internal error function matchDiscreteVars failed [/.../OpenModelica/OMCompiler/Compiler/BackEnd/Tearing.mo:1746:3-1746:73:writable] Error: Internal error function minimalTearing failed Warning: Minimal Tearing is ignoring tearingSelect annotation for discrete variables. Warning: There are nonlinear iteration variables with default zero start attribute found in NLSJac64. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization"). Warning: The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. Warning: The hideResult annotation could not be evaluated, probably due to missing annotation(Evaluate=true). It is set to 'isProtected' (=false) by default.
I'm not sure why, but Tearing.pathFound
can't find a path for variable
2132: $whenCondition16:DISCRETE(fixed = false protected = true ) "GEN1.AVR.limiterWithLag.useLag and GEN1.AVR.limiterWithLag.state == GEN1.AVR.limiterWithLag.State.lowerSat and time - GEN1.AVR.limiterWithLag.saturationLimitReached > GEN1.AVR.limiterWithLag.LagMin" type: Boolean unreplaceable
Working on that so we can tear all (or only discrete?) output variables from the loop. Maybe tomorrow I'll get it to work better.
comment:4 by , 5 years ago
Thank you Andreas, I appreciate the fast feedback!
BTW, how did you get those error messages?
comment:5 by , 5 years ago
I'm running omc from command line. In OMEdit those errors from the backend should be inside the message browser. I changed the error messages, so you will get different ones on the omc-nightly. Maybe something like:
[2] 13:04:03 Translation Error [.../OMCompiler/Compiler/BackEnd/Tearing.mo: 1772:5-1772:78]: Internal error function matchDiscreteVars failed [3] 13:04:03 Translation Error [.../OMCompiler/Compiler/BackEnd/Tearing.mo: 1746:3-1746:73]: Internal error function minimalTearing failed [4] 13:04:03 Translation Warning Minimal Tearing is ignoring tearingSelect annotation for discrete variables. [5] 13:04:03 Symbolic Warning The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. [6] 13:04:03 Translation Warning The hideResult annotation could not be evaluated, probably due to missing annotation(Evaluate=true). It is set to 'isProtected' (=false) by default.
comment:6 by , 5 years ago
Sorry, of course I can also get them in the OMC Errors tab.
I'm looking forward to a solution of this issue tomorrow.
comment:7 by , 5 years ago
Component: | Code Generation → Backend |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I think this is exactly the same issue as #5783. The error message
Internal error function matchDiscreteVars failed
is what I got for ticket #5783 when I used minimalTearing
. I passed the issue to Karim thinking it will be easier for him to fix. I think he is busy with other issues right now.
I hope Andreas can find the issue soon. Let me know if there is anything I can help with.
comment:11 by , 5 years ago
Summary: | Disabling tearing breaks code generation in power system model → Disabling tearing breaks code generation in power system model when algorithms are involved |
---|
comment:12 by , 5 years ago
comment:13 by , 5 years ago
Owner: | changed from | to
---|
follow-up: 15 comment:14 by , 5 years ago
The problem with --tearingMethod=minimalTearing
has been fixed in PR 733.
The models compiles and simulates with --tearingMethod=minimalTearing
which can now handle algorithms and discreet variables properly. I am not sure if the convergence issue is still there.
@casella
You might also want to look at the PR for some discussions regarding performance when not using kinsol as a solver. I guess it does not matter much to you since you are intending to use kinsol in the first place.
follow-up: 16 comment:15 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Replying to mahge930:
The problem with
--tearingMethod=minimalTearing
has been fixed in PR 733.
Great!
The models compiles and simulates with
--tearingMethod=minimalTearing
which can now handle algorithms and discreet variables properly. I am not sure if the convergence issue is still there.
Worked fine, got to the right solution.
@casella
You might also want to look at the PR for some discussions regarding performance when not using kinsol as a solver. I guess it does not matter much to you since you are intending to use kinsol in the first place.
See my comment there.
Thanks for fixing this!
The problem is, that some boolean variables are inside a non-linear loop but didn't get teared from minimalTearing. I'm looking into it right now if it will be an easy fix.