|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢, J; P: ]/ D* d5 F9 ]$ @3 `
) d6 M" \; s7 {) c
我的问题是,在每个P_pick的process中的while循环内,总显示错误Expecting QueuePtr or Location, but found PathPtr. 在我定义所有的attribute的时候,从来没有定义过任何QueuePtr or location or PathPtr,为什么会出现这种错误呢。 我这里面A_picks是一个30x1的array的load attribute,我想用A_i这个load attribute来读取这个array中的数值,不知道会不会有什么不妥。, p+ g) @ s1 n; e$ k* d
M l/ ^) ~; H) y" Y5 V4 @; S
begin P_read arriving8 O5 O- F3 w8 o6 x
while 1=1 do begin
4 e5 O9 W% x: C# H8 _& j read A_tote from "data.txt" with delimiter "\n"& E- b# B( h7 Q" e" Z8 P
read A_time from "data.txt" with delimiter "\n"
( I4 }3 [% F6 y6 u4 Q read A_leave from "data.txt" with delimiter "\n"- A, Q6 [1 z& n( R
read A_picks from "data.txt" with delimiter "\n"# W" X5 r |& A1 |( [* d! H/ Q
set load type to A_tote
* x3 z" ~* ~; N, q h' m if A_tote="tote 1" then set A_induct to 1 y8 r9 I# U9 `
else if A_tote="tote 2" then set A_induct to 27 j- x7 V! S( |+ f9 H
else set A_induct to 3 / ]% x; u9 |& [0 l5 m# I
set A_i to 0& Y) e& C. o2 I+ e& Z! U; t
clone 1 load to P_induction/ n/ b8 z) L3 T
wait for A_time sec5 |* u# k4 ^' e
end% W/ `3 _) F8 Q* M/ W
end: `4 v( f" t4 Z0 G/ e
2 s$ O |' c8 v+ @5 _begin P_induction arriving
7 B! ]! H5 m& ?! B if A_induct=1 then clone 1 load to P_pick1- W: C1 d( _# G9 O6 I
else if A_induct=2 then clone 1 load to P_pick2
( @% v. E4 U# S& u/ Q else clone 1 load to P_pick3
3 N% E4 @# E& L7 k/ S/ c- kend3 Q+ ]; a; _: h2 _
# V2 F- P7 c3 W& ^) R
begin P_pick1 arriving2 X1 V- X# S# g
set A_i to 1, x0 T7 b7 }( v; L" ~7 \
move into Q_induct12 z# B0 |4 q3 p( L7 ]2 M+ s
move into pickaisle.induct1
9 Y( p: ?: O7 @3 v0 O while A_i<=30 do begin
: i) ~6 g7 A& {. g7 C travel to pickaisle.con(A_i)
' X4 M0 W: ]; p if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- x) g$ S" U& `8 {( c' a: T# { else wait for 10 sec3 [ a8 J j9 V9 ~2 d4 O
if A_i=A_leave then send to die1 y/ V3 Y( {! I( Q) q2 c
else inc A_i by 1% K" W& p( D5 Y1 F' D9 h9 f
end, y+ V1 c- }& T, z7 V5 t9 \
end
7 k& |- D6 L* F1 |2 ?6 b/ D$ m" \% v- V. M X0 T5 s" E% P
begin P_pick2 arriving
6 h5 c0 L( u, E/ R" ^! D set A_i to 11
: B6 V [( l+ r- w- Q B move into Q_induct23 h; f- C+ l3 E, Q4 a& d' ~/ h
move into pickaisle.induct27 P* K, z3 U1 q1 I1 C0 b
while A_i<=30 do begin9 r3 x: V& k& D" ?" m8 L2 E
travel to pickaisle.con(A_i)9 d7 @- P! b @% A Z+ n
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" d# J3 a9 L3 c) x
else wait for 10 sec
3 P8 s, k1 S) O4 O! l- f- ] if A_i=A_leave then send to die: ~$ G: z1 }$ p' [( K0 J
else inc A_i by 1# d! m) ?8 o6 z+ S- g m$ w
end
. I# b, R6 l4 F2 a$ W4 D5 ~, Zend/ E+ \0 d3 ?$ I0 Y
! |2 P+ p- S7 h: J- r
begin P_pick3 arriving
. r- k! D7 g! c/ B7 y* R9 S7 C set A_i to 21
% y3 G5 J6 R/ N; C& r7 E1 Z4 d move into Q_induct3
2 _- {( S& R# F# ]0 p" v' {1 B move into pickaisle.induct3+ Y; w# \# n! m! |. h- T' ]
while A_i<=30 do begin
! W$ R8 a) X8 t8 S" z- Z& S, K travel to pickaisle.con(A_i)
9 f7 e* u: p) {" u if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. Z7 c3 e" {2 E4 x* K5 F else wait for 10 sec/ W z6 G6 p! v' @
if A_i=A_leave then send to die+ c0 n! }! W$ p) u
else inc A_i by 1+ n& d; e! X; {( L
end/ r3 C: u2 f6 N$ l; u$ w- l
end |
最佳答案
查看完整内容
pickaisle.induct1/2/3是个什么东东?
move into后面,应该是一个station或control point,或者Queue/Container/Vehicle/Segment之类的东西。看你的报错信息,这个induct是个path么?
AutoMod Editor的语法报错信息,有时候会指在下一行,必要的时候要把上下几行都看一下。
另外,你的几个P_pick是完全重复的,建议以如下方式修改,可以减少代码编写量:
1. 创建一个Process:名称为P_pick,number of Processes为3,其它按你的 ...
|