谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. b% m% w8 y' P7 ~) Fbegin model initialization function2 T% ^/ ^1 m' r6 Y" F* a) T
create 1 load of load type L_null to P_Creation2
, `9 B. Y; _2 }4 z& n3 \* @ create 1 load of load type L_null to P_Creation3
7 w \5 Q6 r1 S$ T create 1 load of load type L_null to P_Creation4
! M. |/ C) R! M9 @$ d, \; D- a8 x return true
% K$ E4 E, ?; c: n) [% h: f( }end
0 m1 b6 F9 _9 b. Q2 J
! s4 }! a- q+ Gbegin P_Creation2 arriving procedure
) C h0 _, @ I$ N) L4 M5 ^while 1=1 do
8 E, J9 Z0 |% \ o7 A begin3 B" u+ m6 f7 ~( Y. R0 |& R [( P
wait for 1 sec
p+ ^* t Y/ H! j; z0 _& S' U create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)6 h& {4 `# e: A, T, i. Q
end
5 ?4 D3 Z% _6 d; ?' W) Jend! x# s, B2 a6 r- X$ V
1 w2 L, u9 a4 l0 q/ @
begin P_Creation3 arriving procedure
" M: g3 T* T. |while 1=1 do
) m* y+ s& r" p- P begin$ L. Z( i) u: r- c4 T
wait for 1 sec4 }& k$ ~ }* j+ d" j" Q0 |& [8 l
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
4 p0 J! K* ?. F$ U2 G! D end
; U3 G; c' e( i8 E* rend , ~! p3 j: v6 a
* Y* g5 S$ u7 ]- n6 l# Kbegin P_Creation4 arriving procedure
# H6 D: d7 ?1 w8 Awhile 1=1 do
/ M/ ?' c* |' }7 b4 e' E5 A, R begin9 R+ Z: g3 X$ v9 e* {3 s5 j
wait for 1 sec# b) _% c+ O& t6 t
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 U# F3 l: P1 o1 n1 O end/ H$ q% _1 G, U& K- n6 z
end
* `/ V: M0 t6 R, e& m9 _; K% |1 w: ?& \; u7 \: _ H6 V) L7 Z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |