I am moving code written in Simpy 2 to version 3 and could not find an equivalent to the following operation.
In the code below I access job objects (derived from class job_(Process)) in a Simpy resource's activeQ.
def select_LPT(self, mc_no):
job = 0
ptime = 0
for j in buffer[mc_no].activeQ:
if j.proc_time[mc_no] > ptime:
ptime = j.proc_time[mc_no]
job = j
return job
To do this in Simpy 3, I tried the following
buffers[mc_no].users
which returns a list of Request() objects. With these objects I cannot access the processes that created them, nor the objects these process functions belong to. (using the 'put_queue', and 'get_queue' of the Resource object did not help)
Any suggestions ?