- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Multi-level parameters
Multi-level parameters
Multi-level parameters
I would like to have access to the dialog for parameters of two replaceable models M1 (x,y,z) and M2 (u,v) but as they are defined in an upper model SYS, the dialogs are not visibles
package TwoLevelParameter
model M1
parameter Real x;
parameter Real y;
parameter Real z;
Real R;
equation
R = x + y + z;
end M1;
model M2
parameter Real u;
parameter Real v;
Real R;
equation
R = u * v;
end M2;
model SYS
replaceable M1 m annotation(
choices(choice(redeclare M1 m "Default"),
choice(redeclare M2 m "Variant")));
end SYS;
model Essai
M1 m1(x = 1, y = 2, z = 3) annotation(
Placement(visible = true, transformation(origin = {-58, 54}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
M2 m2(u = 2.3, v = 5.) annotation(
Placement(visible = true, transformation(origin = {36, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
SYS sys annotation(
Placement(visible = true, transformation(origin = {-26, -8}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
end Essai;
end TwoLevelParameter;
Re: Multi-level parameters
This is not posibile yet. We are working on implementing it.
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Multi-level parameters