谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( @+ u2 |" S# p6 ^) ~$ l
begin model initialization function
* F. H0 n0 {& O, c create 1 load of load type L_null to P_Creation24 g& q% T, D9 { e- b
create 1 load of load type L_null to P_Creation3, D* R3 ], A# Z( u* c/ J
create 1 load of load type L_null to P_Creation40 c# n; F* }. T
return true 3 C0 p2 I! @( N$ Z
end+ V6 p3 V+ C) t' W( X9 H0 k
( u8 p G7 f* k: s$ o6 |begin P_Creation2 arriving procedure0 {) e, C( h' V! d- A( O! x4 [
while 1=1 do; C. n% g* l" Z# {; Y% E% B
begin. \& g" T9 d5 b6 r$ v
wait for 1 sec
* i5 n! I7 G& N+ N$ S create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& T4 A1 G& ]" b/ [: Z" [ end
5 T2 h9 k, X; Lend; v# n( C% v1 d' O5 p0 S; K
h* I9 q% {0 mbegin P_Creation3 arriving procedure, S! Z: |5 y5 X7 m" Z$ z% G/ `
while 1=1 do
4 x \$ ?* M( N- r begin& c& n9 |0 P9 N
wait for 1 sec
2 X8 q+ y, S" V: p- K2 e# m) N9 _ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 r% [, u0 T- Y2 F
end q' C; V7 }8 K- w% f8 j6 F5 o
end
+ `, C3 D# N6 s- \% Q9 ]7 Z& h/ H/ H5 S& p
begin P_Creation4 arriving procedure* l! i3 E- ~3 `1 P0 _
while 1=1 do5 U" K3 R+ N3 m% `' u
begin$ |7 {$ W, K, Z
wait for 1 sec! `% `2 Z$ u4 Y- ]! `: U
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: P7 w; r/ W0 d end/ L3 |5 G; o; X7 k5 O: b, u
end
1 y' |3 I& m- v+ V2 L' A5 ^0 n2 J) Z( Z" p
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |