df_constraint
Date DoW B K D E 22.3 Mo 1 1 1 1 23.3 Tu 1 1 1 1 24.3 We 1 1 1 1 25.3 Th 0 1 1 1 26.3 Fr 1 1 1 1 29.3 Mo 1 1 0 1 The above df_constraint shows how many deliveries the given warehouses (B,D,K,E) can accept on a given day for this particular week.
The df_rank below has ranking based on priority. Arrival date = date available for pick up. based on the constraints above, the desired output is below.
df_rank
Con Arri DoW Rank abc 22.3 Mo 1 def 22.3 Mo 2 ghi 22.3 Mo 3 jkl 23.3 Tu 4 mno 23.3 Tu 5 pqr 23.3 Tu 6 cba 23.3 Tu 7 xyq 23.3 Tu 8 fed 24.3 We 9 ihg 24.3 We 10 klj 24.3 We 11 omn 24.3 We 12 rqp 25.3 Th 13 qwe 25.3 Th 14 asd 25.3 Th 15 jdy 25.3 Th 16 zxc 26.3 Fr 17 ewq 26.3 Fr 18 dsa 26.3 Fr 19 cxz 26.3 Fr 20 tps 26.3 Fr 21 **Desired Output:** df_plan Con Arri DoW Rank# PickUpDate WH abc 22.3 Mo 1 22.3 B def 22.3 Mo 2 22.3 K ghi 22.3 Mo 3 22.3 D jkl 23.3 Tu 4 23.3 K mno 23.3 Tu 5 23.3 B pqr 23.3 Tu 6 23.3 D cba 23.3 Tu 7 23.3 E
xyq 23.3 Tu 8 24.3 E fed 24.3 We 9 24.3 B ihg 24.3 We 10 24.3 K klj 24.3 We 11 24.3 D omn 24.3 We 12 25.3 K rqp 25.3 Th 13 25.3 D qwe 25.3 Th 14 25.3 E asd 25.3 Th 15 26.3 B jdy 25.3 Th 16 26.3 K zxc 26.3 Fr 17 26.3 D
ewq 26.3 Fr 18 26.3 E dsa 26.3 Fr 19 29.3 B cxz 26.3 Fr 20 29.3 K tps 26.3 Fr 21 29.3 E
没有评论:
发表评论