Skip to content

Editing of fixed attribute for variables with enable=false #14095

@abuntrock

Description

@abuntrock

Description

If a variable declaration includes the annotation enable=false it cannot be edited but its modifiers like fixed can.

Steps to Reproduce

  1. Load the following modelica package
package FixedEnabled
   
model MainClass
    Real realVariable(start=0.0) = time annotation(
      Dialog(showStartAttribute=true, enable = false));
  end MainClass;

  model ClassWithInstance
  MainClass mainClass annotation(
      Placement(transformation(extent = {{-10, -10}, {10, 10}})));
  equation

  end ClassWithInstance;
end FixedEnabled;
  1. Open the parameter dialog of mainClass' in ClassWithInstance`. It looks like this::
Image Image

The start value realVariable.start cannot be edited but the fixed and final modifiers can. This can cause problems. In this minimum example the simulation fails if realVariable.fixed=true is set. And this simulation failure cannot be prohibted by enable=false right now.

Expected Behavior

The modifiers (especially fixed) of variables, whose start value cannot be edited because of enable=false, cannot be edited as well.

Addition: We would expect the same for the modifiers of parameters (like final) that have enable=false.

Version and OS

  • OpenModelica Version: 1.25.1 and v1.26.0-dev-193-gb240e08b71
  • OS: Windows 11, 64 bit

Thanks for looking into this
Aaron Buntrock - Bosch Rexroth

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions