谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. x$ |8 W# }$ ]4 W0 k7 N' T/ hbegin model initialization function
* R6 T2 O4 ~; P* j, h0 M4 e create 1 load of load type L_null to P_Creation2' b$ V% e1 y/ S9 A* C1 P( P
create 1 load of load type L_null to P_Creation3
, i7 m9 e* R* ^# {4 ^+ s create 1 load of load type L_null to P_Creation4
- k' Y: F1 q) s& c- {3 r5 w; g return true
1 ]- F: `0 V6 f0 R* E- kend
/ h8 H4 I5 P+ E- C) G, h. }* l* R( l1 j6 |* P' A
begin P_Creation2 arriving procedure
K9 v3 ]/ ^$ X A! ^" J7 J: Vwhile 1=1 do/ i+ R1 ], k, ^$ y, z9 o
begin( Z+ z' \) v: @/ k- j" p
wait for 1 sec! O* q. t; Q7 x+ J
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)) b- K I% q7 }0 d+ Y
end4 G; ]* g( {, w
end
% C, v# s4 x! A; y4 N7 b* k8 y) [" r7 V5 P
begin P_Creation3 arriving procedure2 x, j4 N- @5 |! ]0 O
while 1=1 do
" ^: p$ r# v7 h7 e4 ?% f begin) u6 C' u) p& L
wait for 1 sec3 Z9 G+ S% N2 l2 @
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
. u5 }7 x9 a: s: ~0 r5 T- c% l& L end* e( X% m" W7 q/ g8 z. X
end 7 x' h; |9 w; |* b/ B: T8 g3 h- r
. V* |! q4 D! Fbegin P_Creation4 arriving procedure
$ R" P, g7 \( m9 i+ X+ Pwhile 1=1 do+ H( |( K! r: z. d- w& A2 [* E4 R
begin
4 r" y2 Z( H% W" O F# b/ s wait for 1 sec
( Z& X; c6 e4 b, ^) P create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
# U0 {% A m9 m ^! [/ U# W end
( A5 ]" R' T0 e/ N1 J3 Nend9 F4 U' e7 d( k' A6 ^5 U7 r' T
6 Y8 H, L* b0 {: Y4 L! B但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |