|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢6 H2 A6 o+ ?. ?" o1 |* t7 s
; U4 Z9 S: b) I2 ]. {/ Z$ \( 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中的数值,不知道会不会有什么不妥。
9 c. R4 t% z k$ P% ]
" B# Z4 C+ l1 x+ v" c( h/ }begin P_read arriving
8 v. O; M `2 I) |1 h3 D; T0 d while 1=1 do begin
' ?4 e! h! ~* |, H: Z& X7 M2 P read A_tote from "data.txt" with delimiter "\n"3 I, m3 V0 ~- Q9 j* x3 K A* O# M
read A_time from "data.txt" with delimiter "\n" ?4 b e& S6 x% q9 j3 ]( G* t! s, O$ u
read A_leave from "data.txt" with delimiter "\n"
: ~: v, e* N6 d1 x2 K read A_picks from "data.txt" with delimiter "\n"
7 n- o \0 J) T; M set load type to A_tote( F0 v5 m; |* A8 e/ H( N+ W) s# c- ?
if A_tote="tote 1" then set A_induct to 1
! K- ?) g9 u, q% R4 a7 M0 U6 `8 @ else if A_tote="tote 2" then set A_induct to 2$ U J# ?8 s. ~4 g6 F. b7 U2 s
else set A_induct to 3
! a! k! o2 \+ k9 g9 R set A_i to 0
6 d* M1 y% k" e) g/ g" r( x+ e3 B clone 1 load to P_induction$ ^$ b$ U9 ^9 M# s: _& f
wait for A_time sec
6 S, V" e) j% d z) u& E end7 f2 ~1 B% O; E, B1 k i
end w! l6 h: l- T7 a% D i$ N. `; C$ q" H
; R1 y7 k f( M3 e# o1 Z
begin P_induction arriving+ ^6 {$ o- S4 V4 C
if A_induct=1 then clone 1 load to P_pick1
) u- r$ }% M) C% y4 b9 [ else if A_induct=2 then clone 1 load to P_pick2" J/ E$ K- l9 q1 U8 S
else clone 1 load to P_pick3
2 \. P3 f5 F9 s/ Q$ \3 [end; l! |& X% @6 Z6 L' ~3 V9 o
4 u" ~, [/ i# ^# H
begin P_pick1 arriving* Z" L% L" y( o/ H! c, b
set A_i to 1: P- E% j ]2 _
move into Q_induct19 X$ T0 f0 f+ h1 P' }
move into pickaisle.induct1
, e- g: z1 q- h! F9 G while A_i<=30 do begin
! J- _( e9 N/ z1 ]8 k) Y travel to pickaisle.con(A_i) b5 b& P: {: Y: |. r
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
6 @, [0 T0 p8 R H& ^; T F+ v else wait for 10 sec
7 o: n/ w% ^. b if A_i=A_leave then send to die
' [* F: a3 I# O2 D2 F& P else inc A_i by 1
, [2 y8 E8 o+ q3 {2 R) b end
- ~2 o) k& n' vend
! R6 n8 h, S# j
3 C y9 @$ t, M4 r; B2 Sbegin P_pick2 arriving$ X) t. f5 s. _$ O5 t1 t
set A_i to 11
; {7 X& L4 t9 W: U- u' v1 b move into Q_induct2
: \$ ]! L9 L8 v+ m- {6 t move into pickaisle.induct20 ?: o6 N5 }: }$ A. A, S
while A_i<=30 do begin8 b1 w( f* B8 V( ]1 Z
travel to pickaisle.con(A_i)* Q! D# i# _; W) d& F9 s5 B
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 r' c! v; Z' |! |) b
else wait for 10 sec
& [* g' s& ~3 z$ F6 N! G if A_i=A_leave then send to die; G C7 s8 L" U1 z2 X1 w0 i
else inc A_i by 1
, E2 ?. M7 o4 E# {2 j; P# [6 F @ end
! C$ s8 j; [. v7 I8 @7 c+ M2 Oend: I! Q( d4 i3 `' A* z
/ j3 J: x$ @5 k# n$ j; |; xbegin P_pick3 arriving& [0 e; B9 V2 @3 M9 F" K" Q
set A_i to 21
3 }1 B$ j! d, c% n. z' q% d move into Q_induct3: x* | C: F) B0 R: |' C
move into pickaisle.induct3
) L6 n/ X; T4 M while A_i<=30 do begin
/ Z( E) {4 c) C/ x1 Y9 u0 f6 l travel to pickaisle.con(A_i), O( Z9 Z# r. {4 f" \
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec1 ?' e e* Q5 S7 B2 `5 {$ y
else wait for 10 sec
n# F3 p( Q p8 [0 h/ V" {5 O if A_i=A_leave then send to die
* i# q5 u) a! P- i" q4 Q2 j else inc A_i by 1
1 Z+ f) j g1 [8 _% c2 u end4 h% @$ M) D7 }7 B9 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,其它按你的 ...
|