|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢: A2 {6 {- {0 \% s) q0 m
/ }$ R" T' t. D( k. |' |' x& U' u1 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中的数值,不知道会不会有什么不妥。 Q; g6 _$ x% f. v. v2 D
9 x# a3 v: x5 O$ [; c
begin P_read arriving/ i# f! d/ P4 P+ ^ q/ m2 P
while 1=1 do begin
6 y3 i9 D( v3 T, p: ?; X read A_tote from "data.txt" with delimiter "\n"
) y& s% Z3 j6 { read A_time from "data.txt" with delimiter "\n") }, [+ s* g4 O5 { {; t w
read A_leave from "data.txt" with delimiter "\n"
! @9 ^5 b8 y/ t$ Q: R& D( v9 k; i8 k read A_picks from "data.txt" with delimiter "\n"
/ j* W1 [& Z1 P7 X. l5 L set load type to A_tote
& V6 [; i9 W. U$ _% } if A_tote="tote 1" then set A_induct to 1
4 S( ]1 G/ {$ Q/ c# n m# e else if A_tote="tote 2" then set A_induct to 2: A" q. Q0 V5 z L& C) a
else set A_induct to 3
3 Q1 F8 E3 }6 Q5 g' ~$ e Z8 M* | set A_i to 0
/ A% y3 V ]" y- q3 L0 u clone 1 load to P_induction3 {* c: Q& A. C3 b" V
wait for A_time sec. |2 U/ D% Z4 X2 f6 v/ [
end& g- C: Q! ^2 i, ^* e5 X
end7 u6 K2 L7 t# P
. I/ c% V7 s( z) U0 k- pbegin P_induction arriving) ?! f' _" w# T2 x [6 x8 m" x
if A_induct=1 then clone 1 load to P_pick1
+ C5 Q* q) y, e$ D. l7 o else if A_induct=2 then clone 1 load to P_pick2
& P* e5 c1 e# i7 w else clone 1 load to P_pick3
" k" U) x2 X5 q+ } A9 u: Tend
/ q6 L" o" j& q+ I7 Y' A0 J7 p# Q! i
begin P_pick1 arriving. F, C% R& _7 h, R% }
set A_i to 15 U3 K' }! K$ e% D* |. Z3 Q
move into Q_induct1
5 n; u: D3 _0 z7 ~( A8 h9 b: b move into pickaisle.induct1
3 s# M3 Z$ j" ?" M5 m while A_i<=30 do begin7 @6 ?: k: i& a# ? y8 d: C
travel to pickaisle.con(A_i). E( \$ s1 s1 @& O8 W/ U
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* v5 l$ [7 |& z1 G% U8 v else wait for 10 sec8 u/ f1 I; ~5 G9 s& K
if A_i=A_leave then send to die4 v' z9 Q+ j5 a6 @5 N5 _! T# b
else inc A_i by 1
& Y! N' n- k6 V& G3 W* ^, q end# R% i7 e1 v+ {8 w: N/ W, E1 t. L
end& s8 Q8 S3 w+ u$ y
! v3 H; f. B. b% xbegin P_pick2 arriving
2 H6 F* _4 h0 U. k; l& r set A_i to 11
/ u' t. {% T" Z. n+ Y move into Q_induct2% r! W6 n# `$ y; p8 r
move into pickaisle.induct22 B' B0 R) t: }- A+ B
while A_i<=30 do begin
- Q; @- j8 U9 R$ I$ V# h travel to pickaisle.con(A_i)
8 J& p6 v# ^3 ]) P1 V. t. D if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 U+ _: K U4 s: [7 ^- A' b
else wait for 10 sec
; L% W3 S) K6 g' o if A_i=A_leave then send to die
/ W2 M3 P: g; \- [$ v/ W% ? else inc A_i by 1
V, i$ U& B, B$ t8 r; Y end* U+ o0 M8 O' K0 ]( P. s
end: X! o6 h% t3 ~! E7 b2 n; @3 s
f/ @0 f( l2 \) ` H, ]; x( s* E' \3 xbegin P_pick3 arriving
9 B# s4 K6 d9 \& F: J/ ? set A_i to 21
. v q& ?2 P1 L5 T move into Q_induct31 j- \/ V0 P0 k6 R. a* ^
move into pickaisle.induct3
! [$ w' d+ n* Y, S% f# W5 @- @! e while A_i<=30 do begin
4 z- l$ c) U$ ]7 C* J2 W+ m travel to pickaisle.con(A_i)7 y% y4 _0 Q/ q' G1 S+ f
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec# {9 A D0 h5 O8 i. r% h8 m
else wait for 10 sec! r% r% e& S7 r) T8 Q
if A_i=A_leave then send to die
: Y# i1 Q0 }- v1 ^, P3 u else inc A_i by 1' I8 i Y! m0 M. H! I7 _+ S* p5 M# Y
end4 V2 ` j+ }0 q' D
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,其它按你的 ...
|