|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢" n. f/ P8 h1 M- g" p$ H( L
. M8 u+ X+ Z$ M. h
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
4 S# Y' k, K. |4 H& Q% ^) S2 M5 ?0 ?+ r( q- V% A3 _" {
begin P_read arriving
7 R) I* A) e6 g! q) x while 1=1 do begin7 j: M* V6 B$ `$ ^/ f
read A_tote from "data.txt" with delimiter "\n"
2 R9 b! K/ u+ e& r read A_time from "data.txt" with delimiter "\n"
4 Q8 H, q2 d- R: d T read A_leave from "data.txt" with delimiter "\n"3 J: x* ?3 A1 }: b; L0 ?
read A_picks from "data.txt" with delimiter "\n". A! }& j: P. M* p+ g9 t, Y+ x6 j
set load type to A_tote; e0 X% E6 K* n1 i0 L% A
if A_tote="tote 1" then set A_induct to 1
; [+ l8 a g z4 q else if A_tote="tote 2" then set A_induct to 2+ T* H7 @5 l# t3 B1 V3 F# t* s
else set A_induct to 3
7 g) m5 A& s. h. F set A_i to 0
2 v! P( Q7 n* o( n1 |% H$ G clone 1 load to P_induction( E/ K6 _0 v& {1 o. F; N# h0 q( U
wait for A_time sec, N) M2 a/ ?' J- Q& d8 g
end1 r4 e" J. p1 r+ w: g6 r( f
end
5 a7 L0 }4 P# T) o! z
' n! Y7 B% M" g: Rbegin P_induction arriving7 ]/ x. {; F4 ?4 i- I$ j
if A_induct=1 then clone 1 load to P_pick1+ K# t1 c& k9 G; W) C- J8 x9 ~
else if A_induct=2 then clone 1 load to P_pick29 ^) O7 c, F+ n$ Z+ ]7 _% w9 }/ @
else clone 1 load to P_pick3
# ^5 ?3 [8 e& t" |/ L1 a$ Dend
7 l1 w4 v; ^4 H$ Y5 M* ?% }
' d$ l( a$ L1 C( ]: Xbegin P_pick1 arriving
# m4 ^; c! B3 F5 ?* d set A_i to 1) }4 ~" b0 l- z" o
move into Q_induct1
6 K4 s0 @; f) ?- n0 W2 U9 B( _' ^8 b move into pickaisle.induct1" A- a. c) x5 g) H8 U6 T" [
while A_i<=30 do begin4 t- i' x, }6 u+ W1 _7 {) c N
travel to pickaisle.con(A_i)! f; \" E J5 W; [1 Q
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
: H" }! T) l4 @* w4 G8 Z1 k else wait for 10 sec! r8 f$ q2 Q8 d
if A_i=A_leave then send to die) C" z+ ^1 m, c: }* f
else inc A_i by 1
1 P/ n; p" _: z4 k) Z! H }+ t end
) ^6 e* ]. y. K6 Rend, S9 p9 O" S; t/ v; \, s, U+ I/ Z
; o- V: j4 e: s% e# D/ ~7 T
begin P_pick2 arriving6 _/ d# n: W8 i) s0 A
set A_i to 11; k) T: j+ e7 P A7 k
move into Q_induct2
; _! k8 P# m1 K# U$ Y move into pickaisle.induct23 c# ]) o9 ^( @, ?/ [9 z9 j! z
while A_i<=30 do begin
9 m8 ?' F1 I% G travel to pickaisle.con(A_i)$ y8 d `& r* g1 v! b' q- j
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec: S0 u: g0 c8 F6 E3 K- l
else wait for 10 sec
* k5 V6 c$ P$ U# l if A_i=A_leave then send to die1 }* s3 n( Q/ s; j
else inc A_i by 1
}4 F' z/ A9 N+ z$ R y end
7 L: D+ K5 j6 ^1 P8 R1 Dend4 X; A' f; x4 u5 | G# O. K" k
0 {6 {9 D7 X" f- T& s# T
begin P_pick3 arriving7 ^9 ~& O# [& J4 X9 J
set A_i to 21
' X, B9 m L) R3 p, ] move into Q_induct3
" A( e; W, J1 v. x p( Y+ a move into pickaisle.induct3
+ @2 ^: C" g" }% L5 { while A_i<=30 do begin
A8 V0 `9 z+ H5 \6 u# a travel to pickaisle.con(A_i)( u) m& X0 W( ^" t: w
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' t. d8 c# z* d9 {' o
else wait for 10 sec
- v* i3 s% X4 x6 ?+ P if A_i=A_leave then send to die3 d# s& _4 N5 f- g" V1 N( k
else inc A_i by 1
+ _1 X! h+ {, z5 o$ l; |5 V end7 \! \) F3 A5 T
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,其它按你的 ...
|