谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' u7 x' l3 ^0 W8 a
begin model initialization function) l6 r& I* u# }' S
create 1 load of load type L_null to P_Creation2& R" w4 H) {* w- C( W
create 1 load of load type L_null to P_Creation35 V. e1 \ Z3 m; B
create 1 load of load type L_null to P_Creation47 i2 p G. A; ]6 Q- p* [, u
return true
+ S# a8 y* E5 n. z5 ^end
{2 j6 e. Q; T0 y3 n3 r2 V# p, }0 L9 q$ I: l( R
begin P_Creation2 arriving procedure5 \& d( `* J* r$ }6 @" o# w' p
while 1=1 do
9 F7 V( M# S. s d3 q: `9 C8 k begin
* }( S6 N- S4 I, ?1 e$ Y5 e wait for 1 sec3 z5 n' @% `4 o+ z' W4 s% x; V& E
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
$ u" C7 f* m9 U W7 J end2 g0 S3 V6 m; z+ g9 b
end. f) @8 ?+ W* N2 D) J( ?
, P/ l( o# E- R& z* h5 C8 X( |
begin P_Creation3 arriving procedure! m# N' a# k6 H1 a+ }% R1 {# [
while 1=1 do' \5 a8 L8 c8 X
begin
" m3 v% ]& f' P, }, Y0 h wait for 1 sec
; U( C$ T7 ?$ s create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* y! ^+ | f1 { d' c* d j end" U0 ]: h8 T# @: e& Z
end f, D( d- O0 U& n; R
+ ^0 u3 R* s: i+ ~' q! X6 kbegin P_Creation4 arriving procedure
* M+ f# I) | awhile 1=1 do6 P9 J" p; A2 u8 T. o# r Q
begin
, g( z, J4 J9 f wait for 1 sec+ O. {4 v. p( ^5 c4 h
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 o2 K) `, W/ ] p) g1 g
end
8 b4 B# A0 u% Kend0 E, N. q& u, }. |. p$ g) q+ c/ c
* P1 j! d) g. u; i2 C8 i: a; \
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |