Skip to content

Is pre(c) for a constant a variable of the initialization problem? #3369

@henrikt-ma

Description

@henrikt-ma

This model looks crazy to me, but I can't find support in the specification for rejecting it:

model ConstantPre
  constant Real c = 1.0;
initial equation
  pre(c) = 2.0;
end ConstantPre;

Maybe we should deprecate this kind of craziness?

What about the parameter case?

model ParameterPre
  parameter Real p = 1.0;
initial equation
  pre(p) = 2.0;
end ParameterPre;

Outside of initial sections, it seems straight-forward to just apply the simplification pre(c)c, which would also be safe for a parameter, right?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions