factory.py 에서 아래 run 함수를 보면
5번째 줄에 "for j in range(3, -1, -1): 이라고 되어 있는데
이렇게 하면 3, 2, 1, 0 이렇게 4번의 루프를 돌게 됩니다
그런데 해당 루프 값이 입력되는 column은 3개만 존재하니 이경우에는 오류가 아닌가요?
def run(self):
cntProduct = self.waitingProduct.getSize()
while self.completedProduct.getSize() != cntProduct:
fig = plt.figure()
for j in range(3,-1, -1):
for i in range(2):
if j == 0:
product = self.waitingProduct.removeFirst()
if product != 'none':
self.processes[i][j].arriveProduct(product)
plt.text(100, 50 + i * 100, self.processes[i][j].getListString(), style='italic')
elif j == 3:
product = self.processes[i][j - 1].leaveProduct()
if product != 'none':
self.completedProduct.addLast(product)
plt.text(100 + j * 50, 100, self.completedProduct.getListString(), style='italic')
else:
product = self.processes[i][j - 1].leaveProduct()
if product != 'none':
self.processes[i][j].arriveProduct(product)
plt.text(100 + 50 * j, 50 + i * 100, self.processes[i][j].getListString(), style='italic')
comment