*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***
Hi Sebastián,
Events is the most efficient way of doing this. You could define a
function with "if" statements but internally it gets converted to events
anyway. Events make it more explicit
I had previously created a file to demonstrate how to do this type of
thing, called "PulsedDrug.cps" which you can download from my models
repository at
https://github.com/pmendes/models
This model shows how to turn on and off something by using a combination
of global quantities and events. Basically one event to turn on, and
another to turn off. This model uses on/off to add an inhibitor but you
can do anything (ie change any parameter or variable at the on time, and
then again at the off time). The events keep adding the correct times so
that they keep being triggered at the right times. You can adjust the
amount of time for the ON condition, as well as how long you want the
OFF condition.
There is another model called "PulsedDrugLadder.cps" which shows how to
make the actions at the ON time different every time (in this case a
simulating a drug dose ladder)
Let me know if this helps.
Pedro
On 10/25/24 18:49, Sebastián wrote:
> Hi community,
>
> I am trying to simulate a system where the input is ON for a given t_on
> time (e.g., 10 s) and then OFF for a given t_off time (e.g., 90 s), such
> that this cycle takes a total time of T = t_on + t_off (e.g., 100 s).
>
> This is repeated throughout the process. I am currently trying /events/,
> though I am wondering if there is a more efficient way to approach this
> problem. Specifically, I am looking for a function that I can write
> directly in COPASI such that it approximates the explained behavior
> without using events. That is, I am looking for a function where I can
> specify t_on and t_off and I simulate the process at once, in a
> straightforward manner.
>
> Thank you!
>
> Best,
> Sebastian
>
> --
> You received this message because you are subscribed to the Google
> Groups "COPASI User Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
copasi-user-fo...@googlegroups.com
> <mailto:
copasi-user-fo...@googlegroups.com>.
> To view this discussion visit
>
https://groups.google.com/d/msgid/copasi-user-forum/fd419ec3-d5a3-45ae-b377-bb312467fcc5n%40googlegroups.com <
https://groups.google.com/d/msgid/copasi-user-forum/fd419ec3-d5a3-45ae-b377-bb312467fcc5n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Pedro Mendes, PhD
Professor and Director
Richard D. Berlin Center for Cell Analysis and Modeling
University of Connecticut School of Medicine
group website:
http://www.comp-sys-bio.org