Opened 10 years ago

Last modified 10 years ago

#2863 assigned defect

NFSCodeDependency removes used constant

Reported by: Adrian Pop Owned by: Per Östlund
Priority: high Milestone: Future
Component: Frontend Version: trunk
Keywords: Cc:

Description

It seems that when you have redeclares for types of the components
in some cases some of the constants from them are removed.
See attached model. Constant scale in Delta disappears on saveTotalSCode.

Attachments (1)

TransformerTotal.mo (183.0 KB ) - added by Adrian Pop 10 years ago.

Download all attachments as: .zip

Change History (4)

by Adrian Pop, 10 years ago

Attachment: TransformerTotal.mo added

comment:1 by Adrian Pop, 10 years ago

Owner: changed from somebody to Per Östlund
Status: newassigned

comment:2 by Adrian Pop, 10 years ago

Component: UnknownFrontend

comment:3 by Adrian Pop, 10 years ago

        model Delta  
          extends TopologyBase(final n_n = 0);
        protected
          final parameter Real[2, 2] Rot = Basic.Transforms.rotation_dq((1 - 4 * sh) * .Modelica.Constants.pi / 6);
        equation
          v_cond[1:2] = s3 * Rot * v_term[1:2];
          v_cond[3] = 0;
          i_term[1:2] = s3 * transpose(Rot) * i_cond[1:2];
          i_term[3] = 0;
        end Delta;

This should have a constant scale = 3 and there is no more.

Note: See TracTickets for help on using tickets.