|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
3 m x- N: T& q# c
) p$ G0 x" \1 D V% 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中的数值,不知道会不会有什么不妥。
- `, o7 a! ?9 f4 w5 N( a
8 S* x& p1 ?* V. W; L7 Kbegin P_read arriving
# V7 ~# u- Z: F* f4 d9 J while 1=1 do begin
! D, ?, x) W! z# {9 o read A_tote from "data.txt" with delimiter "\n"
6 x9 X( h' l$ m, W# K7 g read A_time from "data.txt" with delimiter "\n"
* T6 Q& _5 ] C# \- ]& G$ u, W% H read A_leave from "data.txt" with delimiter "\n"
@$ y" }& U6 G. |% [. W( C: C read A_picks from "data.txt" with delimiter "\n"
- ?) ~/ Q1 O( N* D( X. } set load type to A_tote% n. q% f8 ^( g' z$ {, t7 }3 P
if A_tote="tote 1" then set A_induct to 1" K$ h3 x1 S& L
else if A_tote="tote 2" then set A_induct to 2
" {1 j- m7 e/ c$ K) o$ T8 A% l- k else set A_induct to 3 0 e" F' u' W4 J; N
set A_i to 0# }3 L; x) N9 S. t3 E0 B
clone 1 load to P_induction# ?! d- Q3 C& M
wait for A_time sec( O. b) K6 K. h1 N
end0 ]' d' o6 R0 { `
end- u) m- S4 a; \' C9 Q" e
! q2 t/ O9 B" Q4 t
begin P_induction arriving
% U, s( u3 Q* i$ x1 u! h% r if A_induct=1 then clone 1 load to P_pick1
6 y. P# N+ I& W& t: S else if A_induct=2 then clone 1 load to P_pick2% i- n8 T/ L0 f5 Q/ w* J8 I
else clone 1 load to P_pick3" w7 }, l m! C6 K' i3 ^& D+ v
end
! k& O! H5 S Y* {, a% s8 K2 A( l5 ] I3 |
begin P_pick1 arriving- e, V3 [6 ^% w N" ^) D- I+ b
set A_i to 1; ]) C5 y) @1 |. r2 }
move into Q_induct1& D0 Z! T7 X R' x
move into pickaisle.induct1
/ v- _; [' Q: T7 S' X W0 N& d1 ]3 A while A_i<=30 do begin
5 D2 k! _ I# ?; L: e; F& P4 c travel to pickaisle.con(A_i)' U$ w% H" C6 I
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec, P3 J& M( U# S- D5 i# P! w% o# {
else wait for 10 sec! ^; q) K: X6 d9 q+ ^* h6 S6 u9 z- h
if A_i=A_leave then send to die6 I' x; C! N a7 f5 ^# k
else inc A_i by 16 l" V* B6 P0 v+ J
end
, o: D+ b2 n( y" hend
( h4 W* @. c3 h9 B t7 A+ N
% a+ b8 j9 p y4 M) H: w! Q: K& L$ Xbegin P_pick2 arriving. s4 t( H8 s1 d4 P
set A_i to 116 i8 ]5 M- T/ g% Z$ R+ c3 u9 Y. B
move into Q_induct2( \# P* W( C( p* f) p
move into pickaisle.induct2# I% ]5 K% y8 J0 C. h) v v
while A_i<=30 do begin: S! _% C: C8 p7 g# V
travel to pickaisle.con(A_i)6 K# c# i0 ]5 S1 |' ~8 b
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 X- L% V. @( ~ p else wait for 10 sec! B8 r7 X( c- u. @% L& K
if A_i=A_leave then send to die
3 m9 D$ M* ^# h& c! d9 } else inc A_i by 1
/ P% p- b% r) A0 y end) @# Y& N3 m% J$ P7 m+ |% _
end6 n5 x+ {- ?' d0 p) d
0 l0 R" b5 i( P9 M0 g0 e# a8 t! V! B
begin P_pick3 arriving
, S" ?% V2 ]3 D" A) H T& A8 g9 F set A_i to 21
: N6 G; E; D9 Y7 s move into Q_induct3
2 H }& x+ ]6 w4 L9 o0 r( o move into pickaisle.induct3
& R9 T. h: [) g0 F0 Q, \9 V e) P while A_i<=30 do begin6 j$ f$ T5 F. R' z/ {# R( k. J) N
travel to pickaisle.con(A_i) u6 {, H+ @5 M2 {, n' N
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
5 s! m; z8 x- z& _# v. F* s$ u7 T else wait for 10 sec s2 b, A$ e e% y
if A_i=A_leave then send to die
) d0 W. _% S5 V/ o s( r, D else inc A_i by 1
" p5 C- r3 P. y8 Q end1 y" m0 ?: [" X# n3 ~. J; `5 |
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,其它按你的 ...
|