#2830 closed defect (fixed)
Override of start attributes does not work in combination with fixed=true
Reported by: | Lennart Ochel | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | christoph.brinkrolf@… |
Description
The following model can be used to explore the issue. Using the override flag changes the start value of x, but does not affect the initial solution of x.
loadString(" model foo Real x(start=1.0, fixed=true); parameter Real p=1.0; equation der(x) = p; end foo; "); getErrorString(); simulate(foo, stopTime=0.0, simflags="-override=p=-2,x=0 -lv=LOG_SOTI"); getErrorString();
Change History (9)
comment:1 by , 10 years ago
Status: | new → accepted |
---|
comment:2 by , 10 years ago
Cc: | added |
---|
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
unfixed in r22403
It is not a good idea to allow to override each start value, since some start expressions in combination to fixed=true affect the initial system structure.
follow-up: 6 comment:5 by , 10 years ago
We should at least print a warning if a value cannot be overridden (or does not exist, as is also common).
comment:6 by , 10 years ago
Replying to sjoelund.se:
We should at least print a warning if a value cannot be overridden (or does not exist, as is also common).
Yes, that is actually what I want to do. But maybe there is a better solution.
comment:7 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
This is fixed with PR275.
Now, it is possible to override all kind of start values using one of the override flags or an external mat file.
fixed in r22392