|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
4 Q4 I0 H: C: r3 @0 ?$ F" _
1 |. _7 f( \8 G& e我的问题是,在每个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中的数值,不知道会不会有什么不妥。4 n/ Q( Q2 A+ g- ^/ s R
1 C5 K: N( f1 O; n4 h! @7 }begin P_read arriving
! ]8 o9 D W% J0 Z- `1 X while 1=1 do begin
+ @% z0 Y# k) F1 N: t1 f read A_tote from "data.txt" with delimiter "\n": F: Q( ?+ h t" ]$ }- P
read A_time from "data.txt" with delimiter "\n"
9 k" y+ u3 P- |) w! x$ K/ ?$ Z1 P5 J read A_leave from "data.txt" with delimiter "\n"9 n: s) ?! A! s) Y: w6 T! R+ h
read A_picks from "data.txt" with delimiter "\n"
6 r0 Z+ P; \& a& b0 K) @ set load type to A_tote* j( D! y, q" l, p
if A_tote="tote 1" then set A_induct to 1
7 G' P! h, Z9 @% B2 `" \ else if A_tote="tote 2" then set A_induct to 2# ~5 a; q, A/ w" H1 Q; t# e! p& ^
else set A_induct to 3
+ Y$ z& W9 d4 x% W/ S, k9 y2 w set A_i to 0
5 ?4 ]) B9 j/ ^$ P& v! |# l clone 1 load to P_induction
! r, E1 ^+ o4 \' i2 a4 X wait for A_time sec
+ @. u+ [, P1 W& T( w; l' ? end/ @( b6 Y: x& \+ p$ e
end
9 w8 w$ _7 Y. i
/ p5 l$ _& c( mbegin P_induction arriving
: P1 ]$ Q0 y; T- x0 D! Q W if A_induct=1 then clone 1 load to P_pick1
! K6 S# v6 A+ u3 |/ m else if A_induct=2 then clone 1 load to P_pick2 W, }$ h2 A4 Z4 Y5 j4 @
else clone 1 load to P_pick3
" e# w J4 I3 s( G! n Cend1 q; _0 C% O- V2 d- t O' Z
4 l2 l3 y# }2 U# A
begin P_pick1 arriving. T7 n+ s8 S& }* B; A+ m, s8 [0 {
set A_i to 1+ r( i5 h0 l, Q* G
move into Q_induct1' }3 T7 T# Z4 n1 b' u
move into pickaisle.induct1, ~, p% f3 v7 f1 c: c1 V
while A_i<=30 do begin' ?" E4 ~9 @( R6 R- Y7 i
travel to pickaisle.con(A_i)1 I# j2 y& O8 W
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 ]2 o! k- o) c else wait for 10 sec
9 R! b6 H/ v' [/ y if A_i=A_leave then send to die. V( F, c1 i* P* u+ L
else inc A_i by 1
+ E1 \: r; y2 d( I+ E& [ V+ { end$ y* @$ `( Q4 N, V2 |- A
end/ m/ C" r/ v6 [2 g5 w7 v5 Q W
% F" @$ |2 y0 h& `2 i2 @begin P_pick2 arriving" [% ^0 S! n5 G4 M+ I4 Z/ j$ C5 u" k
set A_i to 113 c- R2 _8 u9 G
move into Q_induct2
+ Z$ p5 ~- ?/ A q/ A move into pickaisle.induct2
/ s. i3 e# {# F0 R$ X) i6 m while A_i<=30 do begin
) t7 v* l+ _. n+ h" ~, D& w travel to pickaisle.con(A_i)8 w8 t' q% Q& R, Y- w9 ]3 m E; f
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
6 D# o2 d/ v: |" W else wait for 10 sec
3 e: P5 z' Z/ t% [" Y* a1 W& ~ if A_i=A_leave then send to die9 f4 s% A3 B' A
else inc A_i by 1
/ s2 y- w( y! A6 I' |0 p% X end
1 Z- {" B/ t* F) Dend1 l/ ^1 R" _+ P) Y; [$ L
- v5 q: _' j+ j2 d0 m
begin P_pick3 arriving2 q6 g1 c- x; `6 M7 M
set A_i to 21
- x" F0 C, J. U move into Q_induct33 }( h e; Y0 H& n% W
move into pickaisle.induct3
3 \3 ^! s+ |! Q( P, E while A_i<=30 do begin
" _; ]5 }+ m- T! E. R5 }1 a9 a) ]' z travel to pickaisle.con(A_i), X7 j, m, n7 n% S5 u" f: X
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ q! V2 A" R3 d' }0 H. K c$ m else wait for 10 sec
" Q1 A3 c! T' L if A_i=A_leave then send to die
& `% w6 ~# o8 v( w else inc A_i by 1( L$ Z3 f. I0 i2 D( Z: Y8 t
end2 L) q( u& ~0 A; C2 k4 R3 |
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,其它按你的 ...
|