|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢% Z3 W: G8 {1 d% x" |+ K( T7 U) j
" O4 n2 B$ E/ q$ z( ?% N: T0 ]1 ~6 @我的问题是,在每个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中的数值,不知道会不会有什么不妥。# Y" w0 L8 m* O0 O: `
% O0 W5 P! p4 dbegin P_read arriving- L- M. U3 H6 [) `% g
while 1=1 do begin
: {* z. M+ s1 Z" K1 P$ ]+ [& K read A_tote from "data.txt" with delimiter "\n"1 G9 ^- x1 H/ o" ?1 h( j
read A_time from "data.txt" with delimiter "\n"- x0 s- e* N$ j4 O
read A_leave from "data.txt" with delimiter "\n"
' O. H$ l) i! F$ y" F9 i read A_picks from "data.txt" with delimiter "\n"
1 X7 e6 c( n E" J: u) R) X set load type to A_tote. p+ g! |, F6 q2 Q2 n7 `
if A_tote="tote 1" then set A_induct to 1, N' m5 ~7 Q1 I
else if A_tote="tote 2" then set A_induct to 2% X! i1 W R* @1 |' A, V) I' i. ]
else set A_induct to 3
2 z: e0 Y( ~/ q3 B! q set A_i to 07 Q2 W: {2 f! f
clone 1 load to P_induction
+ K* B. P* W' t+ D9 f wait for A_time sec$ H# V' {9 P! k& C( \
end
9 |, B! N3 b- S4 @- j# d3 Xend3 ^6 L# ]% Z [' o& l. u Z' {
; Y2 E- ^2 x2 \) I1 y+ L) E
begin P_induction arriving
4 k9 K F8 t6 l+ G' W& ]7 } if A_induct=1 then clone 1 load to P_pick10 \: w+ @) t; W5 _2 \2 R
else if A_induct=2 then clone 1 load to P_pick2
1 l5 k; `/ E; I( p else clone 1 load to P_pick3; {8 q6 L7 U( a3 _( w" Z
end1 b" _& t3 u: \* v( r+ C, E0 @
. g8 [* X6 a, U; ^) \6 J6 E9 kbegin P_pick1 arriving, F) e6 P0 L' F# C7 J
set A_i to 15 x+ z: x8 w/ [, @7 ?9 Z: x' g
move into Q_induct12 j& p7 |6 Y( `& W+ A) H
move into pickaisle.induct1
* l6 o% l& X& [( \. ~$ a3 V while A_i<=30 do begin7 e: l/ W+ A% ?- Y1 j6 {2 I5 P2 V
travel to pickaisle.con(A_i)
* f7 K, Z: ^# O9 U J if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec, ] |4 T" j' T! ]0 G2 ?: @# H/ v* e0 V
else wait for 10 sec
+ A: x# C c; Z. W A1 G if A_i=A_leave then send to die
/ _2 S# A3 m" X" _. S' l) ` else inc A_i by 1
, }6 r: @8 c. A, V( j% i end/ S( e5 X7 Q3 s" d5 E
end& P) R9 P2 H3 P; i9 w& u8 Q
9 i( B3 h0 L+ ^8 m
begin P_pick2 arriving
" Q1 {* k; Q+ L* ~4 J set A_i to 11+ R' {) H: E* z. K: b" S
move into Q_induct2
5 E- u, ^6 g/ T4 p move into pickaisle.induct2
" W' j, K2 p$ o5 ?1 B while A_i<=30 do begin
9 b3 W8 L% a4 r ]$ H travel to pickaisle.con(A_i)
6 v1 l, m& X3 X if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ S+ Z+ S5 i1 ~% O' v else wait for 10 sec
; u3 H" x* b) J. n, y2 M if A_i=A_leave then send to die2 b3 n+ o- v J; I1 ^
else inc A_i by 1
7 ^8 o* J* {* n( ]; T- o. [ end
, l5 w% o* |: {& r* T6 H. q m6 W, }end( w2 k( I& ?; j' U! U- O
* E8 I: e& R' \
begin P_pick3 arriving
; w8 B0 K9 s( q2 O set A_i to 21# j2 X3 k' B+ \. H' T
move into Q_induct3$ {' B, R4 I$ A5 Z
move into pickaisle.induct3
5 ^7 v6 K9 V! N% ~0 T N# z: S* q while A_i<=30 do begin7 K L8 y1 }/ j, g! V I
travel to pickaisle.con(A_i)/ _+ P: N# y7 ?1 o1 Y4 G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- c6 M5 K; x" f& K7 k+ M- y, _
else wait for 10 sec
8 ~ {2 i0 @6 ?) ? if A_i=A_leave then send to die
) r& m f2 a# x, v, A else inc A_i by 1
6 L. g: }# D: R6 U6 t3 N, ]) k1 t8 d end
+ n7 t7 c' t3 z- d L. f. Jend |
最佳答案
查看完整内容
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,其它按你的 ...
|