|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
- v9 ^0 K: {: j8 J, f: D% s4 @ Q
我的问题是,在每个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中的数值,不知道会不会有什么不妥。$ _$ F, M+ l& q* N' n- ~
5 g( S: c) x! U* w; [4 `begin P_read arriving
# L: Y) W# p6 c+ i' @3 O8 q while 1=1 do begin
z& n& n& I1 V) V+ e3 q read A_tote from "data.txt" with delimiter "\n"- S X2 ^" y' B8 Z
read A_time from "data.txt" with delimiter "\n"
2 l! `( @& ^- X" A9 s0 ~ read A_leave from "data.txt" with delimiter "\n"
$ I0 F! ^" g$ d read A_picks from "data.txt" with delimiter "\n"
- O9 j" W b, E set load type to A_tote/ u2 Z! C! F1 [4 {3 _& G
if A_tote="tote 1" then set A_induct to 1
$ I* [% o. h& ^6 _2 I else if A_tote="tote 2" then set A_induct to 2
5 g6 [9 T. M. J R: Z4 } else set A_induct to 3
' c4 I7 b, {& } set A_i to 0
m: p1 u6 ?) l6 S( Q: x1 A clone 1 load to P_induction
* C' c5 S: Q1 L& N wait for A_time sec
+ D; k8 l. i% N end
" S( J- R |# l. R: I% h+ i, }8 I$ Oend) E% L! d2 Q( @4 k1 g
1 ^; e. f+ \3 n' w9 Fbegin P_induction arriving
6 S. W8 E Q" a6 l& Z+ m if A_induct=1 then clone 1 load to P_pick11 b1 l( e" m# `3 z3 ]
else if A_induct=2 then clone 1 load to P_pick2
1 L) I! l7 d! f& g3 C else clone 1 load to P_pick30 R3 f& c' e8 R: a3 r& q
end) j1 ~, r$ h3 Z B
6 z0 b# c; Y2 E2 c1 K* B0 r, c" Hbegin P_pick1 arriving
% P* R9 W4 i, o set A_i to 1
8 l7 i8 a) I. g move into Q_induct1/ h$ s2 ?: ~& R* l9 |9 }1 q
move into pickaisle.induct1$ B) B. T* q" N8 J2 p
while A_i<=30 do begin
% Q8 _& U, |7 h6 ] travel to pickaisle.con(A_i)/ T) ^4 |( T, h
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- _9 H# g1 ^0 R+ J8 S+ ^* C# D4 O! | else wait for 10 sec
: l0 f( q( f" H0 W ^7 |6 `# p if A_i=A_leave then send to die- ~; F, L$ |' Q
else inc A_i by 12 X9 u0 {6 E+ ~. {7 c. Z0 c
end3 f" u& _+ U; `) n( j
end
1 G! j6 @& h! j6 i" Z# H) y; E: n4 C
begin P_pick2 arriving
+ ]5 i9 t: t& \4 V set A_i to 11
, |0 b- N/ m$ A! \* V move into Q_induct29 h- {* x5 T" ?+ ?
move into pickaisle.induct2 W0 ]7 V9 y' b, W# \6 s0 M% j
while A_i<=30 do begin
/ H. ^) {( S! h U- s+ o travel to pickaisle.con(A_i)
5 `. h' ]7 j2 `# E2 i+ w { if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" t! ~* B1 x* p, w0 G0 i else wait for 10 sec
: g9 p. J) V& H" E/ \' [; i% g7 |3 r if A_i=A_leave then send to die6 D) C8 a) O3 W5 ^" V) m
else inc A_i by 1. @7 W9 R x. ]3 f' H
end
$ }! w8 ?5 z! i) _6 R! b8 l3 Pend
6 u" {. w% ~2 n: K+ @ k0 ^& Z
! E) i N! L s* O3 M: Jbegin P_pick3 arriving
( M6 { _+ H; P6 ~% d# j set A_i to 21) x7 |/ D! U9 [0 n: c* k, Y% `- Q
move into Q_induct3
R8 X% N) {( o3 ~ move into pickaisle.induct3
$ @' G4 x+ |) Z! T, E8 O3 u/ W0 M# f- M while A_i<=30 do begin
, K, b; [1 q K! X travel to pickaisle.con(A_i)8 v+ Z- g! f: ?6 n, _4 L
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 t8 K5 U) B+ j
else wait for 10 sec6 @/ q: D6 D+ S- j
if A_i=A_leave then send to die
1 z* A3 A/ ?$ Y2 j# Y1 F& \4 P" z else inc A_i by 1. ]5 k9 K6 j; z) f
end" `$ J# n! z8 V2 ?
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,其它按你的 ...
|