谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 @+ S& B$ U" Q) A0 F; p7 ibegin model initialization function
! `$ {1 [7 O4 _+ L0 ^ create 1 load of load type L_null to P_Creation2
, k; i- g6 g% g$ w, n d7 U' t" _. U create 1 load of load type L_null to P_Creation3
+ d; s8 p& K8 C) G create 1 load of load type L_null to P_Creation4% R U8 O6 w, l9 m) W$ b% A* n
return true
. A+ a! x7 z; qend
" W8 M+ ~; c% F2 U7 {/ M2 H
1 s) P# W5 Z7 P3 h7 Kbegin P_Creation2 arriving procedure
) z, g2 F! N: `; _% E [! Awhile 1=1 do
# y2 `" \7 V$ N& b* I/ ?/ A, R# @ begin
) C& |- @6 z, C1 Y9 u2 @( i. c wait for 1 sec
% S, o$ L: e4 q create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ s! F+ R! a: h( s% n0 S end% e5 q/ t7 K$ V- Y! T
end
8 S3 q6 {6 h( Y* ^( j( x' `1 m, D3 U& J/ `: b
begin P_Creation3 arriving procedure
( v. ~. }9 z1 Q" Q# V. s, Qwhile 1=1 do3 h1 w' h8 a# ~
begin
2 X* q T1 K A# l% Y+ O. | wait for 1 sec
" u, ]/ x/ X+ Q* e4 D0 } create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
3 m* K0 V% _, H, | s$ P7 U9 _6 v! L end! q/ [# o; d3 [2 l5 x, i
end
3 M) D4 ] Y) q' g0 H# }! {9 ?/ Z3 }/ L$ a3 B) U
begin P_Creation4 arriving procedure
$ C5 T- @4 y0 E5 x* fwhile 1=1 do
) | `8 O& o) R begin
" W+ v8 N- V' U1 ~( q% r- s0 i$ J wait for 1 sec' j; D" \2 f8 F/ T! {5 n. F* k+ f4 ~
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)' M" r, g' b2 v6 h t1 M
end; p3 V4 u3 ^+ M+ ~, B' \7 p
end# N' z) @) R8 A; R" R& X; J
! k( N6 \* ]% N/ s
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |