谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);9 Y# B2 m2 W4 R' F
begin model initialization function
& ]# c3 W$ Z9 l4 p7 F create 1 load of load type L_null to P_Creation29 a, n' m* y4 A0 N7 R8 L
create 1 load of load type L_null to P_Creation3
( }7 c' h! v. g# r* h; \ create 1 load of load type L_null to P_Creation4
+ {$ B$ N% u$ z8 h8 m return true
7 \! M; c/ C$ ]" R$ _end
5 d- R4 J0 _* e8 A1 Y/ N* d$ d, K) k8 |* v( i/ L
begin P_Creation2 arriving procedure o5 ` T+ X$ w4 o8 x7 M6 F3 @
while 1=1 do
, y8 u$ A0 z# t begin* D# m c" c9 A
wait for 1 sec
* Z& i9 Z" ~# w9 V create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* z9 |0 H: E$ S1 v
end
0 D5 }1 E. w: N+ B! V- [8 tend
1 p, [& F o. P+ ?- _( `. K% Y
, K, s0 e9 I# {& V) Rbegin P_Creation3 arriving procedure) O- h, n$ s I# {/ f2 v* Z4 y
while 1=1 do
/ | p% {* a, D& x( x' l! I begin
h, d8 A2 z% h! U wait for 1 sec
. `5 p' p2 s, C3 S create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)9 A1 Y! ~' S( Z( ?# Q+ N, V2 K
end4 T1 d) h, h* u& z. L
end
% t* F r, }# M% @: }$ Q3 E
, C1 }$ W" U4 z- S/ pbegin P_Creation4 arriving procedure
5 W/ _5 A/ G1 b- v1 k" Swhile 1=1 do4 H: O% x6 J8 b: D `" Y) S
begin
" M2 R4 L" o. J* t9 O! m wait for 1 sec
7 G$ v$ r( Y( K5 f! ^/ d$ d5 h create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). n& g% @/ @2 x/ d4 y
end U/ |, d' [) x8 d5 J! L/ q" r
end
6 Q4 a7 | ^ v' Y! U5 u
( j p* n9 A1 M但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |