I tried redeclare model that contain global (outer) parameter. Here simple example of my code:
package tests
model M0
inner parameter Real a = 1;
end M0;
model M1
extends tests.M0;
replaceable tests.M3 c;
end M1;
model M2
outer constant Real a;
end M2;
model M3
extends tests.M2;
Real b;
equation
b = a;
end M3;
model M4
extends tests.M2;
Real b2;
equation
b2 = a;
end M4;
model test1
tests.M1 X;
end test1;
model test2
tests.M1 X(redeclare each tests.M4 c);
end test2;
end tests;
Test1 works fine, but with test2 I have warning An inner declaration for outer component a could not be found and was automatically generated.
Without "inner/outer" all works fine.
The warning occurs even if M3 and model M4 have identically code
model M3 // and M4
outer constant Real a;
Real b;
equation
b = a;
end M3;
or if redeclare the same model
model test3
tests.M1 X(redeclare tests.M3 c);
end test3;
I am using OM 1.18