Event and Trigger Questions

19 views
Skip to first unread message

Victor Guo

unread,
Feb 20, 2024, 9:45:28 AMFeb 20
to COPASI User Forum
Hi, 

I'm creating a virus-immune response model in COPASI. How do I create a reaction (or maybe an event) that gets triggered later in the simulation? e.g. When an event representing the patient getting infected with virus gets triggered, then start the reaction of generating antibodies? The antibody should be continuously generated at a constant speed k.

I know how to model the constant change as a reaction but don't know how to trigger that reaction later in the simulation. 

I know how to trigger an event at certain condition but don't know how to do continuous changes in the event assignment.

Thanks!





Frank Bergmann

unread,
Feb 20, 2024, 9:55:46 AMFeb 20
to COPASI User Forum
One way to do something like that, is to ensure that your `k` parameter of your Reaction is a global parameter. Then you could target it by an event. 

Attached a very simple example: 

- global parameter R1_k, initially 0, since we don't want the reaction to proceed
- reaction R1: A -> B, mass action, using a global parameter R1_k
- an event, that triggers the reaction. Here at time > 1, R1_k will be set to 1. 

I hope this helps, 

best
Frank

EventStartsReaction.cps
Reply all
Reply to author
Forward
0 new messages