Opened 18 years ago

Last modified 14 years ago

#110 closed defect (fixed)

Linefeeds in Modelica comment strings causes simulation failure

Reported by: Peter Fritzson Owned by: Peter Fritzson
Priority: critical Milestone:
Component: Version:
Keywords: Cc: Peter Fritzson, Adrian Pop

Description

See comments.

Change History (2)

comment:1 by Peter Fritzson, 18 years ago

Linefeeds in Modelica comment strings causes simulation failure
since they are transmitted to the C code.

Not acceptable from the usability point of view.

Example: linefeed in comment string for Real s:

partial model Rigid "Rigid connection of two translational 1D flanges"

Real s "Absolute position s of center of component

(s = flange_a.s + L/2 = flange_b.s - L/2)";

parameter Real L = 0 "Length L of component from left to right flange"+

"(L = flange_b.s - flange_a.s)";

Modelica.Mechanics.Translational.Interfaces.Flange_a flange_a;
Modelica.Mechanics.Translational.Interfaces.Flange_b flange_b;

equation

flange_a.s = s - L/2;
flange_b.s = s + L/2;

end Rigid; From Modelica.Mechanics.Translational.Interfaces

Could be changed manually to:

partial model Rigid "Rigid connection of two translational 1D flanges"

Real s "Absolute position s of center of component"+

"(s = flange_a.s + L/2 = flange_b.s - L/2)";

parameter Real L = 0 "Length L of component from left to right flange"+

"(L = flange_b.s - flange_a.s)";

Modelica.Mechanics.Translational.Interfaces.Flange_a flange_a;
Modelica.Mechanics.Translational.Interfaces.Flange_b flange_b;

equation

flange_a.s = s - L/2;
flange_b.s = s + L/2;

end Rigid; From Modelica.Mechanics.Translational.Interfaces

comment:2 by Martin Sjölund, 14 years ago

This was fixed some time in 2009

Note: See TracTickets for help on using tickets.