谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
9 t& U$ k* ?+ S3 z6 u9 r. [begin model initialization function
n4 w M/ A( U$ b) d create 1 load of load type L_null to P_Creation27 T9 U- w4 Y. T% F4 A+ m# b, s0 T) {
create 1 load of load type L_null to P_Creation3, n/ Y5 U5 X) ]# c8 i$ a i
create 1 load of load type L_null to P_Creation47 d, L E$ G2 H2 D
return true 4 {, e; E" r8 Y" T" t" x" C
end: A9 w0 u+ k1 h! ~9 J Z
; T- A4 b/ G, s" j3 J
begin P_Creation2 arriving procedure
2 D6 {" Q, |9 c. {while 1=1 do5 D" S7 p* R% V( }; @* m
begin
9 ~0 @# t5 W% F5 }& I wait for 1 sec
7 @) R) [* l+ C8 U create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
9 O" `3 |1 V, X% k' e, s) f( ` end0 P/ j/ w, r. p M! B6 f) U' [( @4 R/ B3 A
end
( K5 A+ l5 Y4 }6 w+ d
" o# m p- W0 {, H9 Kbegin P_Creation3 arriving procedure2 e- D: B' Y, n4 O' [7 r" L
while 1=1 do
6 `0 ?& d9 L' J& l' n% ~ begin
9 o+ w) ]) [9 n; b1 l$ O( k wait for 1 sec# r+ B1 R3 \3 _+ A/ o1 h
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: C6 Z* g! s' S( O- e& P C end
, e/ N, z- L. [7 U: ]end
0 f/ y$ U9 U& @7 f
% i- h7 E: T! o; F$ |) y5 Jbegin P_Creation4 arriving procedure
q \! d' m, ^' J6 [while 1=1 do/ M) Y7 M5 t& `9 u6 j
begin6 B5 D! q0 `9 k# E# y
wait for 1 sec
& t7 s2 w- v: e% O: a c Q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)6 f; o3 X8 O. `
end
2 |, w* ~1 j) J, C7 Y) A) c+ uend
5 ]. f# m' h+ C' Y4 G0 ~8 o" c% G, ?5 I8 ] }: y- \& U4 z. r$ I+ N4 t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |