Cancel
Showing results for 
Search instead for 
Did you mean: 

Wait statement problem

Dear Community,

 

i probably do something wrong using the wait statement even tough i can't find any suggestion on the help.

As you can see below i've a very simple task to do; waiting for 4 hours before moving the MUs

Wait1.png

 

 

 

and this is the event controller:

 

Wait2.png

 

I'm not sure but i think that the problem is that the method moved another MUs and now there is no more MUs left to move, causing error.

When do we use the wait statment the called method is not connected to the MUs? for example: MU#1 called the method 1 and "freeze" for 4 hours till it's called back again and move the MU#1? or it works differently? if MU#2, that has to be processed immediately, use the method 1 or another one?

Thank you

3 REPLIES

Re: Wait statement problem

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the method is not connected with a special MU, so the MU could be moved by the connector or an exit control; so the combination of entrance control and wait statement is difficult; you can use this in an exit control (front) with the move statement some lines ahead

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

Re: Wait statement problem

Dear Steffen,

 

i don't know if i understand that correctly; you are suggesting to end the entrance control method before the wait statement and move the wait statement in an exit control (front)?

By the way, is there any other way to do this "wait" job in a safer way?

Thank you

Re: Wait statement problem

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

no, what I'm meaning is, that it is a very bad idea, to use wait or waituntil statement in an entrance control; if you want to have a safe way, you can only use it in an exit control front 

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