Cancel
Showing results for 
Search instead for 
Did you mean: 

"a method is running for more than 10 seconds" problem

Valued Contributor
Valued Contributor

Dear community members,

when I run my model, after 5 mins of simulation the software stops and says "a method is running for more than 10 seconds".

I don't get why this error occurs.

Attached there is my model. It would be great if you can have a look into.

 

Thanks

2 REPLIES

Re: "a method is running for more than 10 seconds" problem

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

there are some issues with your model:

- init-Method of the buffers: you need to call setCursor(1,1) before calling find (otherwise the curser is placed after the init of the first buffer on the wrong position and the second buffer is not found --> one additional, double  entry is created)

- you have an endless loop for the case, that a buffer is empty in your calledbypull method. You need to wait a little bit in the loop, to give the simulation a chance to run (e.g. wait(1)).

- entry control of the parallelProc: you cannot suspend this method with the condition parallelProc.empty; each MU will trigger this method  --> many suspended methods; here it is better to use the exit control rear of the parallelProc to trigger the calledByPull method, if the ParallelProc is empty

 

one remaining problem: the observer of the buffers causes problems when reset the simulation, may be, you need another approach for moving the 3 parts between the buffers

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: "a method is running for more than 10 seconds" problem

Valued Contributor
Valued Contributor
I made some little variations in the calledbypull and method1 codes and it works perfectly. many thanks Steffen!