Opened 15 years ago
Last modified 15 years ago
#1193 closed defect (fixed)
Error when final array parameter is set via an initial equation
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Instantiation | Version: | |
Keywords: | Cc: | Adrian Pop, Per Östlund |
Description
This model:
model FinalInitialEquation final parameter Real p[3](each unit="1", each fixed=false); Real x(start = 1); initial equation p = {1.0, 2.0, 3.0}; equation der(x) = -p[1] * x; end FinalInitialEquation;
wrongly gives error:
[FinalInitialEquation.mo:3:2-3:60:readonly] Error: Variable p: trying to override final variable in class:
Attachments (2)
Change History (4)
by , 15 years ago
Attachment: | LoopsTotal.mo added |
---|
by , 15 years ago
Attachment: | LoopsTotal.mos added |
---|
This is a bigger model that has this error.
./omc LoopsTotal.mos [LoopsTotal.mo:3786:13-3787:72:readonly] Error: Variable jointRRP.e_im: trying to override final variable in class: Error: Error occured while flattening model Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic
If this error is fixed on the smaller model, it should be verified also against this bigger model.
comment:2 by , 15 years ago
Fixed in revision 5303. Turned out to be a problem with modifications on final variables, and nothing to do with initial equations. The LoopsTotal model still gives errors, but I think the remaining errors are unrelated to this bug so I'm marking this bug as resolved anyway.
This is a bigger model that has this error.
If this error is fixed on the smaller model, it should be verified also against this bigger model.