谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( n+ u" x; \0 {2 j
begin model initialization function# l, j4 C3 O" ?9 U# z: |/ P
create 1 load of load type L_null to P_Creation22 T" `$ K3 W |7 t
create 1 load of load type L_null to P_Creation3% K4 i9 ?/ N: K3 h$ t
create 1 load of load type L_null to P_Creation4
9 T1 w& w! A2 q/ _5 q" ^0 Y return true
; n, z$ D/ m* a% |3 Z5 Fend+ n6 R# r9 \$ Y$ a4 {
7 z& I6 Z7 l5 y7 x8 X5 L8 D. T
begin P_Creation2 arriving procedure0 n! q( r( C9 N* s$ b R- K' P
while 1=1 do
' Z, Y3 S4 X. o# n2 g* E begin! `4 j- k5 Y8 B% ?* d, S. K% {& Z
wait for 1 sec6 C! ] V9 P5 X1 D1 A3 ]( v
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- Z7 v O6 }) e3 u% @, P9 e4 q9 Q" |2 p end
$ K! |4 ]2 j( d6 e) W+ ?& H* cend
3 O$ O9 K. t. Z8 M4 t- ^" w0 V; c5 t) \0 P+ a: a5 }* d) I# h
begin P_Creation3 arriving procedure; e3 g, Q. S) I) V: N& e9 M
while 1=1 do
8 g! \9 h# D h begin: `+ y" H9 ?$ k7 M$ u0 z; ^
wait for 1 sec4 @, z, y* O( R W( ?. U9 V
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
' j' q% y% T+ H1 P end" s/ W& t1 y5 p2 e# C( w: _
end
2 ~& M6 ?+ i( y1 C% y, s/ `6 G R F1 U- ~0 H8 p/ v
begin P_Creation4 arriving procedure
1 S+ Y: Y; |& I& V( J6 i; Hwhile 1=1 do- k7 b, a% E) @4 M' D
begin& J0 g0 _" C( P9 q
wait for 1 sec& n0 V6 E. r+ a* h# S3 }0 _) B! v9 M, a
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)* A, V( n' @8 A5 m2 ?
end) }# A6 y) X. C% Z
end
+ P- m' ^1 S- V# u
. _5 n- W1 k% q4 G$ @但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |