|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢; h1 A4 M7 Y" b3 n! Q8 y
2 s7 c4 s( w$ H2 S. T7 ^8 J; X9 t1 w2 J( 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中的数值,不知道会不会有什么不妥。; p2 M( E% z, _ t7 j' [
8 q* e6 `* b6 h4 P3 _+ U4 o' zbegin P_read arriving
, Y% L; f! H# E5 Q: k7 g while 1=1 do begin
4 A5 O0 b G5 ]- Y7 f read A_tote from "data.txt" with delimiter "\n"; i0 M$ y- A3 `$ Y; w/ ~' a
read A_time from "data.txt" with delimiter "\n"4 v {& ]/ V( I. G' S9 o
read A_leave from "data.txt" with delimiter "\n"5 _ z7 N# Q. [
read A_picks from "data.txt" with delimiter "\n"
% I* w+ P2 Q8 U$ { set load type to A_tote
- Z6 M( w& @, a' u if A_tote="tote 1" then set A_induct to 1" m* u# j% Y" p \3 U
else if A_tote="tote 2" then set A_induct to 2/ S& c* _+ _6 F
else set A_induct to 3
( z8 @( X. x Q' u( j1 ~$ ? set A_i to 02 X; A n* \. a5 L
clone 1 load to P_induction( K( k3 B0 q/ D4 B a$ I) f
wait for A_time sec
' j, Y) m- o5 U1 Z; l$ j& I end
( e9 r$ q& o1 V# q8 U, E! @end2 X# v$ Y0 ^! Y% g& ?9 j/ h
' [7 [5 H# \0 rbegin P_induction arriving
# w7 P3 j! n0 O7 O if A_induct=1 then clone 1 load to P_pick1
6 U! ~4 h4 v* i0 K7 D else if A_induct=2 then clone 1 load to P_pick2
+ H: o, j2 I" |4 |7 ? else clone 1 load to P_pick3
, Q3 G0 \% c5 Z/ m: I$ X/ b0 {end
( x. V; K9 r% A! w, c! c2 V0 H
begin P_pick1 arriving+ S; \0 }) Q" \% Y! D- l/ j
set A_i to 1* a9 y. ~' b& }9 U# n
move into Q_induct1- y* k4 ]7 ^5 ]" X$ O2 e* Q. ~
move into pickaisle.induct14 E( ?0 O: d& t) X
while A_i<=30 do begin- m6 \$ I/ c2 |9 G: p. `4 k! _
travel to pickaisle.con(A_i)6 |+ `/ @; D2 F" D& C0 N) U" b" t! |
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# Z2 e! p0 D2 h6 [ else wait for 10 sec
$ S$ `* k: J- |4 {) V. g) z+ | if A_i=A_leave then send to die
s9 t2 h3 u. r$ v& U5 C) f, C9 x: S, ` else inc A_i by 1
* @) d# z0 ]+ A end% B4 Z& T) k' r* T2 f
end
& y# r4 ?6 j% W1 v; k2 ]( {9 B5 H, K5 L0 r# [' B
begin P_pick2 arriving3 _# K$ ?; b) [! H' p1 N
set A_i to 11
3 m% \% k/ M. B) M2 B move into Q_induct2. _$ B8 L3 V! G7 u" h7 o* N8 B
move into pickaisle.induct2
/ V+ F5 U9 c3 Q while A_i<=30 do begin# U- y C! @8 r
travel to pickaisle.con(A_i): X- A$ A, K0 o3 ]5 }* k: `& V( G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 K/ ], `+ [, Z. z
else wait for 10 sec
) r0 c# r, Z3 T# d if A_i=A_leave then send to die
D1 `/ ~' d4 \# D9 _ else inc A_i by 1
+ E) P, L# l4 k% @ end, b ?3 ~/ @4 T; o {
end( k, t6 F5 K2 R$ F' L
' H( q- l6 N/ a3 }
begin P_pick3 arriving
5 _& S- b# r) A+ g/ D set A_i to 21( b1 U' n, o- g$ _# Y
move into Q_induct3
& Z: }( c7 {1 [+ p move into pickaisle.induct3
/ Y# k1 i: u4 d3 U" U while A_i<=30 do begin2 ?! L0 A4 k$ f8 L3 d/ |' x( L
travel to pickaisle.con(A_i)
' z0 e- L- F9 j u' c& x) b; t if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" ?4 U! w1 T; U, l9 d
else wait for 10 sec
; P) q0 \$ w. O1 t if A_i=A_leave then send to die
& e7 S8 k( P- `5 [$ ?0 O0 D else inc A_i by 1
- L' ~5 T" }8 v7 H& U end
# c8 V8 a/ e% g' Z1 W8 n4 |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,其它按你的 ...
|