in the attached model the carrier before movind from BA_210 to BA_220 should check 2 conditions = true (Method_Lines_Out) and move. What is happening is when the transporter reaches the end of the BA_210, it starts the method (Method_Lines_Out) and move without wait the method conclusion. It makes the method to be suspended and the model does not represents the process.
Can someone help me to understand what is happening?
for these kind of issues you should use the debugger
to follow what is happening.
In this case you are calling the Method_lines_out -method
In this method you have set a delay ( wait delay) of 2 seconds
during this method delay the mu ( geopallet) , which triggered the method
continues to travel to the next stations as you haven't stopped it.
Therefore at the end of the 2s delay, the mu has moved
to station BA_230 and the @.move action takes place at BA_230 station.
(Sorry Simulator we posted the reply in the same time) !
Try to activate "ExitLocked" of BA_210 or stop your carrier :
local carrier : object := @ ;
carrier.stopped := true ;
waituntil your conditons prio 1 ;
carrier.stopped := false;
I Hope It Helps
but the geopallet should only move to BA_030 after waiting 2 sec according the method.
Why while the geopallet is in BA_010 it follow the method but when it is in BA_020 it does not?
I also tried to put in the method @.stopped = true, wait 2 sec and then @.stopped = false.
it did not work as expected as well.
it heppens because the method "Method_Lines_Out" remains suspended even after the first geopallet was moved to BA_230. Right after the first geopalled be moved to BA_230 the method "Method_Lines_Out" should terminate but due to some reason it doesn't.
I guess, you need really to wait. In your combination you can also stopp the lines for this. An I guess you have some confusion with your locking-variables. This works in my version (12.2)
is x:object; y: object; delay: integer; do x:= ?.succ; y:= ?.succ.succ; delay:= Var_Delay_BA; ?.stopped:= true; waituntil x.empty = true and y.A_Free = true prio 1; wait delay; ?.A_Free:= true; ?.stopped:= false; x.A_Free:= false; @.move(x); end;
freelance simulation specialist