|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
6 s* [% x0 f+ }) j1 U" K
; k( {' w% i5 ^1 O, T& u$ o我的问题是,在每个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中的数值,不知道会不会有什么不妥。
1 v% P6 M! o8 J+ Q) K( T d r, m2 Z0 I7 p* ]
begin P_read arriving N3 q) j' d0 n
while 1=1 do begin
4 }4 P G7 S% Y: \+ [ read A_tote from "data.txt" with delimiter "\n"
$ z5 ?* l8 `( J read A_time from "data.txt" with delimiter "\n"
5 f) @: H; f( F" z, I" n read A_leave from "data.txt" with delimiter "\n"
; v I5 K5 k- c; y, Y( I9 H read A_picks from "data.txt" with delimiter "\n"! M# C0 ?& P- o; _& T, g& h1 y7 U* X
set load type to A_tote+ h) s: `" s! u* u
if A_tote="tote 1" then set A_induct to 1
K) I( h" @/ n- {4 ` else if A_tote="tote 2" then set A_induct to 2% \0 g! i( b7 A; h% M$ m
else set A_induct to 3 ( K( `9 h7 e! B3 i: z3 L
set A_i to 0
' d) P3 Q5 V% X clone 1 load to P_induction
+ U. }7 @* ~. V' k8 M% } wait for A_time sec
5 r! G* ~5 j% g. \, o end& H4 h! b& B" ^# I
end9 m- b p; P- {5 ]& E
' | Y/ g! ~2 c1 d, ^; zbegin P_induction arriving
6 |& U- t- |1 L if A_induct=1 then clone 1 load to P_pick1
% @& L+ C+ k0 R7 P) K. j3 Y else if A_induct=2 then clone 1 load to P_pick24 J, D3 d" ?7 ]5 [' {# W# `
else clone 1 load to P_pick3
) ~6 o) D8 j# S: \7 Eend: T" N2 D- _5 s7 x
) Q4 s" d: ~9 g0 u3 V( Dbegin P_pick1 arriving8 }8 j1 Z. p; @3 H
set A_i to 14 }. |1 W3 h" r+ l: C7 n
move into Q_induct1
) _1 W' u: `3 B+ z, X$ i6 e. O move into pickaisle.induct16 I& H! s9 O! d
while A_i<=30 do begin
% }: \$ R8 d4 C% J travel to pickaisle.con(A_i)
; F: D# {- ]$ u if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
9 o: |6 \1 u+ u: N( R; T else wait for 10 sec* h. y. c+ [2 c( p& M$ M
if A_i=A_leave then send to die
& m; t$ \5 j0 F& }% \# r4 u1 ~# a else inc A_i by 1
, c# u9 Z+ L# @4 L& L, o end# j2 A) Q, ~% u7 ^. R$ n
end
! } f. |( v; H4 o; S' M& s1 r! ~8 [( r; T0 S' e
begin P_pick2 arriving
- Z( P! T8 k7 J set A_i to 11
2 M# K. N3 q' k) a move into Q_induct2
% T+ G) l1 n* Q7 v move into pickaisle.induct2
/ D) v u# Y- q while A_i<=30 do begin
: q* T" U) O1 Y3 J" v* A. s3 x travel to pickaisle.con(A_i)
9 S; k9 t5 H( n$ H- ], I if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ ?* c, |8 h, Z$ p1 ?5 _2 ?
else wait for 10 sec
( j, k S, _* e if A_i=A_leave then send to die
9 N0 m; V+ T0 D( e7 G else inc A_i by 1
+ v* ?+ x% K& _- v end
. i: S: e+ n1 v: [9 u z3 {3 xend
4 _0 h3 j3 m& C( ?
- Z8 d, |1 A0 c5 t8 i. O4 F, sbegin P_pick3 arriving
T" p' w% I+ Y% N$ P- d3 p1 O2 `, g M set A_i to 21
2 }, G# N% B) Z( W move into Q_induct3
/ l9 A- {$ H% \1 c move into pickaisle.induct3
+ q' H+ e9 g9 d+ G; i while A_i<=30 do begin
$ V6 j& o0 [3 O% m# U* Z travel to pickaisle.con(A_i)
( ?' A8 Q" B4 H) A+ T; u& J if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec5 _6 k5 m* W% A2 v. Q- P( Y# x9 ^- M
else wait for 10 sec% l3 V* H9 E8 N2 h6 d$ D3 v, i g
if A_i=A_leave then send to die
9 i% I' u1 p1 n else inc A_i by 1
8 r5 L1 f6 m1 `0 y4 g+ R# U end& P# p; X& Q8 z r
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,其它按你的 ...
|