|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢. F7 Y/ G9 B$ }9 K
Z+ T$ _' m& p4 t; T我的问题是,在每个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中的数值,不知道会不会有什么不妥。( h( ~) y2 V$ K1 W+ m% B
" L3 m7 X$ J% e5 E0 V
begin P_read arriving
( U1 b5 ?* t4 q' }% B* y( Q while 1=1 do begin! f3 n5 u ]; A& D$ T! @) g! J8 T
read A_tote from "data.txt" with delimiter "\n"
% K3 J) H: M$ i$ |9 t% u) ~ read A_time from "data.txt" with delimiter "\n"
7 B i |! O9 a: c read A_leave from "data.txt" with delimiter "\n"+ ]: F. }9 `* e6 i! W' B8 O; d
read A_picks from "data.txt" with delimiter "\n"
; j& v1 k. o3 o6 ] set load type to A_tote, P" m- [; `% t. k* U; S
if A_tote="tote 1" then set A_induct to 1, G7 }8 A8 Q: f: V6 x7 `- {5 p
else if A_tote="tote 2" then set A_induct to 2
! r8 \: ]; D" m- D5 |% h% i. Y) ] else set A_induct to 3 a* U7 P5 Q* a! y4 T3 r
set A_i to 0! m+ z/ Y( x" {5 ^- z
clone 1 load to P_induction8 k0 T& ?) o; ^ c9 B$ x
wait for A_time sec0 e# D& T+ E" X6 Y
end
5 u8 k% y1 p0 y) p' Yend7 }" m. ^% P4 t! ?
; N9 {9 [3 _ P) f1 f% K3 Vbegin P_induction arriving
6 {' S5 f' x! t if A_induct=1 then clone 1 load to P_pick1
- h" n) N& r& u1 a8 n H5 N" y else if A_induct=2 then clone 1 load to P_pick27 X" P$ S4 l v/ B: D3 F
else clone 1 load to P_pick3
g1 [( x& \: W! Tend/ }7 Q: V4 r; V2 _8 e& j; ^
# r; W5 I; \; h0 v' R& b% q+ m& Dbegin P_pick1 arriving
8 X3 D6 I w. Y) ^9 a: d( V& V set A_i to 1
1 }; T0 A7 \$ B move into Q_induct11 F9 ?2 g) @. y, ~6 `. L
move into pickaisle.induct12 n7 ~9 q2 g, O" e; i
while A_i<=30 do begin
4 J$ g- t, ?8 \: b) i2 ` travel to pickaisle.con(A_i). ?3 j' ^: W8 U2 n" s
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 O3 Q: f0 }( W7 N% b! ~9 b
else wait for 10 sec! ~! k1 S( P. B8 H+ n
if A_i=A_leave then send to die+ H4 r5 c1 W% r0 H7 n. J
else inc A_i by 1
' k$ Y. w) {2 T/ W& ? end
/ l0 H' {( {# h j+ Vend
9 V2 n9 S0 f' z+ H
4 ^. T& ?" y+ J& Y. z1 Obegin P_pick2 arriving3 Q3 A: s1 Z r* `. R: h F
set A_i to 112 t4 o" q4 y* M. X" ?0 J
move into Q_induct2) ?: a. |! i/ T( Z
move into pickaisle.induct2
( j. j; a: f% l' Z" P; {& T! Q while A_i<=30 do begin/ v# q5 b6 P {* R3 H- f L* U; m
travel to pickaisle.con(A_i)
! H! ]( M2 i2 G* R/ C% ` if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 U4 V% J% o; m% P else wait for 10 sec
" w9 Z: H) F3 G' b9 I' Y if A_i=A_leave then send to die/ D `" c1 ?0 A
else inc A_i by 1
& v3 t( S8 {7 }' v end! @* e% P1 V4 Q7 e
end
+ z+ N i! ?, Z: c! i# d3 v' W
$ H- F- F) L! N# w% Fbegin P_pick3 arriving
* P: o8 ^8 n& g8 @" e set A_i to 21
3 @8 z! Q1 e" \ move into Q_induct3
0 Q0 o7 B* S g- R$ |9 {$ ]& M+ V move into pickaisle.induct38 T- b/ L3 D- ~4 J# d- f
while A_i<=30 do begin
" P$ n: M0 \0 M$ N( ~. r travel to pickaisle.con(A_i)1 Z Q% A, [% V7 I/ L
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- k* A. B- z- Y d! W# s" B" L
else wait for 10 sec
& q$ W0 \2 \: ^. y if A_i=A_leave then send to die
. ] k' u* w) ?4 M else inc A_i by 1
]. R5 p: `# h% S4 G end
" \( r6 L0 j2 L- A2 ]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,其它按你的 ...
|