|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
; B" K; I. V. `9 O, B2 E% ~- r2 n+ K2 _ |1 u5 _
我的问题是,在每个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中的数值,不知道会不会有什么不妥。7 a: E2 P- x, W- l7 u- l2 V6 u) j
- P7 `! H8 `* j9 h; b% v! cbegin P_read arriving
) T7 C4 |" x" l# w d1 Q+ G while 1=1 do begin
+ e0 h0 E3 h3 [5 S5 z- i read A_tote from "data.txt" with delimiter "\n"
* P' E$ l" \. b$ G: D7 R3 \ read A_time from "data.txt" with delimiter "\n"9 v3 }. D3 v+ q4 u; l
read A_leave from "data.txt" with delimiter "\n"
" c& g+ n6 a: J$ q; A; j( @2 n* ]! F read A_picks from "data.txt" with delimiter "\n"
. L) V) o) M$ S6 V) i5 q3 c set load type to A_tote
: ]9 `' y1 }! ]; N' t* ^+ ~- r if A_tote="tote 1" then set A_induct to 1; |8 i/ k2 T. s& `9 w: v9 p4 Y% j
else if A_tote="tote 2" then set A_induct to 22 V0 w3 C* Y& l+ v
else set A_induct to 3
& k# C- @: O1 {( ~ set A_i to 0
# |5 o- e$ n" a8 |: M5 v clone 1 load to P_induction4 Q& O! h, V/ U$ g
wait for A_time sec
: G f/ N: N7 ?! g* [ |3 Y$ w end
. @0 R0 k1 _. }( G9 Hend
' _( X$ p6 c! a# E. l4 g# V/ x B# j/ d
begin P_induction arriving9 h0 M2 [4 |' [6 C$ j* k* j# K/ o
if A_induct=1 then clone 1 load to P_pick1
1 s! A) g6 s. w; `/ Z ~) V else if A_induct=2 then clone 1 load to P_pick2
" q8 J, ^( |# }1 P1 R3 a else clone 1 load to P_pick3
7 H/ \8 P* u/ [3 c% Nend) T) Q; t$ S. |- D( r) i
3 N P" G5 M! s( v
begin P_pick1 arriving! Z3 ~( A( d9 [( L7 I) Q
set A_i to 18 [! {$ l/ }5 V0 O
move into Q_induct1
# M G' v" g7 o* S move into pickaisle.induct14 k1 D6 w4 M) e$ z$ n$ [
while A_i<=30 do begin/ M; P8 C0 f8 t
travel to pickaisle.con(A_i)
( p4 X4 z/ V0 V3 F7 i if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec& }9 R* C1 \2 G+ n
else wait for 10 sec2 B0 F5 ~' o* p, e% Y1 t1 g, i
if A_i=A_leave then send to die8 {4 B |. W# @6 W4 y+ B" J
else inc A_i by 1
2 o" N" _3 R' d2 P, o end
, U& m' T/ K4 i( |! K4 ~end
% i; y# ]$ w3 e& h7 k
+ E7 j( A8 W) U% nbegin P_pick2 arriving
. T/ S7 d& s- [ set A_i to 11) {/ s* i5 I2 ]0 t
move into Q_induct2
6 A% {6 @6 V+ Z. `) s move into pickaisle.induct2' ?# O8 h1 G, h5 S: N: V6 I
while A_i<=30 do begin
G2 e- H- K( i/ y travel to pickaisle.con(A_i)
; K0 W! l9 ?4 N: J9 x( ^! y) x if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" @# R7 V/ P/ s- l else wait for 10 sec% S/ q4 T6 Q+ s! }6 Z8 q
if A_i=A_leave then send to die# ]+ `+ ^/ Z! j1 }) V" ]5 z
else inc A_i by 19 c5 ]& B b a3 _; e$ C0 f. A
end
& `0 I: h3 i( y3 _end1 b& F9 A( y+ `
- o& U) P W( t. d
begin P_pick3 arriving9 K! f1 _: q( J' d! Z5 o
set A_i to 21; V. }' j3 a: t
move into Q_induct3/ h$ E; [- U" y( [ d
move into pickaisle.induct3* J! z2 L8 `, g
while A_i<=30 do begin9 P0 u+ r# c( v* W
travel to pickaisle.con(A_i)
' B; _5 G1 L' I3 u# z8 } if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 s5 E. U: h: t else wait for 10 sec
, c3 L5 B/ w2 s, d# V/ i# c if A_i=A_leave then send to die
$ y7 g6 p" k" B! M else inc A_i by 1) t. `: |: R7 N U7 p) Y9 u
end! n0 w. t, \8 `: V
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,其它按你的 ...
|