Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piecewise functions #74

Open
tclose opened this issue Jan 17, 2015 · 1 comment
Open

Piecewise functions #74

tclose opened this issue Jan 17, 2015 · 1 comment

Comments

@tclose
Copy link
Contributor

tclose commented Jan 17, 2015

In the models I am planning to port, piece-wise continuous expressions are required. The subset of MathML that SBML uses has piecewise expressions but since we are not supporting MathML at this stage I have come up with a MathML-like syntax until then, i.e.

<Piecewise name="saturatedVoltage">
  <Piece>
    <MathInline>100</MathInline>
    <Condition>
      <MathInline>v &gt; 10</MathInline>
    </Condition>
  </Piece>
  <Otherwise>
    <MathInline>v * v</MathInline>
  </Otherwise>
</Piecewise>

Within transition blocks, connection rules (see #72) and distribution components (see #63), I don't forsee any issues with piecewise functions, but I am not sure whether they should be allowed within Dynamics blocks, or whether the same functionality could and should be handled by regime changes (my feeling).

@tclose tclose added this to the Version 2.0 milestone Jan 18, 2015
@tclose tclose changed the title Piece-wise functions Piecewise functions Jan 19, 2015
@tclose tclose added the Priority label Apr 1, 2015
@NineML-Committee
Copy link
Contributor

The committee agreed that piecewise functions should not be allowed in Dynamics components, except within transitions and should be allowed in connection rule and distribution components.

In addition:
When using MathInline the ternary operator should be used:

<MathInline>v &gt; 10 ? 20 : v</MathInline>

and can be nested

<MathInline>v &gt; 10 ? v &gt; 20 ? 30 : v+5 : v</MathInline>

When using MathML the standard MathML tags should be used - it must be noted that within MathML blocks tag ordering is important, in contrast to NineML.

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

No branches or pull requests

2 participants