谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; X2 C9 ?& R1 m/ I4 W6 y3 x; [begin model initialization function
) w, N! _% x* K' u create 1 load of load type L_null to P_Creation2+ a. D# m8 I9 |7 v0 j6 G* U
create 1 load of load type L_null to P_Creation39 |$ N4 a& n( g: h! ^+ D
create 1 load of load type L_null to P_Creation49 Q1 g$ p, [0 e' A5 M9 |: `0 i2 B
return true ) V, P( C2 w2 x- O. W
end, g$ \1 r+ Y- O9 ~
- M# J0 ]+ d1 a/ Q
begin P_Creation2 arriving procedure
4 M. S$ G: R5 Owhile 1=1 do
z, t8 i# Y& [, W& j0 A begin+ u0 u8 P$ U9 F4 y9 r
wait for 1 sec1 y) }" W# G B" I# E2 u" T
create 1 load of load type L_C2 to oneof(0.2_In2,0.8:die), q6 o8 l! A( K) [5 t
end7 {) L! ?/ m0 [) h0 A# |
end
2 a" `( V3 p' }- Y3 C" j6 |' q+ a
- Q) W: O* Z# E& o+ lbegin P_Creation3 arriving procedure
6 K! M1 S: T0 G- R8 P; q6 O' ~" V7 y9 swhile 1=1 do
1 M* T: A9 s# @+ T2 l0 d6 W$ R begin+ G3 B/ |2 U% @0 d5 L
wait for 1 sec
$ c' m, {2 ~4 o) g- g create 1 load of load type L_C3 to oneof(0.2_In3,0.8:die)
4 y- X* c: {# s& ?; p' {6 v' E end2 I) m# h3 w' q5 }) r! o
end
* W* R- \, S2 Y: ]
& i& u, i. G% `, F) Jbegin P_Creation4 arriving procedure% M0 @0 s& Z9 U' B
while 1=1 do1 p. E/ k# P8 C s4 k/ q; R6 D" u6 S
begin
0 a& X4 g; s. e: o; H6 c3 W wait for 1 sec
7 I& D6 r9 {: P create 1 load of load type L_C4 to oneof(0.2_In4,0.8:die). H' X, [! f$ E- Q& r
end
& L( J6 s% ]. a: ^. N1 gend4 P( r: d( h7 E: B& j9 R6 S3 E
, T/ I3 J. Z! l但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |