谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
" Q: t" D* b+ B4 o/ zbegin model initialization function
% m7 @' P4 a2 ~1 Y9 c create 1 load of load type L_null to P_Creation2
3 w# z* Q2 g1 D* j create 1 load of load type L_null to P_Creation3+ e$ A; ^1 Q' \/ o
create 1 load of load type L_null to P_Creation4
; J9 N$ I3 d! I+ b return true
+ v3 x, l5 @8 c, q+ pend
" [; x w) q5 V: S4 J
4 s% E' Y0 C4 c4 l8 ibegin P_Creation2 arriving procedure
" v6 v8 S! P3 m8 @+ H! S! U: Rwhile 1=1 do
9 ^7 c: Y1 }- s7 K begin& \! h3 a. D( O% q5 } |
wait for 1 sec+ ]& |" V3 o- O/ @" g
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 J% q1 ?1 A* X9 s% m% P
end
7 M6 M) t; L" l. Aend, K4 ~+ w1 S' U8 q9 K9 {7 U. q
/ w7 v h- d. d! Z
begin P_Creation3 arriving procedure: ^+ K2 c# [+ H( b6 H9 B- ]
while 1=1 do
! l8 V# }. R7 k+ U% }& R3 V8 J4 V begin
. V' C2 Q& C8 C) W wait for 1 sec4 U$ x8 A9 a$ |3 U5 J
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* t- | @7 s0 \6 s0 G end
3 k" l1 Z' C& Rend ) Z7 y& Z* O2 C# o
+ R- `$ M+ x% w5 H B6 W8 o( R2 M; b5 ^
begin P_Creation4 arriving procedure0 n, m* i! P, P1 z) e
while 1=1 do) k. O; p. k% `& ?
begin, l! J5 l/ i1 B
wait for 1 sec
( M' s- Q7 K7 @; w1 [+ F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ f, y# C/ J5 K0 Y) H, g( i6 D
end
$ w! E1 c7 M4 a7 S0 H8 L: P" Vend
) U, O' R) g, q6 b" D' {% \6 U7 h+ a9 B% z# h' M& G. Q
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |