谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 u! \$ W& g& L! b7 s, h/ t* H* W% ebegin model initialization function3 h( V6 ^& A2 k
create 1 load of load type L_null to P_Creation2
( H/ T% Z0 W/ Q$ o- V |) v0 i3 o. f9 ^ create 1 load of load type L_null to P_Creation33 `- O R8 q* o: L2 f& f
create 1 load of load type L_null to P_Creation4
, O* C' u" o- ? return true & s( y8 N4 K& l( M
end% f5 v" k* w( |: y* l
! c' l5 C. D) x
begin P_Creation2 arriving procedure
: }, Y. u% L1 Z0 K# g8 m- jwhile 1=1 do
" j% S" A: Q [, V) A begin) W6 E! Y: ?& ?7 U! J7 K
wait for 1 sec d0 ~( q: T/ A9 ^/ n; ?
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
m+ E6 r v! A) w end
# J0 |: F+ @( pend# S4 x7 l. w1 r _3 C# h
, |' y7 g2 T4 | X4 sbegin P_Creation3 arriving procedure
. `+ v, j* u5 A, w$ y8 u: @" v) |) K5 ywhile 1=1 do" w' q7 b6 i8 R, P# F, }) n/ N# W' f" t
begin, D8 o$ O; ~9 X) A( b& a) n
wait for 1 sec( P' T: M6 r9 t9 `9 l
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ X1 K+ `5 P5 \9 I" ^/ A% P
end3 |/ i" ?, L# S$ {' @
end . F1 k* H% B* r' ^4 j: r
, F C9 N! u$ u2 h* n) Xbegin P_Creation4 arriving procedure) W! _# D6 F; j4 w+ D
while 1=1 do' o/ n j! J* T! w3 H. T) R* Q
begin
% ^2 k5 v0 P4 l. q' ]% K K1 i5 C wait for 1 sec1 R3 R+ M3 V. [3 Q2 s; l* e. z" k
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
9 B% ~6 ]9 [) d' v5 o end
' q$ h }; ~: z& Rend
, \* V' w9 O; z9 Z6 W5 ? E5 ^
0 @( C" x/ r2 ~( z1 h" S1 q/ N但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |