Opened 10 years ago
Closed 5 years ago
#3202 closed defect (fixed)
world.g override does not propagate
Reported by: | crupp@… | Owned by: | adrpo |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
When overriding world.g, the override does not propagate to models from Modelica.Mechanics.MultiBody. Consider this example:
loadModel(Modelica); simulate(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum, simflags="-override world.g=1.0"); // Override works here val(world.g, 0); // Does not work here, should also be 1.0 val(body.g_0[2], 0);
The defect seems to stem from the replaceable function gravityAcceleration in MultiBody.Parts.Body. If this function is replaced with world.g*world.n then the override works as expected.
Tested in r24986.
Change History (2)
comment:1 Changed 10 years ago by adrpo
- Component changed from Unknown to Frontend
- Owner changed from somebody to adrpo
- Status changed from new to accepted
comment:2 Changed 5 years ago by crupp@…
- Resolution set to fixed
- Status changed from accepted to closed
Seems to be working now. I'll close it so that you don't need to worry about it any more.
Yes. Unfortunately in some cases we replace the parameter with its value even if we should do that only for structural parameters (array sizes, conditions of conditional components, etc).