|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢2 a3 x+ p8 p; X7 w* t0 U j2 Y2 Q; n
+ l( l3 l' U# M% ~$ V7 J' q
我的问题是,在每个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中的数值,不知道会不会有什么不妥。/ v0 V8 X" }- H* m' K. J' H$ E
% b- c( ~' D+ F2 i1 F! sbegin P_read arriving
( C: h" c; H: r. H3 Z while 1=1 do begin4 M1 @0 x5 e ?, B
read A_tote from "data.txt" with delimiter "\n"+ t7 c6 o7 f+ P' z# p9 T/ k+ t
read A_time from "data.txt" with delimiter "\n"
6 D3 _ N- D9 \ read A_leave from "data.txt" with delimiter "\n", ^ u' \- a+ N& i, l. \
read A_picks from "data.txt" with delimiter "\n"1 p2 N6 {8 L8 _1 q( w( y" {
set load type to A_tote
8 Z- ?) L/ W; O) H if A_tote="tote 1" then set A_induct to 16 Y# w0 T. i. ~9 S, _0 O0 h
else if A_tote="tote 2" then set A_induct to 2 C5 z: j' m! f
else set A_induct to 3
" ?! L, l& T, d# F% s set A_i to 0# K5 P- Q9 j6 E2 u2 n) H. {- J& n
clone 1 load to P_induction3 {8 U2 f! B) ]5 P0 _
wait for A_time sec3 `& X- ?! l U. M8 x
end
5 i' e; p3 e) w3 {- ^0 iend$ A' j F" w7 c/ k- x* o
, x3 a1 U4 B* f- ]- ]! C" i4 I" Ebegin P_induction arriving- a2 c8 |! p8 Z- y, h
if A_induct=1 then clone 1 load to P_pick1
( m, Q4 b5 B7 t) l& e5 s else if A_induct=2 then clone 1 load to P_pick2/ g7 |; c+ E/ ~% B& e
else clone 1 load to P_pick3
$ q& k. _/ y: k- M" bend
3 Y: O& v' {/ H; L6 B) a/ q- ?8 I8 ~$ ?+ r* g( b
begin P_pick1 arriving C, [! L' f7 i+ U# `8 [" s
set A_i to 14 k. }- s2 T: V4 y+ J9 g
move into Q_induct1
6 _2 P6 a( M) e) ]7 F/ Q move into pickaisle.induct1
, L0 b4 L Z. s) }+ D7 _- L2 C7 P while A_i<=30 do begin" t, t; a; y7 R+ M# c
travel to pickaisle.con(A_i)
7 G+ Q3 T2 W I& d* s% Q; ? if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' X2 C2 `. y- ~0 z0 B
else wait for 10 sec1 f9 f0 o' D, s5 g
if A_i=A_leave then send to die
- Z; V T, X2 R) }7 v: s else inc A_i by 1
5 M0 m% ^7 d- w6 R) [* J( }2 O! y end8 y% o3 R( G) z5 W+ j
end) l; n) ~. Y0 n0 b6 A9 |' w1 K
- t2 H' h6 v& [: q# wbegin P_pick2 arriving& |2 ?7 h7 V; E; t
set A_i to 11, J p/ c% i7 K5 G
move into Q_induct2
, S% y" p) k& G6 J! A move into pickaisle.induct2. v7 t( c0 O C7 }3 I; y7 Q
while A_i<=30 do begin
: ? v* ~; I, W+ }9 M0 h travel to pickaisle.con(A_i)
5 b/ X4 h# M2 I) ?* ^9 a) h& u. a0 J if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec$ Z" L# {- a" D: B* H
else wait for 10 sec
1 L9 X4 H" z$ M" F: i# w if A_i=A_leave then send to die
6 Q* m7 W! s F: U2 K* P else inc A_i by 1- v- L) _6 a# R% s
end$ R( `$ e- P( {0 w, D
end, [) X; O( \" u" y3 u% |& ^
9 j/ {4 p* _. V9 f, T' r
begin P_pick3 arriving
, f/ q' Z+ F9 K& S& ] set A_i to 21
6 k* Z5 x% w9 R/ n7 P+ R move into Q_induct3: o% T' a9 Y4 w( U
move into pickaisle.induct3
8 k f# }- N- F5 T4 q while A_i<=30 do begin# p9 G M, q' a4 \( w4 A4 H
travel to pickaisle.con(A_i)
+ x( ?- {. J/ [5 n8 U. B. a if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
& P" B5 _/ g/ W6 k" d3 I* z) P else wait for 10 sec
' |: W/ O. d, n2 {0 z! v if A_i=A_leave then send to die: o4 u2 h' W0 r, h; l W
else inc A_i by 1& A5 F4 g1 K$ j9 t* G
end
4 }" @& c- L! J" m( |6 [3 Z: y/ ?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,其它按你的 ...
|