Skip to content

What is the point of sampling 'time' with inferred clock? #3855

@henrikt-ma

Description

@henrikt-ma

Why is sample applied to time here?

when Clock() then // equations are on the same clock
x = A * previous(x) + B * u;
Modelica.Utilities.Streams.print
("clock ticks at = " + String(sample(time)));
end when;

It reminds me of how time is also sometimes sampled in the MSL, such as in Modelica.Clocked.RealSignals.TimeBasedSources.Sine:

  simTime = sample(time);

What is the point of sampling time in these ways? If it is pointless, should the specification and the MSL be simplified in order to not give the impression that it is needed?

Metadata

Metadata

Assignees

Labels

clarificationSpecification of feature is unclear, but not incorrect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions