Skip to content

More detailed explanation of the two variants of using time.#3858

Open
HansOlsson wants to merge 1 commit intomodelica:masterfrom
HansOlsson:SampleTime
Open

More detailed explanation of the two variants of using time.#3858
HansOlsson wants to merge 1 commit intomodelica:masterfrom
HansOlsson:SampleTime

Conversation

@HansOlsson
Copy link
Copy Markdown
Collaborator

Closes #3855

@HansOlsson HansOlsson requested a review from henrikt-ma March 27, 2026 08:03
@HansOlsson HansOlsson added the clarification Specification of feature is unclear, but not incorrect label Mar 27, 2026
Additionally, it means that every sub-partition directly referencing \lstinline!time! contains a call to \lstinline!der!.
This means that \lstinline!time! can be used in two different ways.

The most intuitive is \lstinline!sample(time)! which works in any clocked partition, similarly as sampling any other continuous-time variable.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the impression that it should be emphasized that it can be part of a discrete-time sub-partition?

Suggested change
The most intuitive is \lstinline!sample(time)! which works in any clocked partition, similarly as sampling any other continuous-time variable.
The most intuitive is \lstinline!sample(time)!, which can be part of both discrete-time and discretized sub-partitions, similarly as sampling any other continuous-time variable.

This means that \lstinline!time! can be used in different partitions without any restrictions.
Additionally, it means that every sub-partition directly referencing \lstinline!time! contains a call to \lstinline!der!.
This means that \lstinline!time! can be used in two different ways.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of all these one or two sentence paragraphs, I think it will look better if we merge everything into a single non-normative paragraph on the theme of time.

Suggested change

This means that \lstinline!time! can be used in two different ways.

The most intuitive is \lstinline!sample(time)! which works in any clocked partition, similarly as sampling any other continuous-time variable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above:

Suggested change

Comment on lines +991 to +992
Additionally, \lstinline!time! can also be directly used in different clocked partitions without any restrictions.
However, every sub-partition directly referencing \lstinline!time! contains a call to \lstinline!der!, which makes it a discretized sub-partition \cref{discretized-partition}.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see the value of saying without any restrictions. Would this simplified one-sentence alternative work?

Suggested change
Additionally, \lstinline!time! can also be directly used in different clocked partitions without any restrictions.
However, every sub-partition directly referencing \lstinline!time! contains a call to \lstinline!der!, which makes it a discretized sub-partition \cref{discretized-partition}.
On the other hand, if \lstinline!time! is used without sampling it in a clocked partition, it brings a use of \lstinline!der! to its sub-partition, and hence the sub-partition must be a discretized one (compare \cref{discretized-partition}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarification Specification of feature is unclear, but not incorrect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants