Order Lists on AutoMod
I’ve been trying to simulate a bottling facility using AutoMod. This is a lesser known simulation program playing with big-time competitors like Simul8 and ARENA. Regardless, this is the program directed by my professor, so I have struggled through it.
One feature I’ve been using extensively is the Order List, which is quite powerful, but rather finicky. You can use order lists to hold your loads, sort them by priority, to batch them, to kill them and all sorts of other things.
The problem with order lists is that once a load enters the list, the remainder of the process is suspended.
I was getting these gigantic queue,s so I made a baby simulation with the following source file:
begin p_process arriving procedurewait to be ordered on ol_orderlist order 1 load from ol_orderlist to dieend
You would think that the final result would be a bunch of loads that just run through the order list and then are expunged, but at the end of the simulation, all of the loads were still active and waiting on the order list.
Essentially, the process was waiting at line 2. This is because the code is load driven, that is, every line is performed by a load, or as a load passes through it.
After playing with the demo files, I discovered that the best work around was to use an if condition.
if ol_orderlist current loads > 0 thenorder 1 load from ol_orderlist to diewait to be ordered on ol_orderlist
In this variation, the very last load won’t die, but I think it’s a reasonable solution.
The most recent issue I’m dealing with is sending loads into an order list only to be sorted for priority sequencing, and then spitting out the load with the highest priority.
I initially had
wait to be ordered on ol_orderlist order 1 load from ol_orderlist to continue
but obviously this has the same problem as above. I haven’t solved it yet, but I think the last workaround will be sufficient. We’ll have to see.