谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); 
4 o+ m& U' i, Qbegin model initialization function 
, r2 C7 L- G! Y  create 1 load of load type L_null  to P_Creation21 m) t7 E! ~2 X4 h9 n 
  create 1 load of load type L_null  to P_Creation3 
9 l( e3 e7 e1 p5 P) q  create 1 load of load type L_null  to P_Creation4 
9 T. y" ^; e: R, M8 X4 n  return true * w1 ~# p$ v1 d; e% \5 o 
end 
) b4 `# G. `6 A! A& P3 S; |! g( Q& Y; m  C. O 
begin P_Creation2 arriving procedure5 p, W7 ~3 l$ \+ s, i- i9 d/ B6 z 
while 1=1 do 
, }) A, K) ~# j# s2 v, a   begin 
$ e# H- c& o$ B- _  r+ U! k     wait for 1 sec! ?( v9 C5 A! b: ?% R/ i 
     create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)' P1 X$ w  \2 E4 j/ I2 I 
   end 
% k3 L/ k7 q. d' p) yend 
0 [0 {" C; S' M# V! V 
1 p0 `: C, f# d, @4 Wbegin P_Creation3 arriving procedure' V9 C6 q2 m( a* h$ A 
while 1=1 do2 t. i; i% y% v% @- J  r 
   begin 
8 b$ B6 x7 ?1 L     wait for 1 sec6 {- Z- I3 i3 N7 s 
     create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)7 V) }  {1 [7 F0 A5 S8 r! p8 Z 
   end9 S3 r7 V, t9 e, c8 ~$ Y0 Q 
end   & n% }) J. v; U! @7 G 
! Q! A6 o/ t' x 
begin P_Creation4 arriving procedure 
& e- i2 u4 c! A" x7 C4 qwhile 1=1 do) F/ S7 \% k0 p8 K6 F" v 
   begin' V5 B% M9 B8 I; q4 j) w 
     wait for 1 sec 
1 x* @, G; n3 ]$ U3 t     create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die) 
8 H/ S: Z/ b- M4 s& j6 f0 y$ F   end: s4 g, |" Z. S8 C 
end  G4 {; R: ]; @: v 
 
, n6 x% K4 v3 n! }8 Y7 _$ A6 q但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |