|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢: u/ c3 v: ?, F9 H' c# a1 A
6 h3 A! h) o' b5 Z% l7 ?我的问题是,在每个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中的数值,不知道会不会有什么不妥。
: y" S( [+ U; E6 L! o; C7 g
0 [, H4 I! e' l: F0 Obegin P_read arriving
% y% m" h( c* b while 1=1 do begin
: `! Q" ~' N, N6 v; W9 V read A_tote from "data.txt" with delimiter "\n"
# u: v3 w) J; l) E8 g9 O B read A_time from "data.txt" with delimiter "\n", @" t7 V9 [/ L! `+ b4 Q R
read A_leave from "data.txt" with delimiter "\n"4 [3 E: J9 }4 o, z" ?7 t
read A_picks from "data.txt" with delimiter "\n"% j! f. @) B) f( S# K3 a6 @- O- M G
set load type to A_tote
. q9 o, S3 c+ f4 |1 w. O7 U! c if A_tote="tote 1" then set A_induct to 1
7 S: z( _2 e; c; V8 m) H( I4 y else if A_tote="tote 2" then set A_induct to 2
3 Y9 Z8 q: N- K, t9 p$ E0 j else set A_induct to 3
0 s, @; S5 d1 P( h0 F set A_i to 06 [) e3 V1 R# L7 P, Z$ ?+ T9 p+ z7 D+ E' Z
clone 1 load to P_induction* j; d* U% S3 M; Y
wait for A_time sec5 I3 B& ~ R: z! B5 b3 F, g
end
$ G+ t' _) L9 A- M" t& W: O9 Send, b% f2 }* X* V- c* L8 `
9 ~# v; `. K1 s4 X( @# `* H/ n% a
begin P_induction arriving
9 s' d. |) K% ^7 X* u if A_induct=1 then clone 1 load to P_pick1
7 c( Z( [: M( b$ t else if A_induct=2 then clone 1 load to P_pick2- |* T3 T/ v* Y. z3 v9 e, B7 O4 l
else clone 1 load to P_pick3
! Q& c0 b1 m4 }- Gend
) g( A% M" c, M U& G; g! V7 H
; ^* ]( n1 F: F$ P& j$ |- I& pbegin P_pick1 arriving% q: G4 l, |8 V |7 I) p6 X
set A_i to 1( `. u2 o8 c; G3 F
move into Q_induct1
6 M0 W* V1 r9 k move into pickaisle.induct1' t/ Z0 @" C! A5 c
while A_i<=30 do begin; Q3 j' E" g- z4 Z7 Z
travel to pickaisle.con(A_i)0 F. l6 ^6 m# H7 z* U
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 z. a! Z1 {8 p. E: C
else wait for 10 sec
5 Q( w; J3 w% U8 I if A_i=A_leave then send to die
$ B x! S& H4 k( @; B3 I else inc A_i by 1
0 x! o f( A8 ]2 H3 | end* b k2 J, ?6 p- @
end
# I7 d' U6 E8 J! j8 Q( x% B2 [
; y6 Q' s7 G) Y* N( H( ^# ~begin P_pick2 arriving
! {- v: Q! y6 E4 `( B S set A_i to 11
+ @( X; Z( S o$ L( w: R H move into Q_induct2 s3 a' Z7 A# H5 I# c, p" L3 a0 I
move into pickaisle.induct2/ X# p6 S1 V6 k4 C ^
while A_i<=30 do begin, S$ I8 ~- a) f2 Y1 q+ ?
travel to pickaisle.con(A_i)+ I4 X+ F3 ]6 c# w+ \
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* U6 V- _" b* U9 E/ N7 h/ r8 w else wait for 10 sec
9 F( B U, H) x9 ^ if A_i=A_leave then send to die3 p! G- x& H4 m3 U6 ^9 F f: v6 }
else inc A_i by 1
2 q! p7 g- {3 g* A7 b end# B9 A7 [9 j6 H. p$ M- q
end" ~) I6 ]% S9 w- H- z. y
, q3 g; S' X6 g5 ^6 ^$ Dbegin P_pick3 arriving
4 o6 u/ H" B3 \ K& O set A_i to 21, E3 e$ \5 `/ A/ V3 O3 ~/ V
move into Q_induct3
9 T7 W9 q& L, d+ J( C move into pickaisle.induct33 P9 ^* k1 v7 c; J# o
while A_i<=30 do begin! ^# ^ [- F6 Q, [
travel to pickaisle.con(A_i)' I: E: v" H& O
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ t% |+ a4 r9 f else wait for 10 sec. G1 x: k) U/ w* d8 e
if A_i=A_leave then send to die
2 ~' X; C2 a7 S4 T" i else inc A_i by 1
% G6 W; c/ v" b end8 z1 X- Q4 x# b8 ~$ a
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,其它按你的 ...
|