Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » jgb
  • » Profile

Posts

Posts

Feb-10-12 14:53:16
A parameter is not found when redeclaring a replaceable model.

Hello,

I get an error trying to redeclare a replaceable model, the simple code is the following:

Code:


model MyInternalModel
  parameter Real par = 1;
end MyInternalModel;

model MyModel
  replaceable model ReplaceableInternalModel = MyInternalModel;
  ReplaceableInternalModel internalModel;
end MyModel;

model MyTestModel

parameter Real localPar = 1;

MyModel intModel(redeclare model ReplaceableInternalModel = MyInternalModel(final par = localPar)); //This doesn't work.

//MyModel intModel(redeclare model ReplaceableInternalModel = MyInternalModel(final par = 1)); // This works

end MyTestModel;

The error message is the following:

Code:


Error: Variable localPar not found in scope MyModel
Error: Error occurred while flattening model MyTestModel

I'm using the latest OM version (r11081) in Linux 64-bit.

Is this illegal code o is it a bug? It is so simple that I thought it should work.

Thank you for any help,

Best regards,

Javier

Dec-21-11 15:30:07
Solved in later revisions...

I don't know how to delete the post. It does not make sense anymore.

Dec-02-11 11:53:59
Stack Overflow error with inheriting models and replaceable packages.

Hello,

I'm getting a Stack Overflow error when using inheritance and replaceable packages in OM r10622 (latest). This error happens also at least in r10615. I think it worked in some older versions, but I cannot ensure that. Of course I think the code is legal in modelica.

The simple code leading to the error is the following (perhaps it can be further simplified):

partial package MyPartialPackage
  replaceable partial function myFunction
    input Real a;
    output Real b;
  end myFunction;
end MyPartialPackage;

package MyExtendingPackage
  extends MyPartialPackage;
  redeclare function extends myFunction
  algorithm
    b := a;
  end myFunction;
end MyExtendingPackage;

model MyModel
  replaceable package MyPackage = MyPartialPackage;
  Real x;
equation
    x = MyPackage.myFunction(1);
end MyModel;

partial model MyPartialModel
  replaceable package MyPackage = MyPartialPackage;
  MyModel myModel(redeclare package MyPackage = MyPackage);
end MyPartialModel;

model MyExtendingModel
  package MyPackage = MyExtendingPackage;
  extends MyPartialModel(redeclare package MyPackage = MyPackage);
end MyExtendingModel;


The results from checking with OMC (also simulating) are the following:

checkModel(MyModel);
"Check of MyModel completed successfully.
Class MyModel has 1 equation(s) and 1 variable(s).
1 of these are trivial equation(s).
"
checkModel(MyPartialModel);
"Check of MyPartialModel completed successfully.
[OMTestModel.mo:23:1-26:19:writable] Warning: Forcing full instantiation of partial class MyPartialModel during checkModel.
Class MyPartialModel has 1 equation(s) and 1 variable(s).
1 of these are trivial equation(s).
"
checkModel(MyExtendingModel);

Lookup.lookupClassInFrame_ExitCall_Env__avlTreeGet_SC208
Lookup.lookupClassInEnv_ExitCall_lookupClassInFrame_SC191
Util.setStatefulBoolean
.
.
. (hundreds of lines here)
.
.
Env.avlTreeGet_ExitCall_stringCompare_SC23
Stack overflow! Failing the current function stack chain until the stack overflow signal is caught!


I suppose this is a OM compiler bug, but perhaps it's something wrong in my code. Any comment/help on which can be the solution would be very appreciated.

Thank you very much in advance,

Javier.

Nov-17-11 11:25:29
Conditional parameter definition leads to a compiler error.

Hello,

I'm getting an error when compiling a simple model in which a parameter is defined conditionally depending on a boolean variable. The model is checked successfully and instantiated, but when I try to simulate it, it is not compiled.

I'm not sure if this kind of parameter definition is supposed to be done in Modelica, but I think it should work.

The simple code is the following:
model MyModel
  parameter Boolean bool = true;
  parameter Real var0 = 10;
  parameter Real var1 = if bool then var0 else var0/var2;
  parameter Real var2 = if bool then var0/var1 else var0;
end MyModel;

model MyModelTest
annotation(experiment(StartTime = 0.0, StopTime = 1.0, NumberOfIntervals=100, Tolerance = 1e-06));
 
  MyModel myModel(var0=1);

end MyModelTest;


This code is in a .mo file called OMTestModel.mo

When I try to simulate MyModelTest in OMEdit, it takes forever to compile the model and no error message is thrown. When I try to simulate it in OMC, I get a very long error output from the compiler that I don't understand (I have copied it bellow).

I would appreciate if someone could tell my if there is an error in my code o if it is a OpenModelica error.

I thank you in advance,

Javier,

*******************************************************************
I run the following .mos file with OMC:
loadFile("OMTestModel.mo");
checkModel(MyModelTest);
instantiateModel(MyModelTest);
simulate(MyModelTest);


And I get the following output:

true
"Check of MyModelTest completed successfully.
Class MyModelTest has 0 equation(s) and 0 variable(s).
0 of these are trivial equation(s).
"
"class MyModelTest
  parameter Boolean myModel.bool = true;
  parameter Real myModel.var0 = 1.0;
  parameter Real myModel.var1 = if myModel.bool then myModel.var0 else myModel.var0 / myModel.var2;
  parameter Real myModel.var2 = if myModel.bool then myModel.var0 / myModel.var1 else myModel.var0;
end MyModelTest;"

ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC867
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC842
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC841
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC867
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC842
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC867
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC842
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC841
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC867
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_getVar4_SC207
BackendVariable.getVar3
BackendVariable.getVar2_ExitCall_getVar3_SC206
BackendVariable.vararrayNth
BackendVariable.vararrayNth_ExitCall_array_get_SC325
BackendVariable.getVar2_ExitCall_vararrayNth_SC205
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Debug.bcallret2
Expression.subscriptEqual
ComponentReference.crefEqualNoStringCompare2_ExitCall_Debug__bcallret3_SC53
Debug.bcallret2
Expression.subscriptEqual
BackendVariable.getVar2_ExitCall_ComponentReference__crefEqualNoStringCompare_SC204
BackendDAEUtil.replaceCrefsWithValues_ExitCall_BackendVariable__getVar_SC792
Expression.traverseExp
BackendDAEUtil.replaceCrefsWithValues
BackendDAEUtil.replaceCrefsWithValues_label16445
BackendDAEUtil.replaceCrefsWithValues_ExitCall_Expression__traverseExp_SC791
Expression.traverseExp_ExitCall_traverseExp_SC842
Expression.traverseExp
Expression.traverseExp
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC936
Expression.traverseExpCref
Expression.traverseExpSubs
Expression.traverseExpCref_ExitCall_traverseExpSubs_SC930
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC928
Expression.traverseExpCref_ExitCall_traverseExpCref_SC935
Util.if_
Expression.traverseExpCref_ExitCall_Util__if__SC931
Expression.traverseExp_ExitCall_traverseExpCref_SC875
Util.if_
Expression.traverseExp_ExitCall_Util__if__SC873
BackendDAEUtil.replaceCrefsWithValues
BackendVariable.getVar
HashTable2.hashFunc
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_RTOpts__modelicaOutput_SC222
ComponentReference.printComponentRef2Str
ComponentReference.printComponentRefStr_ExitCall_printComponentRef2Str_SC218
ComponentReference.printComponentRefStr
ComponentReference.printComponentRefStr_ExitCall_printComponentRefStr_SC217
HashTable2.hashFunc_ExitCall_ComponentReference__printComponentRefStr_SC5
BackendVariable.getVar2_ExitCall_HashTable2__hashFunc_SC210
BackendVariable.getVar2_ExitCall_array_get_SC208
BackendVariable.getVar4
ComponentReference.crefEqualNoStringCompare
ComponentReference.crefEqualNoStringCompare2
ComponentReference.crefEqualNoStringCompare2_NextCase_FC24
Debug.bcallret3
ComponentReference.crefEqualNoStringCompare2
Stack overflow! Failing the current function stack chain until the stack overflow signal is caught!

Nov-04-11 11:38:16
Type mismatch error in modifier because fuction "cat" gives #NOTYPE#

Thank you, perost!

I've checked it with the last versions and works fine!

Best regards,
Javier.

Nov-02-11 18:49:40
Type mismatch error in modifier because fuction "cat" gives #NOTYPE#

Hi perost,

Thank you for fixing that. Regarding the MyType prefix, it was a copy&Paste error, it was correct in my real code.

However, I'm afraid there is still a problem related with the #NOTYPE# message, perhaps is related to what you're saying in your last paragraph, but I thing it is again a (different?) bug, not only the message itself.

This code is not working and I think it should:
*****************************************************************************************************************************
type MyType = enumeration(divisionType1 , divisionType2 );

