谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 `9 d3 z+ U5 ^/ V0 l Y5 \2 rbegin model initialization function
1 F# O% y" U7 B/ c' f; Z create 1 load of load type L_null to P_Creation2
6 x2 ]6 X6 h! ?# x, s create 1 load of load type L_null to P_Creation38 l, L; K0 K) B; l
create 1 load of load type L_null to P_Creation4
' D, F7 | `0 R* B7 ` return true v! @2 }( n9 C4 O. ?; Z' \
end9 @: C- h$ v% w: @4 c& @- }" ], f
" R# r& T+ v+ m8 y' ~+ I
begin P_Creation2 arriving procedure; f. n: p2 u7 C3 Y
while 1=1 do
8 q/ V& s# X% ~; @6 ?' n begin; |7 z7 [' r6 h+ [% o, J
wait for 1 sec
$ \% D, y0 W" l$ ?+ F- e, m create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
! H+ V* V; I4 V! n9 y end5 X7 q* a4 d- y$ p
end& |4 E3 r( V3 A1 |* L
0 `4 K- J& Q. }& _ s: p& jbegin P_Creation3 arriving procedure
) L# I+ {8 g3 e& v* X4 \7 E. qwhile 1=1 do
1 u2 b$ x3 H8 } begin K0 J1 B4 J8 \7 B/ j
wait for 1 sec: c& K5 `* `. t9 k3 u, ^
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
0 f: \7 z- h) K0 Q; X; a end
/ F: A1 ? n, I# O$ w! L, Mend I n4 m4 C9 c) m$ Y
! {2 T) S6 P6 d# ?begin P_Creation4 arriving procedure
8 q% c% [$ x) k j; @while 1=1 do1 `) m* h0 U" d8 X9 l9 F5 S) r+ i; G) O
begin
7 v- N P) j3 m7 C$ g4 e7 A* l1 x wait for 1 sec" m$ T0 S' e) Y! B' E
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 q$ `) @/ _; ~ end/ @$ U! A/ C4 g9 e
end
& s- ^0 Z' M+ _; W- e
) O) _& `% c$ y9 J) s4 ^但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |