|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢7 [; Q. c8 ~3 |9 H; t; W. G
: a0 q& I) V4 C, m& P" A我的问题是,在每个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中的数值,不知道会不会有什么不妥。# _6 l" M% B% Y
7 h1 |. N7 @( Fbegin P_read arriving3 T# W+ f- L0 v8 e0 y% V5 r* i
while 1=1 do begin
$ t3 S k2 H9 C. _; ]3 U; a read A_tote from "data.txt" with delimiter "\n"
6 O9 p% E- L% _3 N( O. B' k8 X read A_time from "data.txt" with delimiter "\n"$ d8 I7 X5 f `! E% r5 R
read A_leave from "data.txt" with delimiter "\n"
# `3 P8 l s/ j0 J6 }+ n read A_picks from "data.txt" with delimiter "\n"
! T" y* A7 B q) b( M set load type to A_tote
4 V. o6 ~* \: w3 b0 s1 i. g if A_tote="tote 1" then set A_induct to 1
4 r! [8 r- M4 q' O else if A_tote="tote 2" then set A_induct to 2
. A, O5 s+ i; h# ^7 ] else set A_induct to 3
& y" }) D( s* f2 r9 |" m. |% ] set A_i to 08 ^7 u7 Y' @3 L2 b
clone 1 load to P_induction
- u2 _1 F5 b* w2 X. f) ? b& V wait for A_time sec: H& w& }6 [3 O$ o6 ~0 l3 Z/ A2 S
end
0 d$ i" M. m7 s* K& _end+ G! c. h. Y: Q
. j/ @" ?5 m% f
begin P_induction arriving
; f" F9 }1 l. N& f& y if A_induct=1 then clone 1 load to P_pick1* g& C0 {( ~: j( N- A9 v+ L
else if A_induct=2 then clone 1 load to P_pick2" y4 @. g4 I0 O, V4 S, v4 m
else clone 1 load to P_pick3
4 V9 y$ p# ~: [end
7 V+ K2 a- {) I8 y. n9 \0 X) S* @) z; B; \
begin P_pick1 arriving/ a; \( U$ z; ^
set A_i to 1
2 M1 p" T6 `% N- q+ n move into Q_induct1! e( x. k2 Y" {7 Y' \4 x
move into pickaisle.induct1
- k9 p9 d+ B f* @8 M) H" V6 F while A_i<=30 do begin
1 r/ n5 s) q7 r2 [6 h5 p travel to pickaisle.con(A_i)
/ g8 w+ s0 s- q6 n: K/ [4 s; t if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 J4 v: v2 ]7 t
else wait for 10 sec
! X) q, @2 G# q: y0 ?1 W9 r* W if A_i=A_leave then send to die
8 o5 j& X" _1 g- N+ p/ a b else inc A_i by 1
4 \4 A% H+ ?# c/ g0 g' [ end
$ `% Y' O+ A8 w. yend6 g3 C4 U8 ^! E# ?, O% `
, Y$ ^- l/ j3 i
begin P_pick2 arriving$ m% I5 G& J5 }6 E8 t6 J$ t# z, g/ S
set A_i to 11
0 H4 U, A' ^; `2 ^, _/ G move into Q_induct2
2 L* y3 L$ D# }7 _ move into pickaisle.induct2
0 _1 b, ?5 ?0 g6 \- Y while A_i<=30 do begin h% R% T* f. ~+ N/ `! f/ S- }
travel to pickaisle.con(A_i)
5 E- q B2 H. d a if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 i- q9 m: E- _$ Y: P2 Q4 _
else wait for 10 sec9 s, g$ |& M" ?
if A_i=A_leave then send to die
% l/ P, ?+ x. C$ }/ { else inc A_i by 1, c* i1 v' j2 f% d
end$ }; Z6 A/ ]' K- Q4 n
end" K9 y8 z0 d4 [0 F8 H
4 a7 w# v8 a8 M z9 \
begin P_pick3 arriving
@% d- j5 X5 z- s8 K set A_i to 212 `+ L9 I/ M2 `/ g
move into Q_induct3. t* T$ L0 M. [) {+ Q
move into pickaisle.induct3
: x. I! L8 [4 L. N. m while A_i<=30 do begin
) b# P/ l" c! V) K/ K travel to pickaisle.con(A_i)6 i" g; S5 n) z# {6 @- O
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; Z F' i7 ?/ F
else wait for 10 sec x( h9 |9 {! {
if A_i=A_leave then send to die/ f8 }' Q' n$ {( l0 S
else inc A_i by 13 W E) U. Y' v
end
* `* T/ Y2 ^8 L6 Q8 cend |
最佳答案
查看完整内容
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,其它按你的 ...
|