- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Good practice on parameter...
Good practice on parameter centralization
Good practice on parameter centralization
Hello,
Would it be considered a bad practice to collect several parameters of a multi-component system into a single record?
This would allow a quicker change of a set of parameters, but I don't know whether it's considered as good practice in general.
for example (code snippet below might contains errors, but it's just to illustrate what I mean):
record overview
parameter real p1;
parameter real p2;
end overview;
class one
parameter real p1;
overview myBag;
equations
p1 = myBag.p1;
end one;
class two
parameter real p2;
overview myBag;
equations
p2 = myBag.p2;
end two;
gtz,
Dieter
Re: Good practice on parameter centralization
A record with only parameters is fine. Mixing parameters and variables in the same record is begging for trouble.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Good practice on parameter...