谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);& b/ {: v) C- }- _4 R
begin model initialization function3 ^# }9 k% c# I' l* H& E$ i
create 1 load of load type L_null to P_Creation2! N0 V3 o k3 P1 V Q# ?" O$ F
create 1 load of load type L_null to P_Creation3( Q& Z" t. {. u8 v
create 1 load of load type L_null to P_Creation4
, M5 J4 u5 g. ^6 w$ L) ` return true - y7 T; j, k# d! `
end
2 A/ l% h8 c# l7 N4 N4 H4 ~: Q* ^( u& D6 r
begin P_Creation2 arriving procedure
& g9 U3 D: G( u5 F$ u Q$ o' r- Awhile 1=1 do
, Q9 ]' W X3 @; k- {' {6 L% b/ ]/ y begin+ p9 I2 I; g0 g2 V8 o/ `
wait for 1 sec9 [. H+ U" E) i7 _" m
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)" `4 s! o4 x( t j! V' I- w* a
end# H M3 |7 M" e% S; `+ b
end
0 V9 Y6 {" i% p3 Y+ e$ L& f/ w6 x' N# E9 Y2 {$ E* s6 \
begin P_Creation3 arriving procedure
0 O4 ]4 K5 X$ @3 W# dwhile 1=1 do
3 i, b8 e; ?/ q begin/ j4 V( k' e$ J' w
wait for 1 sec/ w! _+ f: I5 d! e
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)7 m% B2 e8 [; @ ]" m S( Y5 J3 T
end8 J$ t) x+ ~) K
end 7 G/ g, g0 |- a: T
3 x- ^) p; D R2 b
begin P_Creation4 arriving procedure( t' s; Q/ i. |( j0 N7 e
while 1=1 do
( E' q7 A5 H6 [* ?- L begin' J' h* B$ S) f9 U# M7 z5 s
wait for 1 sec- Z K2 M, z |, [4 P( n
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 M+ S* r( }6 q% g9 I$ e$ c end7 T6 w6 D) T, O! E0 F, U) Y, d
end
) U r$ h$ D4 C. l- [2 Q- X0 w, Y- u
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |