|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
5 f% ^- {( o( d D3 g( F8 c( p% |3 U2 J( E* E% s6 L# \
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
* n! X2 p0 f: \2 M
+ J" m3 a0 r3 `( g- h; Gbegin P_read arriving
+ @% w+ X+ C8 _# m# D while 1=1 do begin
+ V" ]) V1 b& s! _ read A_tote from "data.txt" with delimiter "\n"
9 v! I/ {, y- O/ p @4 J1 | read A_time from "data.txt" with delimiter "\n"
' d2 y4 U" h6 h) ]$ \! x/ x2 [- V read A_leave from "data.txt" with delimiter "\n"
7 j2 A( w8 _$ q! x' B# q7 ] read A_picks from "data.txt" with delimiter "\n"* V1 _7 [6 O4 S8 G
set load type to A_tote+ g$ u j2 p" u2 m! K% |( x9 V
if A_tote="tote 1" then set A_induct to 1
9 Y# C4 a$ K* B F, I& H- x( F W else if A_tote="tote 2" then set A_induct to 2
% n" A2 Z/ z2 n1 X) [ else set A_induct to 3
6 V" f5 D$ q1 s$ [& S# D+ J set A_i to 08 B# r$ M( F- X* B
clone 1 load to P_induction" H! w8 G8 J9 V1 {
wait for A_time sec
" {+ i o$ A9 {1 X' X end, F! I1 F9 t2 E9 ^* u6 I
end
U% y6 X( F+ n, M' e
0 |0 q5 D; y$ \; Nbegin P_induction arriving
: F! K! c7 e+ J; J1 C+ | if A_induct=1 then clone 1 load to P_pick1
* h. M& M( I) ^0 C4 _2 ~- X else if A_induct=2 then clone 1 load to P_pick25 k, v: w5 K: Y$ y0 R0 y
else clone 1 load to P_pick3
' [9 v4 G5 f2 D1 t- ~- ~end: V8 r! ?4 u, d7 @2 g0 |
; q- a5 Q! ]( k+ ?( B- y; S
begin P_pick1 arriving9 t4 e) q; T1 i+ S" y
set A_i to 1 _! w0 f# J3 L
move into Q_induct18 c: T% A" I/ N) @
move into pickaisle.induct1
u# f# H% O$ y6 u( `/ E while A_i<=30 do begin
2 |0 _/ W% A% V$ S, T travel to pickaisle.con(A_i)
0 Q: ~; ?+ j: Y% x! {/ f& e if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec( k3 `- k' B3 z3 l
else wait for 10 sec
7 J$ i# N [% [+ Z1 g! u if A_i=A_leave then send to die
$ c" T) t9 ]* s! { k# S- } else inc A_i by 11 J3 y( f9 }7 i7 R1 [! ?
end9 p/ q) d/ N1 _" O9 c; `5 A
end( _8 o0 K9 v- y- I% G
& X+ E* _6 O4 i8 T' A' ~+ p% {
begin P_pick2 arriving
% e/ {* u, V& D( U/ r: _ set A_i to 11& ~6 O; S. i: `. p. l# d
move into Q_induct2
7 @9 q6 @" P S8 z/ D: H9 O move into pickaisle.induct2
" r# R# a9 t: J9 A' ~- h( r while A_i<=30 do begin
! O& J3 D9 D: r1 F travel to pickaisle.con(A_i)- R/ Z- O4 e8 s3 V
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ a( ]5 z8 N$ D else wait for 10 sec# B" p5 B+ {5 A! G
if A_i=A_leave then send to die% }, D' l# M: d5 C4 Q
else inc A_i by 1. S4 g8 T0 ]' k8 n% R+ a5 s
end% K* C# @+ ^8 M& G1 f5 k- N/ W
end
% i) k, d; y# q3 h4 s) e8 T$ f( X
begin P_pick3 arriving
% A b7 Q- V& a( P4 k; g0 i set A_i to 21# N( U& G- Q# S: e+ {
move into Q_induct37 b) \5 Z) b- c* F
move into pickaisle.induct35 e7 T1 |. H/ ^6 t+ ~4 s3 v0 W1 o
while A_i<=30 do begin4 {/ E. O! D2 h1 N6 G$ b
travel to pickaisle.con(A_i)
' D5 s: }" V8 M+ v: S$ K if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
}2 `/ _+ L, z0 W else wait for 10 sec- [ P$ ?1 w- d2 n& S3 S. F
if A_i=A_leave then send to die# t- X9 z7 X) ?/ t, ]* v
else inc A_i by 17 F) H! ~. o' }) x9 ~
end2 T- r0 L& d, E8 f; D! ]% r- X- S
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,其它按你的 ...
|