谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);: v5 c/ U1 k7 \
begin model initialization function
! h& W/ f6 a l6 d$ Q create 1 load of load type L_null to P_Creation2
" G8 G0 g. I" Y* e- p" b0 Y create 1 load of load type L_null to P_Creation3
- Q$ z6 K" ~8 B7 D: i create 1 load of load type L_null to P_Creation4
1 _- p' B: m9 @# V8 p h( C1 @ return true
6 w5 w0 ~: t+ e8 V% V1 oend: N& D/ ]1 g. `! P' A- `7 @) s
O9 ?6 ]1 T3 k+ L! Y
begin P_Creation2 arriving procedure
X7 R4 B# ]6 G1 Y4 |while 1=1 do
4 Y2 m$ X" L- {2 a begin
" q+ g' C: ? W T' {* I( { wait for 1 sec: s) Z' `) M ?: e" f1 x
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die); d, U, o- l0 Z5 ~/ |3 v% s# L) Y
end7 j+ T+ U {3 }
end
& L9 T% p0 M. w% t% o0 V
* l4 N+ X- U5 |! _0 M2 @2 Vbegin P_Creation3 arriving procedure
( j: o& ^. g: r( k: Swhile 1=1 do0 w& F0 x: M3 C# D: X
begin" h$ ?6 z1 _6 S- k4 Z# j" a
wait for 1 sec
6 d0 C9 Q2 n( d create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
2 }7 g7 u0 t; f end
& c M) Q( E- ]end
+ x( {( U1 Z# V+ c. j
. k# A, @' y, p U7 |begin P_Creation4 arriving procedure
+ ?) S2 F$ b+ [1 ]& Twhile 1=1 do
. ]! Q5 W* U8 ^ f7 t0 F; A) \. {- R begin$ Y* K1 }, j/ e8 ]1 Y9 J( u5 `
wait for 1 sec
1 W$ S0 L7 `6 O M: W1 D' {, B create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
6 M6 I6 {$ J v5 ^" n; w end
, i3 o' v9 q% u0 } nend
* w! T! j2 q. g z$ Z, X5 \/ }, @( a) A! b% K
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |