Question: Why does MapleSim random data custom component with zero mean cause simulation problem?


I have a simulation file consisting of a number of modelica custom componets and maple custom components. I initially generated Random Data with mean 1 and standard deviation 0.5. Constructed all the blocks and combined with a multibody system, it worked fine. However, when I generated Random data with zero mean, then I have this error/problem "Simulation Problem: maximum number of event iterations reached (100) at 1.85000".

I used a couple of pre() function with clock=sample(0,0.01) and chose false dapative in simulation settings by assigning 0.01 stepsize. Initially, this seemed to me the source of the error and when I changed adaptive to true, this problem disappeared. However, I think it is necessary for my simulation to assign 0.01 step size as I use pre() function with sample(0,0.01).

How can avoid/eliminate this problem? I do not mind whether the simulation setting adaptive true or false, but it is important for me to reach the vectors/parameters just before the previous time step (therefore I used pre() function) together with current time step. Here is the simulation file test.msim.

If you have any idea/solution for this, I will be very pleased.


Please Wait...