|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢, v U0 {2 M/ L( a
" z2 X0 N/ B- v0 S我的问题是,在每个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中的数值,不知道会不会有什么不妥。$ m+ h+ j( }- S4 R& I
4 d* y6 ]8 G0 ^2 Q: K& Abegin P_read arriving
, S" Z7 d& V7 G0 w: i2 c- Z while 1=1 do begin
* {. k. L( B( r$ K$ C' D read A_tote from "data.txt" with delimiter "\n"
" O* {" t/ z4 S- R3 ]3 [ read A_time from "data.txt" with delimiter "\n"2 g. }/ k9 S2 {- ]& D
read A_leave from "data.txt" with delimiter "\n"8 E/ Z, U) l. e; l+ F2 i0 r
read A_picks from "data.txt" with delimiter "\n"
0 ?$ F6 j! `; |5 _ set load type to A_tote
w$ Y$ L6 ?' C6 [5 [ if A_tote="tote 1" then set A_induct to 1! q* q, @; w1 \( a) P' X
else if A_tote="tote 2" then set A_induct to 2
9 Q1 G, T* l) u6 V+ G else set A_induct to 3 ! e0 `5 M5 L" S+ M3 }
set A_i to 06 C0 _+ U. }6 Y# L. L' Q G8 z
clone 1 load to P_induction
h- i0 n/ T5 i wait for A_time sec! i* m6 b: F$ d
end
: A4 p; C$ }, \end2 \. g9 F$ J( B& D' t* {7 ?
' W9 b! n2 K: D( `% [
begin P_induction arriving
8 h$ _. T [/ q7 \% Q if A_induct=1 then clone 1 load to P_pick10 v' `" C( h. f" R' E5 \ X
else if A_induct=2 then clone 1 load to P_pick2
! B; Z' r* _5 O) W5 `; j$ G* k else clone 1 load to P_pick35 y! C$ I# d! H& V) f- W
end
4 A: f$ L! I8 V7 M3 H- M' @
0 z, k$ M' _/ X0 X8 X1 W% Wbegin P_pick1 arriving7 w0 x. t S* B6 b
set A_i to 1
, a4 s2 S1 U, w+ t move into Q_induct1
, _( S( C9 u/ @% p, ~, S4 j move into pickaisle.induct1" H# _7 m }8 y: C' }" A
while A_i<=30 do begin" [1 [6 R: I! [7 x2 t' @# r$ t# c6 M
travel to pickaisle.con(A_i)
. T, e. w8 D/ Y, c; t* [ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ J% I S$ Y4 l0 b
else wait for 10 sec- t# Y( X1 w Z+ {6 A: U2 a3 ^
if A_i=A_leave then send to die
, w* W! p* U# U) U* u else inc A_i by 1
4 A% j5 N0 _7 @3 b end
5 G* n2 ?" q/ ~ b2 Xend4 z( y: b+ e# i- V; R) d
7 |7 M1 ? Z* ?* vbegin P_pick2 arriving
& I; Y! [! I" d A& m; d3 y( z set A_i to 117 c2 Q) o" P. ^8 i+ M) L
move into Q_induct29 x8 p3 J2 c v. }0 m0 v, C6 n
move into pickaisle.induct2" I$ n9 g7 C0 S
while A_i<=30 do begin3 t& U9 n2 V! G0 S, e
travel to pickaisle.con(A_i)6 v& U+ _/ @6 n% r+ z* o/ T" q/ \
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec1 m/ P& G: h/ n4 m* c& X0 R
else wait for 10 sec" Y0 g3 n8 v8 p* H
if A_i=A_leave then send to die
. s' D" _2 v9 {4 [' }% ]3 E0 } else inc A_i by 1
1 G2 e. r2 l; Q end8 d5 @$ M0 ^- C% L, o) U( P- p
end. M, }+ i& C. e4 h: J$ {! a
# q& k$ D- V5 C' c& V" l
begin P_pick3 arriving, I2 g- g4 `7 J# g5 A" I) [
set A_i to 214 |. B. J) T; B; K/ d- v) f
move into Q_induct3
( R" Y3 p$ L* q' |7 h$ J, p move into pickaisle.induct3) H, \+ x/ y% C' T
while A_i<=30 do begin6 _# x8 S& e2 l, Q% a: n
travel to pickaisle.con(A_i)
: d% j( S0 j: w8 z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. i6 Q" V8 t) I+ Z else wait for 10 sec8 g) f6 R0 I( P4 G0 n/ x
if A_i=A_leave then send to die
# E9 T5 A' s# Q' [3 U9 @+ B9 a else inc A_i by 1( i( Z8 s" i" B P
end
8 q$ I' I4 P* v% s- aend |
最佳答案
查看完整内容
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,其它按你的 ...
|