This commit is contained in:
Yofuria 2023-07-25 23:52:52 +08:00
parent a16b352f10
commit 81a5a3696c
1 changed files with 3 additions and 5 deletions

View File

@ -79,9 +79,9 @@ class OrderSystem(ap.Agent):
self.ev_ave_delay_time = 0 self.ev_ave_delay_time = 0
self.ev_changed_product = np.array([float(x) for x in ev_ary_current_product[:, 1]]) # 23x1 ndarray 存储本次库存的改变 self.ev_changed_product = np.array([float(x) for x in ev_ary_current_product[:, 1]]) # 23x1 ndarray 存储本次库存的改变
# print(ev_ary_current_product) # print(ev_ary_current_product)
print(self.a_lst_order[0].ev_ary_dlv_product) # print(self.a_lst_order[0].ev_ary_dlv_product)
if len(self.a_lst_order) > 1: # if len(self.a_lst_order) > 1:
print(self.a_lst_order[1].ev_ary_dlv_product) # print(self.a_lst_order[1].ev_ary_dlv_product)
for order in self.a_lst_order: for order in self.a_lst_order:
# print(order.xv_dlv_t[0], self.model.t) # print(order.xv_dlv_t[0], self.model.t)
if order.xv_dlv_t[0] == self.model.t: # 第一次交付 if order.xv_dlv_t[0] == self.model.t: # 第一次交付
@ -93,8 +93,6 @@ class OrderSystem(ap.Agent):
order.ev_ary_dlv_product[i] = 0 order.ev_ary_dlv_product[i] = 0
else: else:
order.ev_is_delivered = False order.ev_is_delivered = False
if order.ev_is_delivered:
print('hhh')
elif order.xv_dlv_t[0] < self.model.t and order.ev_is_delivered == False: # 第二次交付 elif order.xv_dlv_t[0] < self.model.t and order.ev_is_delivered == False: # 第二次交付
order.ev_is_delivered = True order.ev_is_delivered = True
for i in range(self.xv_product_num): for i in range(self.xv_product_num):