谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( }; `8 E, o: y
begin model initialization function
+ {8 p; s* H) w, ^ y create 1 load of load type L_null to P_Creation2
, l! r; _7 Q/ M C, N! o' g' Q* Q create 1 load of load type L_null to P_Creation3
) Q# O0 Q5 _9 y create 1 load of load type L_null to P_Creation4- p+ p( b5 { ~3 t
return true
' S2 D/ t3 E3 h$ bend& t+ N% ^, U0 z( s: V# ~+ T
! ~9 K* y; q6 ?8 V8 C
begin P_Creation2 arriving procedure/ q" E0 O9 b% o
while 1=1 do
7 i, m- {0 }) ]+ `9 q$ a begin1 l3 z+ R* a" c- L, R
wait for 1 sec
( r+ E' h$ J9 c! m' ]! | create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ |4 g, d& ^2 v! ~0 C$ }8 ^ end; i* l5 m8 l% f' V7 _
end1 r- M X/ p$ T9 y; T- }3 ?" x5 h
1 a- U# }1 ~( f. q1 L9 Z
begin P_Creation3 arriving procedure
7 w# r% l8 X8 A Z% [* swhile 1=1 do
0 j6 P2 }( `/ ]. V$ S begin
( w9 F: }* l7 S wait for 1 sec
- G) T) U0 \' Q$ j9 n: m0 a create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* k6 Y9 [- G9 z8 c2 l8 w end: l5 S. m" p5 k2 r4 d& x
end 0 I# g7 \- i6 N0 ]$ [3 D" N
2 i; c2 }7 y1 ?/ ?9 p; {6 cbegin P_Creation4 arriving procedure; z) Z1 g. o6 V% z1 L9 T8 C( x
while 1=1 do
. K; e( q! l0 [( k( e* u begin. @$ ?# i1 x% p0 I: O8 g
wait for 1 sec! a& t( x. v$ P* \4 |/ M
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ y- r0 n9 B& l, g
end: N. W( E" e; `6 `9 [# o
end
: [ g+ G9 u2 I! L( o0 q V3 X" l$ R
# r4 K8 G7 `6 K1 c# @! ]0 A8 I( \但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |