谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);/ p3 J# z$ Y9 T# P6 L
begin model initialization function0 Y% T5 ^/ Y7 s$ x, u2 C% O
create 1 load of load type L_null to P_Creation2+ b- {% `. X" A- u3 Z' t
create 1 load of load type L_null to P_Creation3
" V$ j; n% W# x3 Q5 H0 b4 I create 1 load of load type L_null to P_Creation47 ]7 i. |4 p) V% W9 K( P
return true
1 S6 Y' G1 L) D; Xend
+ U! p; S, S1 v0 b
1 I$ B4 n+ e2 [, [1 M# T) abegin P_Creation2 arriving procedure
0 t( K3 S0 h6 O. A6 y& k+ Z- H- `# Hwhile 1=1 do
- `' g2 c S9 y$ N, O begin
# }% |* N% w9 C0 z wait for 1 sec+ E% Z; Q, v# U* E0 S. r
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ z8 b4 \. C, D+ P' k
end
- ^3 E" \2 u. T; Yend5 r/ Z) m$ V. A7 g
7 A; _- c: B* V- C8 ?# `( O, Obegin P_Creation3 arriving procedure
* N. M6 c( ?1 gwhile 1=1 do
& m% x3 W; ?% y I. D! K begin. I5 `, a/ {9 B" Y! G0 _- Z, R
wait for 1 sec
9 p4 m z" X- t5 u create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
3 D- Z: p) c7 a3 v7 g2 h end }& F! Y; }0 x# {
end
! n) D) L- S+ h, t% \
" ~' @% a8 @6 X' ]begin P_Creation4 arriving procedure
% u8 Q8 f- @# _0 P7 L; p% B8 nwhile 1=1 do( O8 V4 I" m9 o, g4 m* I. B5 @
begin# f2 U& X+ L3 K
wait for 1 sec
. E: S) r$ i) p' P, K create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 e c- L" V, q+ j' t- c. `9 C# c
end
+ Y( h3 L$ K' W/ bend. [# J P8 [( A5 `
3 U: K4 L+ |: o+ b( U1 r但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |