谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 f) R+ U5 z# \9 Z
begin model initialization function1 r1 R D( @+ U t1 P! [
create 1 load of load type L_null to P_Creation2, K0 Y; l% n2 e- K1 Z
create 1 load of load type L_null to P_Creation3
' C, Y" y0 Q" B5 I' i2 b u create 1 load of load type L_null to P_Creation4
/ ^3 P: l- }, t return true
8 I1 Q! K- G S; I* ^end
: u' n$ {5 t; D1 [
5 R% Y1 A2 x0 M4 G2 y! R4 M5 Ybegin P_Creation2 arriving procedure
; h+ g- i% W; d( O" ~while 1=1 do# U) |$ W% ]2 b [1 Y( h: `* x
begin
' ~" d/ Q* k# p. O8 x5 e$ O wait for 1 sec3 F/ V" V- V+ {" u; P
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)6 ~1 g$ h# i. y# f: ~/ U
end& _! f# t, a6 P, ^1 ^; o% m
end
9 N1 ]7 D2 m: y8 r1 Z3 U8 l, p+ R# r2 I
begin P_Creation3 arriving procedure, m# P+ w0 ?. q4 c+ N
while 1=1 do% e, G; w( P! E' h
begin: d& N) u! |% n* R% [, X* o
wait for 1 sec) v) @# a; x. l/ ~) U
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)1 o6 G* k- Y) e: e9 W/ F
end9 E# E2 k: u- J
end $ [" j' t8 }$ g
" s) c1 S2 x2 N' `5 L
begin P_Creation4 arriving procedure* y) |2 m R1 z& D4 a6 |
while 1=1 do2 s1 T) ^" A7 ~
begin: a- r9 |6 A/ y6 i
wait for 1 sec5 `" v$ y# A5 K9 y5 B& R
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)0 G) o9 U7 C8 K3 M, m
end
7 G" e. T% c9 A/ p$ ?* `/ zend5 ^9 P1 o: X: G5 w: B
; w* I5 t! R( y9 L k7 c* C: G- m
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |