谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
' M ]0 w' [% v0 [begin model initialization function
7 e: M+ O P% E7 w+ m x7 ^ create 1 load of load type L_null to P_Creation2
( \- @. Z. H! i7 p create 1 load of load type L_null to P_Creation3
$ W( \4 j2 ]% O: Z0 p create 1 load of load type L_null to P_Creation4
* `7 B% z. P9 ?' A9 D# g return true
Z* O! [; S/ t( Xend
4 E& B& Y& G- j0 J1 b+ t8 L7 g
3 k1 R, e* g, T6 X# cbegin P_Creation2 arriving procedure
+ e9 q' k$ T) g1 iwhile 1=1 do
% r6 U! Q6 D) j" k$ i" P v# p$ ` begin. u# C1 u8 ]" J6 u3 O: w. i
wait for 1 sec
) Q$ m% c( J) p" _7 a create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
" ]0 m0 s3 `5 z) Q- L end. ^2 S3 A& f. j) J9 G. q
end6 Y1 n) H' U& t/ H s! K5 `
6 x; X: {( ?7 ?& e
begin P_Creation3 arriving procedure/ r5 E' b ?3 S+ R; Z
while 1=1 do
& K, P$ P# ]3 G0 e begin
# P8 F- C8 u" w5 v8 S6 x+ ~7 ] wait for 1 sec
, ^- l% G' M1 }2 X! L create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
$ I S7 _/ Z, I& G1 v- U end6 |& j. A0 k& O/ V) K& Y
end
7 b4 b1 \3 |% O8 D6 H# h8 f5 l7 F9 r q ~0 U6 C" ~) r! \8 r& X+ [
begin P_Creation4 arriving procedure8 G1 l3 p, g$ _; Q7 F
while 1=1 do% b" C; }. m9 ]% \1 t
begin
1 z. u5 S; V: k2 m/ r. A8 D. z! O wait for 1 sec l& n: I. ^3 S% G0 c% Q
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" `4 p d/ O# {* V
end
: ~, y; n8 F0 q% F! Nend, X( V: _- k V0 G8 M4 M
; J6 v5 X7 S' S0 B
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |