|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢! H# {. u. M$ e9 q4 J3 b+ A
c' P3 p) I7 u( F( ~
我的问题是,在每个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 |" A: U6 Y0 V: m
" M9 D/ a( s( R5 ~2 x1 a2 L
begin P_read arriving! N9 A- d* E: h/ ^/ l
while 1=1 do begin% s% j7 R& Q6 [+ Y. ?' H+ G7 i# j
read A_tote from "data.txt" with delimiter "\n". z0 N! W8 e0 @7 m1 L* R- k
read A_time from "data.txt" with delimiter "\n"5 w7 o" R$ ]5 J; C" S
read A_leave from "data.txt" with delimiter "\n". ?! o/ R6 r* u" n+ x0 x2 R# `9 T
read A_picks from "data.txt" with delimiter "\n"3 Q' b9 w r$ h4 |1 l s
set load type to A_tote
( T, q, h! X4 F @- C. Y8 A if A_tote="tote 1" then set A_induct to 1: g: e3 T) L4 x) `
else if A_tote="tote 2" then set A_induct to 2
( F2 h( z, ]4 u+ q' h6 C9 H else set A_induct to 3 & j3 K; Z g6 W5 }- x8 [" c0 P. c/ s
set A_i to 09 F3 H; A- z5 v9 b2 J
clone 1 load to P_induction. y" N# s# `! x: |2 e$ w; m
wait for A_time sec# ?: G: ?. C! j$ L! _
end
. [% U S' ?" D: q2 O" Z0 F% Mend2 Z& U D3 ]/ ]" S9 k0 A
7 T, b; w& E! D v( P, J# p* nbegin P_induction arriving
9 ~5 l" C( C2 m% R, y if A_induct=1 then clone 1 load to P_pick1, c4 K! ` a9 `7 V U8 K
else if A_induct=2 then clone 1 load to P_pick2- Y5 k6 U! I- N( Y8 p, i) m
else clone 1 load to P_pick34 P3 i( F6 N) [" P3 s; E
end
. b; T% P& K2 s' a1 {% L, Z6 B- [6 _
begin P_pick1 arriving! s- u0 m6 G0 j9 v. j ~
set A_i to 11 R7 v0 v' n- U [# `' {* W) H) B
move into Q_induct1% f0 \: s- {9 ?1 }! C
move into pickaisle.induct1, E! l/ v) ~. Q, t! z( K* ^ E) W
while A_i<=30 do begin
$ D% ? k5 c/ ]# I travel to pickaisle.con(A_i)
9 k4 `( b0 k/ W+ g if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec: T7 x" X: o$ T0 G4 l; T; @- Q
else wait for 10 sec) j- _. J* L4 U3 S: Z( k2 ?
if A_i=A_leave then send to die/ ?5 k" b4 ^/ \
else inc A_i by 12 x. `% P ] E% h1 N: H
end
$ P9 |; F4 F$ V& |end) E' n8 ]. _ j. Z
; i# q/ d/ H& {" E7 Y5 q7 t
begin P_pick2 arriving2 D) g9 n9 z$ c9 K7 P6 ~) t1 j0 k6 \
set A_i to 11
, V, p- U/ D& m+ k9 X) W move into Q_induct2
! w2 `9 G+ J9 Z) F move into pickaisle.induct2
; D& ?4 ]& U2 [/ i, ]- e+ X: F while A_i<=30 do begin
8 w0 |2 a5 P$ Y, w1 w. r1 v travel to pickaisle.con(A_i)
* b. \* W& ]; H3 O if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec O, k8 {2 x6 A1 y) w
else wait for 10 sec
6 d6 U0 P. }7 L1 r9 N. v if A_i=A_leave then send to die4 ~9 F2 T% G; ]" L/ R
else inc A_i by 16 {- Z/ l- v! ]0 i
end: c' b0 y" h* n( P6 r6 R# E
end# B& L, Y- |9 }
# H( J# W2 A7 [ C$ Q
begin P_pick3 arriving) u4 m; X) p5 o) W" p/ g! Q
set A_i to 21
7 ?, ]/ a3 ?) Z move into Q_induct39 T6 `2 X5 ^& f+ t
move into pickaisle.induct3
* F2 e' R$ H. c: A e2 n while A_i<=30 do begin1 u. E+ J: g8 x! C
travel to pickaisle.con(A_i)
' }' n, e R4 `' |! [7 Z) N: I, J& r if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
9 S) t/ J5 @. Q+ m else wait for 10 sec
2 g8 @# q- i0 q( d q- m if A_i=A_leave then send to die
" g" @3 b8 v, Z! q8 a* Q9 M0 ^* K else inc A_i by 1
( m* j; y8 ?1 ? f% W* Q end* u4 ]! V: P* |( B$ P
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,其它按你的 ...
|