|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& I- f: W y. E( b) [4 o
7 v% @, `5 E K# A& |5 x; A* E
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
+ W9 _; @; C7 j
! \1 K: u3 M; k( ?. Z6 F+ G2 M2 z3 C( Cbegin P_read arriving
7 k* l4 ?1 ?5 K1 K while 1=1 do begin
# h4 g3 M8 {3 S% l" h, P read A_tote from "data.txt" with delimiter "\n"- Q9 Q! Q. b' _' K# P# z
read A_time from "data.txt" with delimiter "\n"* D3 F- @5 ]9 w: z$ @: t
read A_leave from "data.txt" with delimiter "\n"
. l, a0 o! A# R read A_picks from "data.txt" with delimiter "\n"1 q5 G9 Y, y; i& Q9 Q7 V- \
set load type to A_tote
0 h# O0 i6 f( h if A_tote="tote 1" then set A_induct to 1
, [$ R5 N& c/ ?9 z else if A_tote="tote 2" then set A_induct to 2
7 w+ p n6 x* m- } N$ g5 z3 N5 u else set A_induct to 3 6 q A: C9 G: v0 h) R K7 _
set A_i to 0
6 h) T8 T+ Y# c clone 1 load to P_induction
1 t9 u3 I. G" O. d- J wait for A_time sec
: K6 V, U. T6 E# P end
0 D* h4 s8 `& @* |; z$ Uend9 u2 x1 l- M" c0 n) N/ O
# K7 s0 ?9 R1 P% V, `
begin P_induction arriving& q7 E4 q) i& W
if A_induct=1 then clone 1 load to P_pick1& s. m9 Y& c8 I& G+ l& j \
else if A_induct=2 then clone 1 load to P_pick2
- w% K" }$ g: e9 ]/ C else clone 1 load to P_pick3# Q1 g! E9 t, ?5 t6 i" D4 V$ D
end
/ D9 q$ f' S, F- p d' e& I+ i9 j: S# Z0 c L. K$ f
begin P_pick1 arriving6 o0 e/ S6 k# n
set A_i to 1# `, G9 @: [. f0 c: |1 m d
move into Q_induct1# D1 L& R: t/ [) y2 D2 Z
move into pickaisle.induct19 e7 i( n+ I1 N$ A! i& K7 A
while A_i<=30 do begin
- W' H/ s/ ^. v D* i$ F travel to pickaisle.con(A_i)* n0 y+ A, t3 c5 v: l: z5 a
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 n3 t6 J: K* Q7 B4 H" c3 W; A/ V else wait for 10 sec, d) K, v" r7 P9 H5 k
if A_i=A_leave then send to die3 x) f- \9 b& e1 o7 y7 z2 `
else inc A_i by 18 W! I1 U# S8 ^- Q: ]0 S- m2 t' @* ]
end: x2 T3 D6 J/ g
end
k% j$ k$ ?, |9 H( I: o; K: z/ G* G- ]6 F. v
begin P_pick2 arriving! h1 ]- ?& V+ b" ^0 Q9 Y
set A_i to 11
. ~, |: E0 U3 h1 z; J- p move into Q_induct2) f. u% H/ |! ~ f
move into pickaisle.induct2( b4 W# o) d, N7 @2 U2 X) r
while A_i<=30 do begin/ j, P: _5 @' C9 U0 l( [+ q% u
travel to pickaisle.con(A_i)
; W o/ Q1 ~: K0 w* c if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 D0 ?% D9 T- Z
else wait for 10 sec
" \ U' [, }) v: t" M. ?' k8 Z% B if A_i=A_leave then send to die& c- x+ R; z' N
else inc A_i by 13 o! `5 M6 U. Z/ U1 ?
end
# u6 t a, F% Q5 d7 f; lend
0 t, ^; F. S$ q7 G0 x1 ?; {( U
9 z5 s m, G; h3 r/ i# s. Y* cbegin P_pick3 arriving
l! f7 q# E4 ^7 G9 v; b set A_i to 211 d6 T9 M0 G" @
move into Q_induct3" _+ q+ m# D7 Y H) F
move into pickaisle.induct35 ?) \' ~# r% r1 c3 y, m
while A_i<=30 do begin
0 Q2 ^' L7 T/ r/ d! B travel to pickaisle.con(A_i) `) J% R, m$ y& p$ f
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec# f% W, I5 H3 t" N$ g% I
else wait for 10 sec
9 [0 b2 b& |0 L( H3 W3 q3 L- F) X if A_i=A_leave then send to die' S- q8 C4 c& x
else inc A_i by 1
; J; t* b' H2 A+ k end, s1 |+ w6 ~. v$ g$ j5 [
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,其它按你的 ...
|