谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' I2 w K# W: A' F! O% p" d6 z" A
begin model initialization function( o. I: s8 y7 L
create 1 load of load type L_null to P_Creation2* Q" |$ B3 ^( f* g) }, i
create 1 load of load type L_null to P_Creation3
" a1 W# x. b, i2 ^ create 1 load of load type L_null to P_Creation4* N/ M$ m4 A8 g$ x
return true ; V5 r* U4 `) V4 a
end2 l% ]' a) M9 T
* S6 o1 a! z" N% ^# ubegin P_Creation2 arriving procedure% k$ G% A+ m7 }+ G# F3 `
while 1=1 do
( P% S/ h$ n. b8 s. X begin. ^8 s" d: j6 z
wait for 1 sec, z* e" M" @- g& L; @
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
( w" s0 `% e6 ] end
. |: W% C: _; U2 U: h, E8 |end( p, w' L5 S: F2 L+ G, d. G
& J0 B8 E! ~% u6 E i- tbegin P_Creation3 arriving procedure
8 @: ^, Q9 v1 T! S7 i) q( `: Swhile 1=1 do! g& b+ l3 G- [, _3 }7 N
begin$ R8 i3 X# H, s
wait for 1 sec3 i1 p2 O/ |. J" H! O+ o0 G+ ]
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# \9 b$ S' y% J7 E% f W1 N( J end. G) [# W7 }$ @+ }8 v
end ) c: h+ Z! N4 Y p$ R: o, b
4 T5 @( |0 ~" q6 Ibegin P_Creation4 arriving procedure
. ~& s( i6 r* s7 j0 e) h% gwhile 1=1 do# {) n+ `, D7 |! b+ p0 X5 @% s+ ]
begin
( J- x& I: [* T) s wait for 1 sec
8 ]4 q: r' Z) l n8 R* u7 X create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). Q+ H _7 n H, c, ~
end* u" V' h( ~& b
end1 V! |( W* w; S
' ]1 i$ ]" Q) [0 F- ^3 h
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |