谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
8 \. T, I S6 v+ T' xbegin model initialization function
& q( z2 w i# K8 B% j5 u; F" G+ J create 1 load of load type L_null to P_Creation2$ H$ b- x* l9 b* \2 p% Z( a9 p
create 1 load of load type L_null to P_Creation3
6 N6 c* I/ x+ Q( }/ J! V create 1 load of load type L_null to P_Creation4! Z& P8 g& v8 e
return true 4 ~6 I% U0 n0 H7 `
end# u. B) r5 i& S S6 _
; ~/ c2 w# y, N5 }' B
begin P_Creation2 arriving procedure# m6 h& O6 W0 K& }8 ]+ E, ~" C
while 1=1 do9 c4 j8 a/ W8 }; D' \
begin
/ p- G2 Q! M/ G# ?. P" F wait for 1 sec
! q* c. c2 V2 f create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 l2 \' J: ?" Y7 U( U) F6 H) d
end" c3 F* g6 R5 C% w" z
end. Y4 H- g* r- l' h. ]/ s
* _2 @! i- M0 l9 E% i: C$ Wbegin P_Creation3 arriving procedure
6 V* b/ O) _' n/ `1 S3 Q8 ^. z3 zwhile 1=1 do! a) D1 | n9 q& t
begin
3 y5 D" }& X; B! Y8 K wait for 1 sec
! V: b1 F0 w/ R, P2 P create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) S: W; `' o8 e- t- D
end
- N5 `) f* c' Nend
2 f9 ^) E& W, z
2 t. `+ ~) l$ Vbegin P_Creation4 arriving procedure
* e* [. \& k" s* W/ jwhile 1=1 do
) C" R2 X3 _( M begin
. q! C+ D8 D7 } wait for 1 sec. k) g8 a. I+ `$ K. ]2 ~
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ T6 W3 U7 f' a* R4 `2 g+ l8 f
end$ x. A' A: I1 k
end
+ m/ `- z9 Q2 E1 T
* C# A. _6 S) X% X$ g6 u. O但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |