Opened 8 years ago

Closed 8 years ago

#4030 closed defect (invalid)

delayTime not a parameter expression

Reported by: palmer.ap@… Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc:

Description

According to the Modelica specification, delayTime does not necessarily need to be a parameter expression, but when I make delayTime time-dependent, I get an error that delayTime is not a parameter expression. the simple logic below gives that error.

model DelayTest
Real DelayTime;
Real Output;
Real Input;

equation
DelayTime = 0.1*time;
Input = sin(time);
Output = delay(Input,DelayTime);
end DelayTest;

Change History (1)

comment:1 by Willi Braun, 8 years ago

Component: *unknown*Backend
Resolution: invalid
Status: newclosed

the spec states:

If delayMax is not supplied in the argument list,
delayTime need to be a parameter expression.

And the following works fine for me:

loadString("
model DelayTest
  Real DelayTime;
  Real Output;
  Real Input;
equation
  DelayTime = 0.1*time;
  Input = sin(time);
  Output = delay(Input,DelayTime,5);
end DelayTest;
");
getErrorString();

simulate(DelayTest, stopTime=5);
getErrorString();
Note: See TracTickets for help on using tickets.