|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
( h* S1 i' R ^% {/ S! `" t4 i& l
7 Q8 u' {' J, G# x0 Q5 Y, x( |" Y我的问题是,在每个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中的数值,不知道会不会有什么不妥。3 N7 k6 @$ w3 S4 R: J* F/ ]2 P
6 `$ h9 \+ L& V; p# h- g8 |' ~; `begin P_read arriving& T8 ?. I5 ?4 |
while 1=1 do begin
3 y8 `. E0 p( A; ~ read A_tote from "data.txt" with delimiter "\n"9 H; I8 E# O" A6 M
read A_time from "data.txt" with delimiter "\n"
3 F" Y4 l7 c1 \ read A_leave from "data.txt" with delimiter "\n"
3 ~, k7 l' y# x" X read A_picks from "data.txt" with delimiter "\n", v# {' y! H7 u1 f( _
set load type to A_tote$ v7 U" c/ q4 `) r E' B
if A_tote="tote 1" then set A_induct to 1
* p8 [/ i G2 g; }6 o" Z else if A_tote="tote 2" then set A_induct to 2
' k3 p( _4 o6 _. x1 z, Y c3 q4 o else set A_induct to 3
& b$ G% E/ P( [1 F& X set A_i to 0& p7 T/ T9 N# o k/ J/ j! h) @
clone 1 load to P_induction
; I* h9 R* Q y2 |% H# M2 Q( h# S; W wait for A_time sec5 T0 r. u: ~8 c$ y( ?
end
" V5 `6 N$ Q: f1 s% Aend; M% m/ K4 W. Q3 b0 D' g: I' O
) X! H: Y) z0 I
begin P_induction arriving
3 R8 f9 q) u: r, x if A_induct=1 then clone 1 load to P_pick15 P) V% I. Z" Q5 a7 }
else if A_induct=2 then clone 1 load to P_pick2( e) w8 t3 u9 _4 l+ V
else clone 1 load to P_pick3
7 G; k N% ^# U" Q; j1 @; u( n5 Dend
/ K! N; ?9 o5 Y9 ^! q* z! Y7 e
& m% w q+ C! Y H0 ?begin P_pick1 arriving
" T; p! u% R) P# ^/ w set A_i to 17 c, u6 G7 v# J0 |7 L0 J
move into Q_induct1) V) f0 r* t( M
move into pickaisle.induct1# a$ y; ^ P, B: ]% g
while A_i<=30 do begin8 V1 {: @! g; C
travel to pickaisle.con(A_i)
! s/ w& D' T3 A$ S2 T6 P+ n3 o if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
% Y3 H" o$ V% o$ O2 Y5 Y else wait for 10 sec
% D& _" q3 T. `9 C" T if A_i=A_leave then send to die
% B3 {8 {- f" u& H4 V else inc A_i by 13 ^$ I0 \" X/ b6 _ \
end1 h v B* I5 v; J
end& I4 R) T I7 `4 B, q3 q
) b' L) K) [4 o% _begin P_pick2 arriving
% m ^0 Q$ Q9 n1 b. }& ~ set A_i to 11
( \7 I3 F Y$ O# ?8 y move into Q_induct2* W K3 T3 [8 j2 w* E h5 n! q/ U1 {' r
move into pickaisle.induct28 v8 w) Z: {9 U& o1 @0 ]
while A_i<=30 do begin; v/ ? u+ w W% s
travel to pickaisle.con(A_i)
7 l" J8 F0 s# L' _" {$ l if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. h' k$ Z R- j: L# V
else wait for 10 sec3 ?7 O$ t/ b+ [: P( |& p: J- i; L
if A_i=A_leave then send to die
" ?) k5 h: _' E' Y1 V% f2 ? else inc A_i by 1
) Z; x) h$ u" ~& `8 P) }2 s% s7 O7 } end8 H( `" y! x/ }1 }/ X
end; `+ K* ?8 T2 b4 |2 i- N
1 I" ?: l* e- {- R- Ibegin P_pick3 arriving
" N# c7 p2 G3 e3 \! N0 Z set A_i to 210 J. A Y0 a% ^; k: h5 L
move into Q_induct3
- _( @2 B0 h& ]( A, m move into pickaisle.induct3
0 f) r2 L* S. i5 { while A_i<=30 do begin9 t# E- e7 z7 A1 o/ p/ E7 \* l9 ?2 a
travel to pickaisle.con(A_i)
8 Q& i4 g/ j* _ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% b1 ]' I3 W. c3 [- S
else wait for 10 sec
% [9 u, X2 l5 g/ @ if A_i=A_leave then send to die5 V% U' ~+ d/ [) U
else inc A_i by 1- s& s, I0 B/ G, D( H- i" u, y! M
end2 P1 R" S* h3 d7 S- O
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,其它按你的 ...
|