Events via Basico

16 views
Skip to first unread message

cel.c...@gmail.com

unread,
May 1, 2024, 8:09:49 AMMay 1
to COPASI User Forum
Hello,
is it possible to define events via Basico in a code?
Thanks in advance

Frank Bergmann

unread,
May 1, 2024, 8:28:36 AMMay 1
to COPASI User Forum
Indeed, you'd use the function add_event / set_event to create / modify the events. For example: 

add_event('e0', 'Time > 30', [['X', '10']]);

Here a new event 'e1' is created that Fires immidiately after time reaches 30 and sets X to 10. So here we use name, trigger expression and event assignments. Additionally delay expressions and priority expressions could be used [1].  If you have a specific event in mind I could give you the basico code for that. 

best
Frank

cel.c...@gmail.com

unread,
May 24, 2024, 10:43:46 AMMay 24
to COPASI User Forum
Perfect!
Thank you!
Reply all
Reply to author
Forward
0 new messages