Opened 9 years ago
Closed 8 years ago
#3643 closed defect (fixed)
Change in parameters after translation has no effekt on dependend protected parameter
Reported by: | Owned by: | Adeel Ashgar | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | parameter dependencies | Cc: | Lennart Ochel |
Description
Hi guys,
there seems to be an issue with changing parameters after translating/simulating a model in OMEdit.
Having a protected parameter A dependent on two other parameters B and C, the change of B and C has no effect on the value on A, after the model has been translated/simulated.
It seems like the protected parameter value is fixed.
Find attached a small model demonstrating this behavior.
Within this small package there is a model ExampleModel which has the parameters Length1 and Length2 as well as the protected parameter TotalLength.
What causes issues is:
Changing the parameters Length1 and Length2 in the ExampleTestCase model after simulating it for a first time within the "ResultTree".
Simulating it again shows no effect on the protected parameter.
Best regards,
Andreas
Attachments (1)
Change History (6)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
It seems the attaching issue is because of some Trac bug and the fact that you have German as default language in your browser.
As a workaround go to Trac->Preferences->Language and set it to English (US).
Then try to attach the files again.
---
As per your problem we do evaluate some of the parameters during compilation but if you can attach a model it would be better for us to debug it.
by , 9 years ago
Attachment: | ExampleLib.mo added |
---|
comment:3 by , 9 years ago
Cc: | added |
---|---|
Component: | OMEdit → Backend |
The backend does something weird here. The front-end has kept the original equation and Length1/Length2 are marked as changeable (which means that nothing depending on these parameters may be evaluated), yet TotalLength has no parameter equation associated with it. It also has no operations so the debugger does not show anything for the variable.
comment:4 by , 8 years ago
Parameter exampleModel.bodyShape.lengthDirection
has annotation Evaluate=true
and is dependent on exampleModel.bodyShape.r
, which depends on exampleModel.Length1
, so exampleModel.Length1
has to be evaluated as well and can not be changed after compilation. Something similar applies to exampleModel.Length2
.
Since exampleModel.TotalLength
depends on two evaluated parameters it is evaluated as well. This is the correct way to handle the issue.
Since 2c1a8a1 it is no longer possible to override final/evaluated parameters, so everything is handled correctly now.
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
unfortunately I cannot add files right now
IndexError: pop from empty list