|
Thank you for the suggestion.
I have implemented an example in L2V4 [1] but I couldn't get it to work in
Copasi [2] so far - the event should fire at least at t=6.25 but doesn't
(L2V4 doesn't support initialValues for triggers but it should be fine as
well as xmax and next_xmax are equal in the beginning).
[1] http://pastebin.com/YguQ7AAQ
[2] http://imageshack.us/photo/my-images/16/screenshotxbf.png/
> Hi,
>
> Encoding max/min is NOT the problem as this is easy to do with
> existing mathML subset just as he points out below:
>
> max(x,y) = piecewise(x,gt(x,y),y)
> min(x,y) = piecewise(x,lt(x,y),y)
>
> If you like to use those functions, then simply add those to your list
> of functions.
>
> The actual problem is the desire to create a function that updates a
> variable based on the variables value. Since assignment rules are
> evaluated continuously, this usually will not make sense as your
> simulator would simply halt continuously updating its value. For
> example, what if you said: x := x + 1.
>
> In the case mentioned, the value reaches a fix point, so in some sense
> it is okay assuming that x and xmax are defined initially. To avoid
> the problem getting into an infinite update loop, SBML simply
> disallows all cycles whether or not they could reach a fix point. The
> only way I see that this can currently be encoded is to use an event
> to update it. For example:
>
> Rule:
> nextXmax := piecewise(x,gt(x,xmax),xmax)
>
> Event:
> Trigger: neq(xmax,nextXmax)
> Trigger initially true: false
> Assignment: xmax:extXmax
>
> I tried this, and it seems to work.
>
> Cheers,
>
> Chris
>
>
> On May 18, 2011, at 8:39 AM, Nicolas Le Novère wrote:
>
>> Hello all,
>>
>> Just to mention that we need the min/max functions in SED-ML as
>> well. I
>> thought it was there but it is not. And as a result SED-ML cannot
>> encode
>> one of the examples present in the MIASE paper ...
>>
>> So I would vote to include min and max to the next version of the
>> core (or
>> in the extended math package, if this is still planned)
>>
>> Cheers
>>
>> On 18/05/11 09:51, schubert@ebi.ac.uk wrote:
>>> Dear all,
>>>
>>> A model I'm trying to encode is using the function
>>> max*(x,t0) = max(x,t<=t0)
>>> where x is a variable, t the time and t0 the current time.
>>>
>>> Is there a way to encode this in SBML? The most natural way to do
>>> it would
>>> be a
>>> xmax = piecewise(x,gt(x,xmax),xmax)
>>> but that is rejected as circular assignment (also when xmax has an
>>> initial
>>> value, i.e. the expression itself would be mathematically valid).
>>>
>>> Alternatively, is there a reason this is prohibited entirely
>>> instead of
>>> checking whether xmax has an initial value?
>>>
>>> Regards,
>>> Michael
>>>
>>> ____________________________________________________________
>>> To manage your sbml-discuss list subscription, visit
>>> https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
>>>
>>> For a web interface to the sbml-discuss mailing list, visit
>>> http://sbml.org/Forums/
>>>
>>> For questions or feedback about the sbml-discuss list,
>>> contact sbml-team@caltech.edu
>>
>>
>> --
>> Nicolas LE NOVERE, Computational Systems Neurobiology, EMBL-EBI, WTGC,
>> Hinxton CB101SD UK, Mob:+447833147074, Tel:+441223494521 Fax:468,
>> Skype:n.lenovere, AIM:nlenovere, twitter:@lenovere
>> http://www.ebi.ac.uk/~lenov/, http://www.ebi.ac.uk/compneur/
>>
>> ____________________________________________________________
>> To manage your sbml-discuss list subscription, visit
>> https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
>>
>> For a web interface to the sbml-discuss mailing list, visit
>> http://sbml.org/Forums/
>>
>> For questions or feedback about the sbml-discuss list,
>> contact sbml-team@caltech.edu
>
> ____________________________________________________________
> To manage your sbml-discuss list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
>
> For a web interface to the sbml-discuss mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the sbml-discuss list,
> contact sbml-team@caltech.edu
>
____________________________________________________________
To manage your sbml-discuss list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
For a web interface to the sbml-discuss mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the sbml-discuss list,
contact sbml-team@caltech.edu
|