|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& p$ B8 X t, J8 R% H% d; r6 ?! K
& v/ ]" M7 n8 J9 T" e9 f' j+ a我的问题是,在每个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中的数值,不知道会不会有什么不妥。, ^" s! {8 H Z9 X5 Z: Z1 w# y
) f/ Z8 I$ E1 zbegin P_read arriving- S' K( @0 c# G2 {' g# w' H
while 1=1 do begin' m# o8 _' }. `# c
read A_tote from "data.txt" with delimiter "\n"4 o; j) R4 C* Q# k+ j8 V
read A_time from "data.txt" with delimiter "\n"
; K' Z7 t* t, ~; W read A_leave from "data.txt" with delimiter "\n"4 ?8 Y1 H4 L3 u0 M$ [4 ~" B7 Y/ k
read A_picks from "data.txt" with delimiter "\n"( H7 \0 C4 V( y; D; O. t2 `! k$ s* Q- I, R
set load type to A_tote$ x2 z/ n* C& f' _" E
if A_tote="tote 1" then set A_induct to 1. e0 Y! w5 N! T# g8 R3 y4 X
else if A_tote="tote 2" then set A_induct to 2
% R. O4 {# b( Z/ v! Q* c1 ~ else set A_induct to 3
- w L* z& J$ v, V3 a set A_i to 0
3 W! a, {: \: w4 H) \) b4 R clone 1 load to P_induction2 |9 J& _$ u% A _& P& r5 g9 A1 {
wait for A_time sec
& ?$ g$ @' `( J, a0 m end" B$ ]7 r$ V& Y8 R* f* L$ J9 a
end
x4 _3 Z" r) t5 x0 T/ ^( w: T8 N+ C# [ U
begin P_induction arriving' X9 T" f# R! E9 S( Y3 e3 J8 C
if A_induct=1 then clone 1 load to P_pick1
( j; W& Y) f% ]$ g8 b. H else if A_induct=2 then clone 1 load to P_pick21 U& L0 C9 F: u2 \3 h
else clone 1 load to P_pick36 T; z' n" o, q3 v3 ?4 @% k
end3 X. W# E4 }2 k1 o: q2 g% }8 B
: K( E4 p! x- n$ p' U6 ~- ]7 sbegin P_pick1 arriving
, [8 i* a& T5 v set A_i to 15 n: D, \1 e$ m/ H
move into Q_induct1
: J) P4 C# Z4 @% s O move into pickaisle.induct1
. x+ A; B! z- V- l8 _! p. } while A_i<=30 do begin( S$ O7 S- M# W% C2 K
travel to pickaisle.con(A_i)3 b0 e4 ~$ P4 t: Q1 } d
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( U7 x$ i4 s, n' S3 i else wait for 10 sec
X7 u% p7 Y& \+ E3 M5 |, H; F: u3 p if A_i=A_leave then send to die
+ z# ]) f$ }% u, L6 @# g else inc A_i by 1% r7 ]* a8 n) d" t$ J' T
end3 H. ~; S8 d# f; y6 ^2 p) Y4 o
end
+ }6 O! }" A' G$ |1 ]& O+ P1 l$ a [
begin P_pick2 arriving
# K4 C$ H# [3 V8 w/ k( K/ U set A_i to 11
4 { H8 I5 z" |0 X" d3 T: b move into Q_induct2$ _9 V8 M( o' L+ g
move into pickaisle.induct2$ B3 y- n7 G8 n* u* ]
while A_i<=30 do begin
h) X: k- w% {, c travel to pickaisle.con(A_i)* X0 ]! m( K& m; l3 d' ~& T
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
: q$ E* G7 M( ]1 v else wait for 10 sec
/ L5 U! i B4 B( F* N4 c8 F1 Y; U if A_i=A_leave then send to die* z( } T; H" S7 X
else inc A_i by 1+ h7 V! D: b' z- z2 R( j
end
; v, h1 U1 ]$ x% H {: Fend
& i% n( ?0 U( u9 d2 I
" p0 I$ q$ M& p3 e0 Q1 w) t" X4 x/ tbegin P_pick3 arriving5 O3 Y& Q6 k* l o
set A_i to 21
8 V! k0 U! N' g! N; X+ Y1 y; d" q5 [ move into Q_induct3
" {: U y! q; b, @0 x move into pickaisle.induct3
( a/ {1 p! I% e4 x" ~ while A_i<=30 do begin
6 x x+ u6 k: {6 R u* A, s1 ~, ` travel to pickaisle.con(A_i)
& d) R* k! p4 }- _% f% F if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec8 P( O: ~. e2 [4 o3 \+ z3 y0 J' a$ Q
else wait for 10 sec( b; o- H) a7 a6 g* {' ^
if A_i=A_leave then send to die1 E2 P3 g, C6 ^3 w! R- A1 b
else inc A_i by 1
4 r2 [/ w! v) B end0 Q9 g. B6 P# u( o2 K
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,其它按你的 ...
|