|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢# u( Z2 A. U$ e- I! q
# V0 @! \ }, u$ f0 N2 |6 M; ?我的问题是,在每个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 w: }. z4 p+ Y A' o
" W% t* T7 P0 F0 _5 Z; fbegin P_read arriving; \: ~1 h% c% S- K% D
while 1=1 do begin
( E* q& b, T4 @/ h/ _, D4 ^ read A_tote from "data.txt" with delimiter "\n"
& _6 V/ B" s2 \ read A_time from "data.txt" with delimiter "\n"9 t% l" h3 L6 j" j3 b
read A_leave from "data.txt" with delimiter "\n"
4 I1 o* M" Y& S4 |3 W4 @% B read A_picks from "data.txt" with delimiter "\n"3 g$ D7 i, X: x( i2 X7 E; d
set load type to A_tote- [* s% { C* J# U& d' @+ ^' {; v
if A_tote="tote 1" then set A_induct to 1
- N$ p* i3 F1 l8 Y- ?" p; s1 B9 \ else if A_tote="tote 2" then set A_induct to 2
" ^+ t" c' C0 Q U7 `- j$ L else set A_induct to 3 / L! w6 C" K- E
set A_i to 0
$ @; Y, r6 w( B8 P" }1 c clone 1 load to P_induction) C) h1 j- G, l$ |: Z2 d' S8 w
wait for A_time sec
1 |3 b, R! H! L+ m2 C2 D end
; }: S$ j, B( G- o( E3 t; f* s R* aend$ ?; Z+ D2 D ?
: P$ o5 G3 m' g4 E
begin P_induction arriving$ h) }$ W( p, D O* u
if A_induct=1 then clone 1 load to P_pick1
9 q5 `0 a y, W- B9 w else if A_induct=2 then clone 1 load to P_pick2
! P- g5 O) d" r# m, W6 G else clone 1 load to P_pick3
* \7 g0 _$ n* Z, h0 hend, j; E7 H; M0 `- P
4 i( U4 F- }( K+ d6 Kbegin P_pick1 arriving6 C% x; q& N$ F
set A_i to 1
7 y2 {0 V& @: N+ g move into Q_induct1+ o G7 j) ^# K7 N& Z
move into pickaisle.induct17 F w9 a* ~. O A0 b
while A_i<=30 do begin
" d! s. r# T! j2 e travel to pickaisle.con(A_i)
1 ]4 _% `0 ?; ~# q) D9 A if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ F u- P4 R. T, f* K4 \
else wait for 10 sec
7 N3 [7 j6 u5 i% v z V) t if A_i=A_leave then send to die
! V1 `# C) P* e8 E( ^2 b" _ else inc A_i by 1: s! f; M1 ]4 [9 n
end
( }: b% o1 o6 B4 a! |end9 i* P0 m9 }! O- `: n
6 S- d4 Y, v- E. |/ Z5 p" W
begin P_pick2 arriving
& C& C' t/ f3 p8 W set A_i to 11
& Q& P+ m; {$ c) i0 G% z( W* y move into Q_induct2
7 [; n t3 [5 L0 d& L; f move into pickaisle.induct2+ a6 O* }3 N' M, L
while A_i<=30 do begin
& y7 ?, U+ O Y( `" o- G( ~ travel to pickaisle.con(A_i)+ O0 \: J. {( }$ {
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
1 I( f' a: j9 Q# E/ @4 r else wait for 10 sec
7 N, x& d: q1 R( t/ b5 w if A_i=A_leave then send to die3 Q% W9 N: ^- D! _- J/ D
else inc A_i by 1* Z% q. m9 m$ u" T' I K
end- U0 @2 M# ^0 w0 C
end
* o2 z- H0 N7 p4 k; U
$ j' m( G W3 j2 D7 pbegin P_pick3 arriving3 e( J' j0 ^# s( e Y# X
set A_i to 21' M! k% i k: F8 q1 J% D
move into Q_induct3
% d% W( w0 R9 @ move into pickaisle.induct3) E) Y& r$ j M5 l, s/ A: [: H6 \
while A_i<=30 do begin
1 v2 ~: J, e0 I$ \, K+ Q9 d: p travel to pickaisle.con(A_i)% K2 h- U1 v0 h' _: [
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ y" N. m2 e" B. D8 K; s else wait for 10 sec
3 C1 A5 y' V- I! `3 m9 i) ~. u if A_i=A_leave then send to die
+ E0 l1 m8 [, `$ R9 a T6 L, ]5 N else inc A_i by 1
( u& w6 l, ~/ P end X; _7 t& w( K0 [7 Z+ z
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,其它按你的 ...
|