- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Probelm with replaceable/redeclare model
Page Start Prev 1 Next End
Probelm with replaceable/redeclare model
Probelm with replaceable/redeclare model
Feb-10-12 14:53:16
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
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Probelm with replaceable/redeclare model
There are 0 guests and 0 other users also viewing this topic