谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 \$ r& A% G, Y+ |& U6 X5 S
begin model initialization function
* X- K; V1 S0 {# B5 C$ x create 1 load of load type L_null to P_Creation2
0 C: c( ~, `; U1 Y3 _1 {0 ]& B# h create 1 load of load type L_null to P_Creation3
4 ^) N% {0 t9 W7 [8 K create 1 load of load type L_null to P_Creation4
7 @4 ?' ?3 z5 H r, k' _ return true
" S* z1 b, w! n: {end2 A! D$ ]& M7 K- Y
3 b" `1 M/ o+ y% z& K9 o
begin P_Creation2 arriving procedure3 Y% N0 W! r7 C
while 1=1 do
% a4 {$ ?9 |5 S- C1 y7 T( S begin
6 I2 {0 t! L7 n7 P9 P6 u, a wait for 1 sec
+ [* U4 [. I3 P( A8 c( v1 K/ e create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# A; |, w% ~% [# A/ g! d, I
end
0 p5 h1 W4 L q* c# c* Tend8 j) `0 a' n/ V, q
: C% B' ^+ d" d: [1 z8 n0 S4 [begin P_Creation3 arriving procedure8 V; Z1 b% M* \7 g
while 1=1 do4 K, N1 e( W2 u4 n5 `8 f
begin
9 \4 O) X; L2 F! R7 Q; n wait for 1 sec
& f) h, n9 b8 O, d create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); q5 x4 x' Z' ?% J% y7 b3 K' h7 B
end
1 [- I8 K4 L; M- x. `3 [0 V2 ?end : q( d- |2 Z$ n
# A, d5 m( `, Q8 Z; bbegin P_Creation4 arriving procedure0 [- P2 p% o4 `9 H
while 1=1 do
! J) p1 g: o U- b. u begin5 ]: ?( y n: `5 o/ N
wait for 1 sec* I1 q/ q, L: C: f
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
0 V/ R, e- I/ F& w9 V7 ~9 ^1 i end: P! C$ J. G9 g
end1 F) k4 b0 ?- W
% s% H% {" R" A$ h4 `% s, I但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |