|
|
22仿真币
现有二类产品,A和B,如何实现1个A和1个B组装成1个C?我用orderlist建了二个OL_1和OL_2,分别用于A和B的等待,到了下一个进程,要取用的时候,一个都取不出来,实在不知为什么了,请大侠帮忙。
, n1 p) [7 I; ]2 J" L" M2 ^4 l; @* w& r1 e& U+ ~
begin P_wait arriving
& I6 v. m5 F* l8 s& A if this load type=L_a1 then
5 j0 t; I6 E3 s+ r+ O% R2 W wait to be ordered on OL_13 G a" N0 T, o7 p6 i+ ~ \
if this load type=L_b1 then2 }* j0 Y% _7 y/ }( M: V
wait to be ordered on OL_2
7 _6 ?) D) ^2 W( `% G send to P_assemble( s0 r' ^: B( q! N& ?; }
end, _6 O' A+ o% D1 P
, V; R7 x/ q/ o5 }- c) O$ N! J
begin P_assemble arriving ~2 a/ D. ^( Z% ?5 V
order a load from OL_1 to die
+ i- d; d2 j7 T$ \ in case order not filled backorder on OL_1" j6 Y( ~. X+ Y9 c" l9 X! j' p
order a load from OL_2 to continue/ L# F- K/ r" S% ^" C
in case order not filled backorder on OL_2; Y. D4 |( z# t* u4 m) d! D
set load type to L_product2 {/ a0 f/ T% f6 |5 f" d
get R_massm3 i/ z: U3 A3 h* m2 X N. I: q
wait for normal 5,1 min& S( l& y1 i2 H/ ~/ ^$ @
free R_massm# `( X6 ]. F W5 z3 O
move into Q_stock
4 }4 L2 n! I8 O ]% |. r, Nend |
|