谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);1 V: G5 t, c5 J& |; M! x
begin model initialization function/ W0 I8 `% k& u$ d0 ^2 p% H/ E& p
create 1 load of load type L_null to P_Creation2
7 \. |) v S7 L0 m8 Q* ? create 1 load of load type L_null to P_Creation3# \9 b4 y0 \7 {+ b/ v
create 1 load of load type L_null to P_Creation46 ^% }8 V" Z8 V6 c# k9 l
return true
8 A' q/ o- d- C9 D* J9 Q/ Wend2 S' Z; d! Q, \- h
1 w- e/ Z5 {0 c P
begin P_Creation2 arriving procedure
' y7 W. D6 v9 \. Qwhile 1=1 do, ^0 f( c2 k+ Y1 e: h
begin$ F: V, r; v1 a7 u
wait for 1 sec
- x3 W- z" i, g4 R$ g create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
+ G' i$ k3 I1 | end
, F6 J. h, @% v1 O0 T2 ?end" d5 O- `1 l2 Q+ F3 T4 s
" z. ]( a) v4 d$ N. ?0 r
begin P_Creation3 arriving procedure- D5 {& G4 c2 I% P+ w
while 1=1 do/ h$ h7 M2 V& F
begin
- [1 B) S+ ?1 i wait for 1 sec# \" J( [$ D) X7 l( C+ K# k
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# O h8 U2 u3 e! A4 S! w end: M3 |, ~9 E0 e G* T+ |, p
end
) v0 r" ]+ @3 W
0 b, d8 N" v, f. J& K- rbegin P_Creation4 arriving procedure
' t' [* C$ M& {, ?4 e, h" twhile 1=1 do
7 L* q% X& V0 F% u" h/ h begin
3 n! U0 B3 U/ J wait for 1 sec( z4 d) K# o, J: `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 V- `' C5 W; m% e& [ end
. r# c+ |$ l- Hend+ h' B$ d8 H- N- \- ?( S
; l0 p% y& |) \. Y- [, ~* S但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |