条件
状态语法
规则^ | 如果违反条件则出错 |
---|---|
每个状态必须有名称。 |
路由器循环错误:ErrorException('model_name/Chart': state name ' ' is incorrect)。 |
|
路由器中结果循环的错误:ErrorException('model_name/Chart': state name 'example of invalid name' is incorrect)。 |
操作符组只支持 Julia 语言操作。 |
模型初始化错误:[EXEC] 模型初始化错误 id_model id_simulation: UndefVarError(:incorrect syntax) |
在没有指定前缀 entry:
、during:
、exit:
和 on
的状态下编写的代码,在状态激活时和模型的每一步都会执行,只要状态保持激活状态,并使用匿名运算符组调用代码。这种操作符组结合了 entry:
和 during:
前缀的行为。例如,一个带有 for
循环的状态块是这样的
您可以在状态块中留下注释,就像在任何 Julia 代码中一样: |