谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 O4 w3 [. |. a" l
begin model initialization function( _0 T ^& Z5 \
create 1 load of load type L_null to P_Creation2: Q% ?3 ~, a& p" L
create 1 load of load type L_null to P_Creation3
- X+ A& R. U8 r# B- x create 1 load of load type L_null to P_Creation4; L; X B. X6 E% ^9 s) C
return true
p4 C* s3 u" R% q$ kend+ L9 q/ M2 B6 `; f0 u8 L$ ~1 D
$ K: a+ x- s+ Ubegin P_Creation2 arriving procedure/ H5 ]- ]+ L! R4 x! g: C
while 1=1 do. i6 o+ q! j( f+ A, K* r
begin
( H5 v/ n- Z* G* G, i7 I0 B# W! N wait for 1 sec
5 C2 ^" j7 t1 C1 Q; @: R) H( m create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, u8 D% q' ~% l end; H# M/ A5 j( C) l; g- D3 m( A, d
end" w- @( Y3 j. j2 G f' Z
& n+ }7 I. p, rbegin P_Creation3 arriving procedure
; T5 x, v d. L! s2 v. O Dwhile 1=1 do
G. o2 v0 Y) [& y% h) K begin# o) L M5 W9 `5 J, b8 Z
wait for 1 sec3 D& _! J3 _; l, J+ U* e% L$ q9 L: ]
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" ^, b/ K4 d1 i; D: \" { end' K) H3 j/ R' D/ [3 u
end
/ I. o0 q! A9 t1 G+ B
+ G% ~# `8 W0 p# Abegin P_Creation4 arriving procedure$ u g- M5 K( U9 X9 C
while 1=1 do
7 i/ u, E8 Z0 `# l$ \0 x begin9 H, L; N! K3 ^: F
wait for 1 sec0 u# o4 q6 N7 p4 a; o/ r# K
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 H, U$ p. [- j4 A& I0 t2 i end
% d1 b; d7 u* M6 ?: ]8 d1 _, Rend
1 C+ Z* g7 y$ o4 T( n/ f8 c6 _' h, O4 K2 [/ w E
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |