You are here

Why different result?

I tried to test some part of SUCROS  model.

When I got the rate of development stage, the results were different by changing time step from 1 to 0.1.

I also made simple models to know the reason.

But I can't understand well.

I attached simple models.

AttachmentSize
Binary Data timestep2.sml74.88 KB
File test5.csv19.56 KB
Forums: 

This is happening due to the limited precision of floating-point arithmetic. The flow DVR in your model switches between two values when the compartment DVS reaches a value of 1. In many cases, this will theoretically occur an exact number of time steps after the start. However the compartment's value is generated by summing the increments at each preceding time step, so its actual value at this point may be very slightly greater or less than 1 for any given time step size. Thus you will see apparently random differences in the final result for different time steps.

These errors are no greater than the numerical integration errors in general for model operation at a given time step. You can eliminate them by selecting adaptive step size variation with an appropriate error limit (see Simile Help) but this will cause your model to run slightly slower.