42 | | The rationale of this structural restriction is instead that when-equations are activated only at event instants, when they are (conceptually) solved together with all the other non-when-equations that are always active (single assignment rule). Otherwise, if the when-equation is not activated, ''its corresponding discrete variable is kept constant''. In practice, you have many blocks in the BLT, some of them matched to discrete variables, some to continuous variables, and you only execute the blocks that are active at the current step; if you end up with blocks matched with mixed continuous and discrete equations, you give up. At least that's what Dymola does, and it's fine, because most of the time the mixed system is the result of having incorrectly omitted some {{{pre()}}} operators. |
| 42 | The rationale of this structural restriction is instead that when-equations are activated only at event instants, when they are (conceptually) solved together with all the other non-when-equations that are always active (single assignment rule). Otherwise, if a when-equation is not activated, ''its corresponding discrete variable is kept constant''. In practice, you have many blocks in the BLT, some of them matched to discrete variables, some to continuous variables, and you only execute the blocks that are active at the current step; if you end up with blocks matched with mixed continuous and discrete equations, you give up. At least that's what Dymola does, and it's fine, because most of the time the mixed system is the result of having incorrectly omitted some {{{pre()}}} operators. |