partial model myPartialModel
  parameter Integer m(min = 1) = 2;
  input Modelica.SIunits.Volume[n] v;
end myPartialModel;

partial model mySecondPartialModel
  parameter Integer n(min = 1) = 3;
  parameter MyType myDivision = MyType.divisionType1;
  extends myPartialModel(final m = n - 1, final v = z);
  parameter Modelica.SIunits.Length[n] x;
  parameter Modelica.SIunits.Area[n] y;
  parameter Modelica.SIunits.Volume[n] z;
end mySecondPartialModel;

model myExtendingModel
  parameter Modelica.SIunits.Length a = 1;
  parameter Modelica.SIunits.Length b = 1;
  final parameter Modelica.SIunits.Length c = a * a;
  final parameter Modelica.SIunits.Area[n] areas = fill(c / n, n);
  final parameter Modelica.SIunits.Length[n] lengths = if n == 1 then {b} elseif myDivision == MyType.divisionType1 then cat(1, {b / (n - 1) / 2}, fill(b / (n - 1), n - 2), {b / (n - 1) / 2}) else fill(b / n, n);
  final parameter Modelica.SIunits.Volume[n] volumes = array(areas[i] * lengths[i] for i in 1:n);
  extends mySecondPartialModel(final x = lengths, final y = areas, final z = volumes);
end myExtendingModel;
*************************************************************************************************************************************
Now, the "cat" is working (I've left the previous code regarding it), but I get the following message when I check the model:

OMEDIT:
*****************************************************************
Check of myExtendingModel completed successfully.

[/home/.../OMTestModel.mo:17:3-17:41:writable] Error: Type mismatch in modifier of component z, declared type .Modelica.SIunits.Volume[n], got modifier volumes of type #NOTYPE#

Class myExtendingModel has 0 equation(s) and 0 variable(s).
0 of these are trivial equation(s).
*******************************************************************************************************************************************
OMC:
*******************************************************************************************************************************************
class myExtendingModel
  parameter Integer n(min = 1) = 3;
  parameter enumeration(divisionType1, divisionType2) myDivision = MyType.divisionType1;
  parameter Integer m(min = 1) = n + -1;
  input Real v[1](quantity = "Volume", unit = "m3") = z[1];
  input Real v[2](quantity = "Volume", unit = "m3") = z[2];
  input Real v[3](quantity = "Volume", unit = "m3") = z[3];
  parameter Real x[1](quantity = "Length", unit = "m") = lengths[1];
  parameter Real x[2](quantity = "Length", unit = "m") = lengths[2];
  parameter Real x[3](quantity = "Length", unit = "m") = lengths[3];
  parameter Real y[1](quantity = "Area", unit = "m2") = areas[1];
  parameter Real y[2](quantity = "Area", unit = "m2") = areas[2];
  parameter Real y[3](quantity = "Area", unit = "m2") = areas[3];
  parameter Real z[1](quantity = "Volume", unit = "m3") = volumes[1];
  parameter Real z[2](quantity = "Volume", unit = "m3") = volumes[2];
  parameter Real z[3](quantity = "Volume", unit = "m3") = volumes[3];
  parameter Real a(quantity = "Length", unit = "m") = 1.0;
  parameter Real b(quantity = "Length", unit = "m") = 1.0;
  final parameter Real lengths[1](quantity = "Length", unit = "m") = if myDivision == MyType.divisionType1 then b / (Real(n + -1) * 2.0) else b / Real(n);
  final parameter Real lengths[2](quantity = "Length", unit = "m") = if myDivision == MyType.divisionType1 then b / Real(n + -1) else b / Real(n);
  final parameter Real lengths[3](quantity = "Length", unit = "m") = if myDivision == MyType.divisionType1 then b / (Real(n + -1) * 2.0) else b / Real(n);
  final parameter Real c(quantity = "Length", unit = "m") = a ^ 2.0;
  final parameter Real areas[1](quantity = "Area", unit = "m2") = c / Real(n);
  final parameter Real areas[2](quantity = "Area", unit = "m2") = c / Real(n);
  final parameter Real areas[3](quantity = "Area", unit = "m2") = c / Real(n);
  final parameter Real volumes[1](quantity = "Volume", unit = "m3") = areas[1] * lengths[1];
  final parameter Real volumes[2](quantity = "Volume", unit = "m3") = areas[2] * lengths[2];
  final parameter Real volumes[3](quantity = "Volume", unit = "m3") = areas[3] * lengths[3];
end myExtendingModel;
[/home/.../OMTestModel.mo:17:3-17:41:writable] Error: Type mismatch in modifier of component z, declared type .Modelica.SIunits.Volume[n], got modifier volumes of type #NOTYPE#
Warning: Parameter z has neither value nor start value, and is fixed during initialization (fixed=true)
*********************************************************************************************************************************
I would be grateful if you could check it and tell me if it's another "bug" or the error is related to something illegal in my code.

Thank you very much for your time,

Javier.

Oct-27-11 13:55:44
Type mismatch error in modifier because fuction "cat" gives #NOTYPE#

Hello,

I'm getting an Type mismatch error in OpenModelica 1.8.0 (r10230) when I try to set an array parameter of a partial model from another array parameter of an extending model created with cat function.

Although there might be simpler codes producing the same error, I've keep some parts of the code in order to show up some peculiarities. The code is:

type MyType = enumeration(divisionType1,divisionType2);

partial model myPartialModel
  parameter Integer n (min = 1) = 2;
  parameter MyType myDivision = MyType.divisionType1;
  parameter Modelica.SIunits.Length[n] x;
  parameter Modelica.SIunits.Length[n] y;
  Modelica.SIunits.Area[n] z;
equation
  for i in 1:n loop
    z[i] = x[i] * y[i];
  end for;
end myPartialModel;

model myExtendingModel
  parameter Modelica.SIunits.Length a;
  parameter Modelica.SIunits.Length b;

  final parameter Modelica.SIunits.Length[n] aDivisions = if n == 1 then {a} else fill(a/n, n);
  final parameter Modelica.SIunits.Length[n] bDivisions = if n == 1 then {b}
                                                                                                       elseif myDivision == divisionType1 then
                                                                                                                  cat(1, {b/(n-1)/2}, fill(b/(n-1), n-2), {b/(n-1)/2})
                                                                                                       else fill(b/n, n);
  extends myPartialModel(final x = aDivisions,
                         final y = bDivisions);

end myExtendingModel;



The error I get when checking the model is the following:

[/home/.../OMTestModel.mo:8:3-8:41:writable] Error: Type mismatch in modifier of component y, declared type .Modelica.SIunits.Length[n], got modifier bDivisions of type #NOTYPE#
Error: Error occured while flattening model myExtendingModel


I think the error is related with the cat function because the aDimensions doesn't through any errors.
The same code works if I only use the fill function.
The if statement works properly.

I've also programmed a myConcatenate function with its input and output declared as Modelica.SIunits.Length and used it instead of the built.in cat function, but I get the same error. The function is the following:

function myConcatenate
    input SI.Length[:,:] array;
    output SI.Length[arrayLength] newArray;
  protected
    Integer arrayLength := sum(size(lengthsArray,2));
    Integer aux := 1;
  algorithm
    for i in 1:size(array,1) loop
      for j in 1:size(array(i),1) loop
        newArray[aux] := array(i,j);
        aux := aux +1;
      end for;
    end for;
  end myConcatenate;


It seems to me that the type is lost when using both cat and myConcatenate functions, but it is kept when using fill, so I don't think this is the desired behavior of OM.

Any help would be very appreciated.

Thank you in advance,

Javier.

Sep-28-11 17:59:09
Model is checked succesfully but compilation fails in the "for" loop.

Thank you again,

I also think this should be legal in Modelica.

I hope these problems could be solved as soon as possible by the OpenModelica developers.

Sep-28-11 14:43:59
Model is checked succesfully but compilation fails in the "for" loop.

Thank you again,

I've updated to rev 9956 and run both yours and my code, both have worked.

However, I'm sad to tell you that a bug is still there. The following code doesn't work and I suppose it should:

model ArrayOfSignalsTest

  Signal mySignals[2](n = {3,4});

equation

  mySignals[1].values[1] = 1;
  mySignals[1].values[2] = 1;
  mySignals[1].values[3] = 1;

  mySignals[2].values[1] = 1;
  mySignals[2].values[2] = 1;
  mySignals[2].values[3] = 1;
  mySignals[2].values[4] = 1;

end ArrayOfSignalsTest;


The error message is slightly different, what I get is the following:

---- Error 8 : 13:36:34 ----
Unable to simulate the Model 'ArrayOfSignalsTest'
Following Error has occurred.

Simulation failed for model: ArrayOfSignalsTest
[<interactive>:14:3-14:29:writable] Error: Illegal subscript [4] for dimensions 3 in component mySignals[2]
[<interactive>:14:3-14:29:writable] Error: Variable mySignals[2].values[4] not found in scope ArrayOfSignalsTest
Error: Error occured while flattening model ArrayOfSignalsTest


In this case, what I think is failing is the declaration of the Signal array with different "n" value. The code works for n={4,3}...

Sep-28-11 12:05:23
Model is checked succesfully but compilation fails in the "for" loop.

Dear  sjoelund.se, thank you for your fast reply, however, I don't get it...I'm sorry...

I think the behavior of my code should be the following:

Signal mySignals[numberOfSignals1](n = numberOfSignals2); should create an array of Signals of length 2, such that:

mySignals[1] should have n = 3, this way mySignals[1].values[1], mySignals[1].values[2] and mySignals[1].values[3] should exist.
mySignals[2] should have n = 3, this way mySignals[2].values[1], mySignals[2].values[2] and mySignals[2].values[3] should exist.

Then, I expect that the for loop means what follows:

for j in 1:numberOfSignals1 loop == for j in 1:2 loop, so j takes values 1 and 2, then:
  when j=1:
    for i in 1:numberOfSignals2[1] == for i in 1:3 loop, so i takes values 1, 2 and 3, then:
      when i = 1: mySignals[j].values[i] = 1 results in mySignals[1].values[1] = 1 --> indexes seem to be legal;
      when i = 2: mySignals[j].values[i] = 1 results in mySignals[1].values[2] = 1 --> indexes seem to be legal;
      when i = 3: mySignals[j].values[i] = 1 results in mySignals[1].values[3] = 1 --> indexes seem to be legal;
    end for;
  when j=2:
    for i in 1:numberOfSignals2[2] == for i in 1:3 loop, so i takes values 1, 2 and 3, then:
      when i = 1: mySignals[j].values[i] = 1 results in mySignals[2].values[1] = 1 --> indexes seem to be legal;
      when i = 2: mySignals[j].values[i] = 1 results in mySignals[2].values[2] = 1 --> indexes seem to be legal;
      when i = 3: mySignals[j].values[i] = 1 results in mySignals[2].values[3] = 1 --> indexes seem to be legal;
    end for;
end for;

This way, although the error message is really easy to interpret, as you said, I haven't understood when the indexes are out of bounds. I guess I'm misinterpreting some behavior in the Signal declaration or in the for loop.

Would you mind explaining me what is the actual behavior of my code?

If you think this shouldn't be a forum topic, you can write me an e-mail to jgbarberena@gmail.com.

Thank you for your time,

Sep-28-11 10:22:48
Model is checked succesfully but compilation fails in the "for" loop.

Hello,

I have created a simple model with an array of array connectors and compilation fails when using nested for loops to assign values. Find the code below:

The connector I use:

connector Signal
  parameter Integer n = 1 "Signal Array Dimension";
  Real values[n] "Real Input Values";
end Signal;


The test model:

model ArrayOfSignalsTest
  parameter Integer numberOfSignals1 = 2;
  parameter Integer numberOfSignals2[numberOfSignals1] = {3,3};
protected
  Signal mySignals[numberOfSignals1](n = numberOfSignals2);
equation
  for j in 1:numberOfSignals1 loop
    for i in 1:numberOfSignals2[j] loop
      mySignals[j].values[i] = 1;
    end for;
  end for;
end ArrayOfSignalsTest;


When I check the model in OMEdit, I get the following result:

Check of ArrayOfSignalsTest completed successfully.


Class ArrayOfSignalsTest has 6 equation(s) and 6 variable(s).
6 of these are trivial equation(s).


Then when I run the model in OMEdit I get the following error:

---- Error 1 : 08:33:08 ----
Unable to simulate the Model 'ArrayOfSignalsTest'
Following Error has occurred.

Simulation failed for model: ArrayOfSignalsTest
[/home/..../file.mo:84:7-84:31:writable] Error: Illegal subscript [i] for dimensions 2, 3 in component mySignals
[/home/..../file.mo:84:7-84:31:writable] Error: Variable mySignals[j].values[i] not found in scope ArrayOfSignalsTest.$for loop scope$.$for loop scope$.$for loop scope$.$for loop scope$
Error: Error occured while flattening model ArrayOfSignalsTest


I don't know why this error occurs and how can I solve it.

Any help about this error would be appreciated.

Thank you in advance.

(by the way, note the mistyping in the word "occured" in the last sentence of the OMEdit output...)

  • Index
  • » Users
  • » jgb
  • » Profile
You are here: