谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( |# k# P9 @# j, H6 d7 X; i
begin model initialization function
& V4 Y6 F4 d" j9 k/ X* _1 d: J create 1 load of load type L_null to P_Creation2; p7 O; }0 \' K0 P" J4 |# P! j; D
create 1 load of load type L_null to P_Creation3! o k2 E) q; K$ G7 M9 G7 |
create 1 load of load type L_null to P_Creation4
( U) M- I& W$ w$ V& _ return true / y2 A7 s) B& u P% [4 ?
end! J: J4 g* d5 C# i" b: D2 G
0 r) Y- v+ I8 Kbegin P_Creation2 arriving procedure: l1 u \- D$ d' [; x4 {
while 1=1 do
Y' @/ t& W. Y* M begin
2 g$ S) A, N& t( u wait for 1 sec5 E* n& o' @ h. }! l+ g, R
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
: e: q. X+ K- g! o, u6 g end( c( Z8 h1 u! |% }: }' x8 [9 J+ R3 A
end2 @& `. T: ~' O1 K2 a
7 z5 Z1 g0 X9 D9 ]# gbegin P_Creation3 arriving procedure
r& W, B8 @' O1 n" M0 [. zwhile 1=1 do, n8 y& K- F0 o. V( h; W/ `
begin- M1 C, }& K( r' ~5 u7 W+ D) w
wait for 1 sec6 N$ {% P$ y% n8 ]- \7 l. A' V
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: z# `* t5 j8 V# y end
0 F) x M. n- F5 C P& r' oend # g% |2 @9 j* T
" O# i0 e9 { j+ i- u6 \begin P_Creation4 arriving procedure4 ]; Y+ ~8 w% S; `& U
while 1=1 do
j! y" ?. `) V6 Z1 W begin% V4 T5 Q* B D, ~5 H0 I, J1 Z
wait for 1 sec
0 v' ^& F- t+ z; f, c& \8 h create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* o* S, g1 I5 i7 z0 o w$ x: H end
8 `/ L% a* Z0 Xend
, d; [7 r$ p# w k* |, J
, @' y* `/ f' m, i) D8 X( X. ?但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |