谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);9 x7 T, n0 R" |9 m7 v# {( s
begin model initialization function
4 D2 Z! ]7 l& W+ y$ ^ create 1 load of load type L_null to P_Creation2
; {* z) z, g# E! C create 1 load of load type L_null to P_Creation3 N+ Y& O0 {% m4 _0 v! T
create 1 load of load type L_null to P_Creation4
, P6 U8 H6 y$ k, Q7 _0 Z return true * }% l5 g: d7 W4 d% L
end
: M- c4 W. f7 v5 w) u3 Y
Q2 U& G( A O* _. _+ Z- obegin P_Creation2 arriving procedure
/ g# }8 e% L( n# |: P. O! z( y3 fwhile 1=1 do
9 L) ?8 |: g/ d begin) U0 x- ]% y& E0 F8 b* ]3 p
wait for 1 sec/ i4 E: K8 m6 r6 `6 N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 _. K+ X8 Z: _# L. d8 W end
$ ^6 {- }" ]; D+ Vend9 l m$ e9 r) \8 }$ S: A
& ]4 }/ Z$ g/ A9 o* q0 V/ u: F7 L/ J
begin P_Creation3 arriving procedure9 V* C' U1 U& g' v3 R! h2 R
while 1=1 do' j/ a2 b6 V2 f" @
begin& D' l O! n( \% N& I4 V
wait for 1 sec
1 A7 L7 z3 K, C create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# J+ F+ n. w" G1 { ] end- w* R6 H- N2 K
end
, \4 [; C) n% ]! C, t; d: v4 `5 W! m( h G5 W- K5 X
begin P_Creation4 arriving procedure$ A4 i3 m" J. N; H2 o
while 1=1 do2 R) \7 J+ m# ~2 s
begin( }8 q+ S! G/ q7 o6 k! F
wait for 1 sec
( D$ h0 Z; A# f- b create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
7 V, o& n3 z, [1 S) h4 U end( w4 R7 ]1 k7 g) U9 N& `5 A W
end2 v2 w* r4 m; D
) j; \* z! R; l+ E) Q# i但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |