谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 H9 U$ X, J* x8 ]4 [begin model initialization function' u) v7 l! r( ]2 C' S7 z
create 1 load of load type L_null to P_Creation2
?& c1 _: T: n' V8 O2 J create 1 load of load type L_null to P_Creation36 h: o+ V& s ]& P
create 1 load of load type L_null to P_Creation4
, y) t7 |9 P! [ return true
) g+ |. Q- h+ L+ o) fend7 x* a0 N. l9 a7 M4 @# Q* M
& t+ ]0 z; ?, b2 U2 h4 G: ]' Wbegin P_Creation2 arriving procedure
4 _4 F! D7 w% s8 D% qwhile 1=1 do. i& R4 j, x/ E. p' E
begin
+ u# o7 X) F1 x) z( z/ j# K, k wait for 1 sec
. e0 |" P# K$ F: g# Z# k3 A create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
; T% n( O1 S0 K3 z1 N/ B end7 b! {/ W9 x' D+ M& a
end g b0 b8 ~* ^1 ]
. o u: Z; A7 b, v6 O! Ebegin P_Creation3 arriving procedure" Y3 `1 E6 T0 n1 ^0 G |
while 1=1 do B/ b" ^% O/ k- Q/ j4 l; e8 r
begin7 U& r' {7 z* P
wait for 1 sec
) _" L- F" o% Y1 R; v- I% O create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die): h6 n2 _) ~5 w
end8 e: p/ o2 d% _' i8 c) s4 F* L
end
3 ?8 x2 q, g+ J+ d, ?: J4 w
2 z4 v4 h' E9 |9 Cbegin P_Creation4 arriving procedure0 r. C: ^+ v e& {, x, A
while 1=1 do
/ N" K" u7 a& c: U- ^4 f8 @6 H begin4 ?4 U; c: J# _
wait for 1 sec
; i. B. q. `( _ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( [& ~7 V' o2 a end$ }( A2 E9 T9 {( S# H1 ?
end$ L o; D7 Y* a* D
6 x' @. f1 M# L% h/ N8 c
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |