谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);/ ~" `6 y: c% R
begin model initialization function
6 ?6 J6 t% I+ d( \7 h% R create 1 load of load type L_null to P_Creation2
7 U @ c5 p6 F( l- y create 1 load of load type L_null to P_Creation3
; @1 Z3 n, T8 g9 S create 1 load of load type L_null to P_Creation4
' P) J, J* n" z& V0 ~ return true 5 g& L+ S+ P2 v3 q2 S9 L
end9 K# c$ G' {0 Y) Q
" P" Z5 u4 ?" d; [) ~* abegin P_Creation2 arriving procedure1 I, P' o5 j# {0 H7 @/ j
while 1=1 do
0 P* l$ y( E% I( `* Y! V4 } begin# V5 J0 ~6 h4 P4 q& _0 ?+ N2 Z
wait for 1 sec& M3 r' S, t0 v/ R
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
|. \5 h1 P; c) U) R end
' \! Q1 A! @# f( gend
# \. M2 u: L2 ~3 ^, ]; f+ E8 T, x3 R1 e
begin P_Creation3 arriving procedure, I$ s6 ^, K1 H9 r1 o3 _* P% E
while 1=1 do" L8 V; |& T7 E' N6 P
begin# T6 ~9 w' z" f
wait for 1 sec
( X1 R( K/ a( ]7 b create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 k, ` F [: j8 O6 [ q7 |+ @4 g! E
end; w2 R# V, {$ T L. s
end 4 V0 m( h8 j, W" l9 ~
7 K% _! V! ?; e* @9 @$ y8 `
begin P_Creation4 arriving procedure" R" U+ M0 T, H4 f# Q
while 1=1 do1 L8 O3 P4 t! D
begin( n2 l. ]7 O! L
wait for 1 sec1 C. y- @% i; S+ R1 ~
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
; u) y+ Z1 E# j0 f: K end6 G4 B/ ?' W3 P: M8 E1 e
end
8 s( C( O* J, a) N% i3 v- w6 W! f8 y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |