Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#6138 closed defect (fixed)

OMEdit gives an error when trying to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

Reported by: Andrea.Bartolini Owned by: adeas31
Priority: blocker Milestone: 1.16.0
Component: OMEdit Version: v1.16.0-dev
Keywords: Cc: casella

Description

Step to reproduce the error:
1) open the attached package Test.mo
2) open M1 model, double click on the real expression component, change parameter and press OK. Modifier is updated as expected,
3) open M2 model, double click on the real expression component, change parameter and press OK, the following error is returned

[1] 11:22:27 Scripting Error
Unable to set the component modifier value using command setElementModifierValue(Test.M2, realExpression.y, $Code(=123))

and the parameter is left unchanged.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-647-g2a078a0
Sysop: Ubuntu 18.04

Attachments (2)

Test.mo (856 bytes) - added by Andrea.Bartolini 4 years ago.
Test1.mo (1.2 KB) - added by Andrea.Bartolini 4 years ago.

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by Andrea.Bartolini

comment:1 Changed 4 years ago by Andrea.Bartolini

UPDATE:
the problem disappears if the replaceable support is deactivated...

comment:2 Changed 4 years ago by Andrea.Bartolini

  • Summary changed from OMEdit get error when try to set parameters if an "extends" clause is present to OMEdit get error when try to set parameters if an "extends" clause is present and replaceable support is active

comment:3 Changed 4 years ago by Andrea.Bartolini

  • Summary changed from OMEdit get error when try to set parameters if an "extends" clause is present and replaceable support is active to OMEdit get error when try to set parameters or variable modifier if an "extends" clause is present and replaceable support is active

In attached file test1.mo both variable and parameter modifiers are tested.
Both of them get errors (parameter k in firstOrder filter, y in realExpression).

[1] 10:23:31 Scripting Error
Unable to set the component modifier value using command setElementModifierValue(Test1.M2, firstOrder.k, $Code(=123))[3] 10:23:44 Scripting Error

Unable to set the component modifier value using command setElementModifierValue(Test1.M2, realExpression.y, $Code(=123))

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-655-g93494e4
Sysop: Ubuntu 18.04

Changed 4 years ago by Andrea.Bartolini

comment:4 Changed 4 years ago by Andrea.Bartolini

  • Summary changed from OMEdit get error when try to set parameters or variable modifier if an "extends" clause is present and replaceable support is active to OMEdit get error when try to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

comment:5 Changed 4 years ago by casella

  • Summary changed from OMEdit get error when try to set parameter or variable modifier if an "extends" clause is present and replaceable support is active to OMEdit gives an error when trying to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

comment:6 Changed 4 years ago by adrpo

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 3 years ago by casella

Looks good.

comment:8 Changed 3 years ago by Andrea.Bartolini

Seems to work on Ubuntu 18.04

Note: See TracTickets for help on using tickets.