|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
: X3 s G7 i3 X; Y* |* Z: `& E4 l5 W- {/ 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中的数值,不知道会不会有什么不妥。
! Q6 v- Z1 q9 }9 T. I; ~
5 S. m n2 h1 y! X8 y# Nbegin P_read arriving0 x6 O# i8 }) R
while 1=1 do begin6 I% S4 |- f9 w! x; ~$ k! M
read A_tote from "data.txt" with delimiter "\n"
% ?8 O) W! H% I6 l& J# y read A_time from "data.txt" with delimiter "\n"
, S" d; P3 B' N# t9 d' A2 ^$ N2 ^ read A_leave from "data.txt" with delimiter "\n"6 j/ |5 k$ S' s1 G9 t2 z2 h5 v4 i
read A_picks from "data.txt" with delimiter "\n"$ F2 N& S- v) i e+ T' P, d6 |
set load type to A_tote
) a& Z0 j6 [8 [3 z/ l* o8 s- L if A_tote="tote 1" then set A_induct to 1
8 \" _; Y: ~# n2 U I1 B5 X7 u else if A_tote="tote 2" then set A_induct to 2
) Q# {8 f. V' o, h- a& q else set A_induct to 3 8 H" A2 t+ m+ F6 g( e, ]: R6 u4 R
set A_i to 0
* b9 E5 t0 h% N6 s! ^: m' a/ } clone 1 load to P_induction3 k( C$ Z) I" m# q: G: Z& n
wait for A_time sec
! j C: P9 u9 j d end/ o7 X! s5 a5 u4 {
end
8 t( E3 e9 t: d/ B( R- p" \3 Q$ e) Q% R) H
begin P_induction arriving
0 t) P! s. P2 T' c" a if A_induct=1 then clone 1 load to P_pick1( i8 j& J* V5 M" N2 ?) P Y
else if A_induct=2 then clone 1 load to P_pick28 S2 V# ~3 f/ ?0 _2 @% J9 x' U
else clone 1 load to P_pick3
+ i0 g( h, e" S" b& kend8 l9 g$ }4 C# V* h% A
8 e' m; c. P5 n, |& V+ h3 a) Nbegin P_pick1 arriving
2 ~: G p5 M6 m set A_i to 15 u' j* I8 G, h9 k6 k. l
move into Q_induct1
" a# N- w7 N5 A8 \+ E0 Y* @ move into pickaisle.induct18 h. A" v' d! d. o. I1 Q( o' @
while A_i<=30 do begin
! h1 n$ b/ K3 E% E travel to pickaisle.con(A_i)2 Z3 A' _5 D$ `
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# n; [' J8 ~6 K i) n# n4 v else wait for 10 sec
( j: W0 B, A4 O; {" y if A_i=A_leave then send to die! z4 D$ e! L; ^& `& n( }! }, ~
else inc A_i by 1% W; y7 d$ w- m- Z! J
end
1 G/ i9 ?) c/ |, H7 w- Iend9 n3 C! V5 S0 F R- s
U9 u8 R7 j$ Y" e& y) v/ V( Nbegin P_pick2 arriving8 W8 H f5 d: L3 ]
set A_i to 11
. r2 W! }( V: Q0 Q1 b) z* H move into Q_induct2( o. _8 L2 y" O, h/ O2 M8 q6 k
move into pickaisle.induct2% ]2 a2 w% p! ]4 H4 }1 [5 L
while A_i<=30 do begin
8 ^) c4 C3 m0 `' _" N travel to pickaisle.con(A_i)
/ h* {- g+ A$ E1 X if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ N2 b8 Y5 d/ c( L2 i4 \) G- n
else wait for 10 sec' f+ S# n; }' l" N, j
if A_i=A_leave then send to die( z0 _, O+ `1 O% G# y
else inc A_i by 1
% B+ c, \- G/ q3 ] Q end, r5 w! |4 U# A7 L/ f( k
end
+ S6 s6 l* {% P6 w9 E3 e# L" I' e% O. y0 }' n6 h L) @1 a# `
begin P_pick3 arriving
: q7 Q$ F( Z$ m8 i5 K5 a5 W set A_i to 21
' }4 T' f& e' w6 L1 p2 ]# y move into Q_induct3
" s. a. Y6 n$ K* X# d: {2 U move into pickaisle.induct3
- \/ m8 Y, ]/ Z! w8 b while A_i<=30 do begin
. }2 q1 F7 y% `+ B6 K travel to pickaisle.con(A_i)$ N, W9 \: E2 ~/ @
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
; R, m% J1 V! d3 o else wait for 10 sec7 Z' o3 s g/ p* P
if A_i=A_leave then send to die
/ z6 G& q& ?+ a$ z5 ]* E2 ?% ^: ^ else inc A_i by 1
6 O1 n3 c H( L( k2 T, z N end) G: i9 t6 V4 e
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,其它按你的 ...
|