3 Start:elapsed_real_time()$
10 g(v):= ginf*v/(v+100)$
11 f(v):= 20.0*v/(v+1.0)$
19 [Root_at,y_root]: Eulix([p - sx*x -rx*x*v +g(v)*x,
21 n*g(v)*y +f(v) -sv*v -(rx+rv)*x*v],[x,y,v],
22 [1000.0,0,1.0],[t,0.0,t_final,1,v-t-245.0],
23 initial_step_size=1,absolute_tolerance=1e-8,logging=Logging,
25 if first(Root_at) > 0 then (
26 print("I've used ",elapsed_real_time()-Start,"seconds for computing the AIDS model"),
27 print("Solution triggered by condition",first(Root_at)," at time ",second(Root_at),
28 " and state:",third(Root_at)),
29 print("y_root=",y_root),
31 y_final: Eulix([p - sx*x -rx*x*v +g(v)*x,
33 n*g(v)*y +f(v) -sv*v -(rx+rv)*x*v],
34 [x,y,v],y_root,[t,t1,t_final,1],
35 absolute_tolerance=1e-8,logging=true,
38 print("solution at final time",t_final," is ",y_final)
39 ) else print("no root condition has been triggered")$