#define alphax 0.0204 #define alphay 0.0242 #define betax 0.02 #define betay 0.0168 #define k1 10.0 #define k2 1.0 #define k3 10.0 #define k4 2 #define m1 0.00005 #define z0 12.0 #define gamma 0.08 #define r1 15.0 #define r0 3.0 #define d0 1.0 #define c1 0.01 #define c2 0.05 #define c3 0.02 #define vhalf 15 #define Gx ((alphax/(1+exp((k1-z)*k2)))-(betax/(1+exp((z-k3)*k4)))) #define Gy ((alphay * (1 - (d0 * (z / z0)))) - betay) #define Mxy (m1 * (1 - (z / z0))) #define scale 1.0 #define T 500.0 [0.0, 50.0] x; [0.0, 50.0] y; [0.0, 20.0] z; [0, 500.0] time; [0, T] tau; {mode 1; invt: (x >= 0.0); (x <= 50); (y >= 0.0); (y <= 50); (z >= 0.0); (z <= 20); (tau >= 0.0); (tau <= T); flow: d/dt[x] = scale * ((Gx - Mxy - c1) * x + c2); d/dt[y] = scale * (Mxy * x + Gy * y); d/dt[z] = scale * (-z * gamma + c3); d/dt[tau] = scale * 1.0; jump: ((x+y)=r0) ==> @2 (and (tau' = tau) (x' = x) (y'= y) (z' = z)); ((x+y)=vhalf) ==> @3 (and (tau' = tau) (x' = x) (y'= y) (z' = z)); } {mode 2; invt: (x >= 0.0); (x <= 50); (y >= 0.0); (y <= 50); (z >= 0.0); (z <= 20); (tau >= 0.0); (tau <= T); flow: d/dt[x] = scale * ((Gx - Mxy - c1) * x + c2); d/dt[y] = scale * (Mxy * x + Gy * y); d/dt[z] = scale * ((z0 - z) * gamma + c3); d/dt[tau] = scale * 1.0; jump: ((x+y)=r1) ==> @1 (and (tau' = tau) (x' = x) (y'= y) (z' = z)); } {mode 3; invt: (x >= 0.0); (x <= 50); (y >= 0.0); (y <= 50); (z >= 0.0); (z <= 20); (tau >= 0.0); (tau <= T); flow: d/dt[x] = 0; d/dt[y] = 0; d/dt[z] = 0; d/dt[tau] = 0; jump: ((x+y)<=0) ==> @1 (and (tau' = tau) (x' = x) (y'= y) (z' = z)); } init: @1 (and (x >=20 ) (x <= 30) (y = 0.1) (z = 16) (tau = 0)); goal: @3 (and (x >= 0.0) (x <= 50.0) (y >= 0.0) (y <= 50.0) (z >= 0.0) (z <= 20.0) (tau >= 0) (tau <= 60));