Hi Hussein,
I think you should take the very final value. For example, if the simulation stops at T=10, go to the row when time = 10 and take the correspondent value. This is because you are running this model until certain stop time, and is calculating this integral until that time.
Hope it helps!