谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); W p' u% {+ `, [7 \) V+ W$ I
begin model initialization function2 A/ [$ Y @1 q1 {3 p6 y- Z# ]& n
create 1 load of load type L_null to P_Creation2
* W+ {6 ^! W: n- l3 s, j7 Y' e3 x create 1 load of load type L_null to P_Creation3
" p3 D4 }9 G( U+ ^8 o create 1 load of load type L_null to P_Creation42 I8 W1 u3 @" U1 d
return true
- U# X# q, h* o& S2 \5 @9 e! {end0 v) v& @9 d4 M( J
4 [" |( O2 \8 T- p
begin P_Creation2 arriving procedure" R o6 W! y' ?" j/ s
while 1=1 do4 |6 ^: r7 F2 b' W
begin
1 y, w# o3 Q- ~1 C8 i+ q wait for 1 sec5 J k( `6 g6 q. J2 p. A
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# v" s6 D, v( |: l* G7 `! c
end
% m$ C ~, R) [: wend
; o+ K; I# g! h8 }) ^& V2 ?( ^3 y5 h- ^ [& u+ E& a( E# n
begin P_Creation3 arriving procedure
: |6 |. j( K8 l5 j& ~while 1=1 do
( i5 h1 e* W9 i7 B0 k @; @ begin* M. P/ t0 L& Q0 Q9 K# R7 G
wait for 1 sec
3 o Y% g! q1 P2 i5 ?, I create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: p2 b2 [1 @% j* i0 ~ end
4 a6 l; {3 K( w2 j0 Eend 1 }/ S; F, c: A- O. q# g/ d
- S# C( R3 z2 g* T6 \
begin P_Creation4 arriving procedure
! l% [: P* L8 `7 x, ?9 r! ]while 1=1 do
9 |3 z& W8 H4 [# P' ? begin! n8 F2 e3 `* t
wait for 1 sec& W7 O5 H5 w7 U" M: X
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 B+ t& @7 l: d- Q/ n! X* n end* _6 U* p' }# A6 g3 E
end% |" s& V, V+ \0 J
. M+ y* _0 k H6 a+ y& H/ o) E1 i
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |