|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
8 g/ e7 w' q: p
1 q& E) W- t- _9 I我的问题是,在每个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中的数值,不知道会不会有什么不妥。& x& |$ w# c/ @0 g$ A! L8 z
' h9 s/ S: U) F' `6 f) {; ubegin P_read arriving! N* k# I6 ?! N3 S. W
while 1=1 do begin. I ? k' L6 L* B
read A_tote from "data.txt" with delimiter "\n"
# A, v$ [3 r, ^! m c7 j read A_time from "data.txt" with delimiter "\n": K/ B' }8 o' V+ e/ J4 K: F
read A_leave from "data.txt" with delimiter "\n"
0 j' d% j. S9 l3 ^% ?0 o6 ~ _ read A_picks from "data.txt" with delimiter "\n"
1 r! T2 {4 }7 F* u# D* P set load type to A_tote
$ I3 r3 |8 z/ u3 A! C. E if A_tote="tote 1" then set A_induct to 1
, ~' e9 W9 _9 U else if A_tote="tote 2" then set A_induct to 2" B0 o/ Z3 |. f: [# X6 a; y
else set A_induct to 3
6 Z) D1 P! A5 b* z set A_i to 09 U5 y& x/ [% D0 e
clone 1 load to P_induction: d8 S4 j+ i6 M4 w1 F, p3 j8 g. I
wait for A_time sec/ F$ o% {$ S3 [+ v6 G/ m w+ J
end( L$ o1 O0 b' ]6 j2 z/ M% ~' z
end
" l0 x6 l5 T" ]' o _' G
, K2 `$ Q% ?6 fbegin P_induction arriving4 a( M) b* c0 |
if A_induct=1 then clone 1 load to P_pick1: m7 W' X% e0 X7 F" Q2 }, N
else if A_induct=2 then clone 1 load to P_pick2* ]3 p& z% `, F; ~
else clone 1 load to P_pick3
6 }) H" h6 Q0 f1 V+ G# ^end
) i3 G9 m2 j& {' c& `* I
0 @* f; ~! M! f. L- O, \2 z8 abegin P_pick1 arriving2 Y- z/ [7 z6 i
set A_i to 1
A# R: U5 b, d9 h move into Q_induct1& l& c0 E, J0 P+ U4 }* B+ ?7 K3 k
move into pickaisle.induct1
; d. j1 Y- f' S3 c0 a; u while A_i<=30 do begin
7 S0 \; {3 M$ }* f; C travel to pickaisle.con(A_i)7 H( s7 A$ P/ @- f
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 P! g" h# H7 l( v1 W& ~0 B else wait for 10 sec
3 T4 g. r' {* O% D, N) R- Q- X3 a* A5 p if A_i=A_leave then send to die( W( N; l: W1 Z
else inc A_i by 1
7 l8 K# U& n$ c8 C end
f: {- M# ~, y& q0 |8 [1 h& L- aend
S$ N" s( V; c1 d! W; U* n- v& c0 k, O1 \# @
begin P_pick2 arriving
3 R% @. V' r1 J' n set A_i to 11
8 B1 q5 k$ n" ?4 J move into Q_induct2
$ H6 [) w- P7 D+ | r/ r V move into pickaisle.induct2
9 J: o) r% Y, b: U( w: s while A_i<=30 do begin
& s N5 b$ p- x' S" U travel to pickaisle.con(A_i)7 X% P( [3 q- _1 W
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 N. m" j# j! o$ O+ k$ W. k& @
else wait for 10 sec. a( a; B3 M' |, L0 S1 m
if A_i=A_leave then send to die9 p {8 a2 n1 J" r
else inc A_i by 1- F8 R6 ?' Q/ x7 o/ W: ~
end5 P9 B9 |# `* S1 H, D4 M
end
, f5 u" Y+ |; X
) w) V6 D; C8 {begin P_pick3 arriving
6 f9 k1 J* T; i. k9 j9 X+ j set A_i to 21
5 o9 z+ _0 G5 h% U move into Q_induct3
! x- M! d8 a+ U move into pickaisle.induct3
e2 I8 \& D1 V X. K' N5 f6 v while A_i<=30 do begin# B c* X6 E! A! g& ?1 N8 i1 `
travel to pickaisle.con(A_i)0 y7 u# m' Z. H6 X. I+ t: M
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
: a" @; C& o/ j0 k, `7 f else wait for 10 sec5 @/ ]+ Y; d5 ]1 |
if A_i=A_leave then send to die
; U: V* ?* t) U# Y else inc A_i by 1 c6 `% `, H4 Q( s6 z" [
end
7 u! n' |, }( I0 x* M' q' q+ rend |
最佳答案
查看完整内容
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,其它按你的 ...
|