i've written a simple method for filling a buffer with MUs and then, with the entrance locked, emptying it without any further entrance until it is fully empty.
Unfortunately the method is working for the first part of filling the buffer but not in emptying it (see the files attached).
Anybody help for what is missing?
Solved! Go to Solution.
two changes: @ ist only one part, to access the parts in the buffer use ?.cont.
If you move within a loop, you need to wait a little timespan, so the drain can process the parts.
is do waituntil ?.Full = true prio 1; ?.EntranceLocked := true; for local i := 1 to ?.NumMU loop ?.cont.move(Drain); wait(0.01); next; ?.EntranceLocked := false; end;
|Steffen Bangsow |
freelance simulation specialist