谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);) w# O/ o6 f" f4 U! E; i
begin model initialization function
, P/ Y A1 U3 R. h% O+ W create 1 load of load type L_null to P_Creation25 m' |* V/ p' w2 t
create 1 load of load type L_null to P_Creation3# M( d: |! ?2 m% O# |
create 1 load of load type L_null to P_Creation4. R: A) |# f9 q* H# U& J
return true / @: r( U/ o) `1 a0 q
end
D1 L8 p1 U# `/ ?2 n! g8 F- i- H( L- {- r& d; e
begin P_Creation2 arriving procedure
4 Q% b" i9 R1 I9 X" b# @while 1=1 do
& f$ F0 K+ F) g! C, B0 n- @4 K begin' G7 E7 q# w; g/ r7 M# M- T
wait for 1 sec7 K ~5 N3 q: ~) H8 l- O& W$ j% d" Q. ]+ E8 U
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
; ^9 A" o- K! j* E p end {; i* i7 `. ?$ S" T
end
0 Z/ q* R, s' O7 A( \0 h7 D1 |5 }0 ~( Y; d& G
begin P_Creation3 arriving procedure
4 A: G7 {% q% a7 Qwhile 1=1 do' C* k, ^9 Q* L/ w3 H
begin
# s; n7 D6 T9 n' E wait for 1 sec# B$ P1 w' F5 j4 {9 I
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)/ e4 C1 ]1 G; z. Y
end) Z& S U2 k `$ a
end 5 [% K$ p* d) a6 K* c& V5 y+ `
& W% S' ~7 o# q+ e6 v$ g
begin P_Creation4 arriving procedure, E- o3 z0 @+ ^
while 1=1 do
5 ^6 z6 Y7 A+ F/ U/ M( { begin b( P, i2 `/ I
wait for 1 sec
% p+ |4 [) ^( w P, k% A create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
% V4 g: y! C9 s+ X end
* ?! K4 q" A5 ?6 v/ F7 Aend
; X% r3 W8 F& {2 h$ y0 e. }5 C' U, G/ i6 D) B- ^6 u- M
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |