谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. R4 i @3 u, @, M0 a9 T% L
begin model initialization function" \' K* s4 t* M1 [& K9 E
create 1 load of load type L_null to P_Creation2
3 W# N# F' [: f1 \1 s4 F: Y; o create 1 load of load type L_null to P_Creation3
8 |8 e+ C$ l6 F: L: c create 1 load of load type L_null to P_Creation43 o" v9 L2 c# L! F) W
return true ) H4 R- B# j5 _* }
end
) k, k+ K) s: b
2 _: t$ d5 Q& L/ V5 Obegin P_Creation2 arriving procedure
0 P) j# z, j6 g4 l7 U) M0 lwhile 1=1 do$ F8 w5 J. a7 I
begin* r7 V4 t) i5 [, G! I
wait for 1 sec9 J/ P+ G% {! @5 F. P
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- _6 d- r- f6 I8 s5 m end. {* d; [, y3 H! d
end9 u/ x) h( U4 F7 t. b' h+ x
0 d/ w9 A. B$ f+ l5 G6 `begin P_Creation3 arriving procedure
, M1 d5 w0 ^% I- o( g7 \' @while 1=1 do
4 s! |4 S( R9 g+ k5 r& a; z begin
1 c$ `: V/ R' V- z" n, k$ z' W wait for 1 sec U5 n# ^% P B1 l+ I7 B
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: F$ t; Z: i* }, ^ end2 C9 X# G+ S J
end
+ i; d* i# T8 z9 N
2 Z2 i5 H2 k% k: P" e! Z2 W0 Bbegin P_Creation4 arriving procedure
% V! z: O: x( D* nwhile 1=1 do5 T4 ]# }, N1 R$ P
begin
) x+ \7 q+ b9 c wait for 1 sec% u9 K" u; d. l; m8 e
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). g, g7 Q# O5 T
end5 M, v- u+ q* o% w
end* U* b( y9 J2 n
9 X+ X% d- N$ E5 s% u
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |