Esempio n. 1
0
def proc_time(df, para='s'):
    num_item = len(df)
    if para == 's':
        travel = s_shape(df)
    else:
        travel = opt_best(df)
    pt = 3 + num_item / 4 + travel / 20
    # center = (np.mean(df['aisle']), np.mean(df['position']))
    return pd.Series({'weight': num_item, 'pt': pt})
Esempio n. 2
0
 def routing_time(self, df_items, para='s'):
     batch_orders = df_items[df_items['order'].isin(self.orders)]
     num_item = len(batch_orders)
     if para == 's':
         travel = s_shape(batch_orders)  # 可以改进成启发式策略??
     else:
         travel = opt_best(batch_orders)
     if travel == 0:
         self.pt = 0
     else:
         self.pt = 3 + num_item / 4 + travel / 20