|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
5 G4 S! r# D# \4 u" j0 c, ^- p. G6 T( V
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
' L, m3 V" \ d6 F) [
2 k$ N3 P& X& T1 D$ K2 b V, Y, fbegin P_read arriving
9 B+ q; ?5 M4 t. i1 { while 1=1 do begin
$ O* l1 F- H& `8 V read A_tote from "data.txt" with delimiter "\n"- o* d$ X" [7 I9 t: w- D- Z
read A_time from "data.txt" with delimiter "\n"
2 [9 @ k9 K) T read A_leave from "data.txt" with delimiter "\n"( I7 n- w$ U& G: q' F7 E+ d
read A_picks from "data.txt" with delimiter "\n"
; T! x8 I8 K0 C3 I3 x, @+ l" @ set load type to A_tote
z- z( }' u C' M if A_tote="tote 1" then set A_induct to 1
+ u. \8 w! e* l& W' M6 T5 X, k else if A_tote="tote 2" then set A_induct to 2% y9 D6 k3 s. A: [2 z
else set A_induct to 3
& h" l1 n9 V3 X' D7 } set A_i to 02 [3 t A1 W3 Y% _9 ?
clone 1 load to P_induction
' z. B, `" S9 b wait for A_time sec
; Z3 u( ]3 V) q; e1 ^" M8 j! ~ end
3 Q* q- l$ `+ `6 V& Iend
8 {. ~$ k& v& E0 ^6 G* P+ V- x
' g. i; ~4 K+ i, A! l* h/ F: Nbegin P_induction arriving: {6 F D. l- L9 A4 a0 D
if A_induct=1 then clone 1 load to P_pick12 z; B& m u ]' P, t \- D9 g
else if A_induct=2 then clone 1 load to P_pick2
8 m3 ]2 c2 L* i4 n0 V. u. _& B else clone 1 load to P_pick3
. S0 f( q3 e& L! n( hend5 i5 ?4 e+ G1 O) }( V! ?9 ^
7 T* `) C+ W9 A; M7 i7 t- t
begin P_pick1 arriving
! R! L- ]: j. [) g: t2 z" j! H) k set A_i to 1
* Y" S- s4 F! @( t move into Q_induct1
" r# l- e. x# i+ O$ {, s move into pickaisle.induct1$ m6 r! m; e' t. z' V2 O
while A_i<=30 do begin5 o' t4 ?5 F, X* D( K: I
travel to pickaisle.con(A_i)% B: A" N1 l$ |3 L
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ O: J, \8 P9 ]4 k9 Q7 C( |" G+ h else wait for 10 sec! P$ P; R7 v) ]3 i( k
if A_i=A_leave then send to die
% I. X0 s7 x7 X" \& [0 v4 f/ w( ]! C else inc A_i by 17 \' s1 D. t9 M4 h% M, w
end- k) ~( I/ T2 o, Y6 Y4 l% i" ?
end3 M6 `; I% Z2 j M' R
! N8 R# G" |7 M* q$ r
begin P_pick2 arriving5 q ?9 e/ f G9 H/ g7 m* e/ N2 y
set A_i to 11
, c4 L* R6 N- O move into Q_induct2- u0 Z8 m9 z9 d" {4 x+ @
move into pickaisle.induct27 z0 l0 `* T6 O0 Y9 j9 _ \# [. i" a
while A_i<=30 do begin) P4 d! u* }) Q: ~
travel to pickaisle.con(A_i)
7 a, O/ U; T6 N3 A1 V if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
! f* c+ L: H9 ? X else wait for 10 sec
% l/ Z( r: x) Q1 h if A_i=A_leave then send to die
: K0 T' h# l6 o3 K; [ else inc A_i by 1
* [/ w+ | X1 o; v end. \1 O& a7 a" h7 C9 e
end
7 y- L5 O# l7 x+ [; A& X0 C) k% I! q. y9 g, X% o* \! I: @
begin P_pick3 arriving
% t+ }4 S; h- h( P; ]; T+ I$ c' [ set A_i to 21
- a+ C% P, T( _ move into Q_induct37 R: K# d7 e- F; z6 U7 N8 Y# U
move into pickaisle.induct3+ \ X- Q; W+ O" F7 C# ^2 r
while A_i<=30 do begin* y, x6 u; @! x- \+ v' d
travel to pickaisle.con(A_i)- N' o+ d6 u' r T7 \2 J; H
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
9 x: f9 p1 ^% J7 B1 S) g0 e F4 H else wait for 10 sec) X2 R6 I8 R/ i( }2 Y
if A_i=A_leave then send to die
* l* N# E" p6 H+ c7 @+ X else inc A_i by 1
( [& x3 p k% ~2 ?% u+ N3 \ end
V1 C7 p& B5 F. d6 Dend |
最佳答案
查看完整内容
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,其它按你的 ...
|