谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 Z6 v5 D0 j+ Z9 r7 O' hbegin model initialization function1 ~6 _# E/ t7 T* v9 f" j
create 1 load of load type L_null to P_Creation2' h1 N! \4 V% }; A$ X5 E
create 1 load of load type L_null to P_Creation3
4 Y5 _, _3 X$ @3 y) F" [ create 1 load of load type L_null to P_Creation4$ k {9 @. _+ K3 z' M7 f2 m
return true
! e9 G0 l" ~. H8 oend
* c8 Z$ L0 S# x+ I% s
: S2 P& e) L1 w* V6 Xbegin P_Creation2 arriving procedure
5 g5 y+ T% R+ a2 W% U, H$ f. [while 1=1 do- G- W- f( W# r
begin
( n' Y1 j/ J, Z wait for 1 sec
) Q* f. D G W4 p$ u create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
: z$ H) @4 ^# l" a! j end- |0 B/ T- L* Y$ p
end
3 ^) Q1 G' _" c; m4 ^+ \
4 A' m9 h* L0 qbegin P_Creation3 arriving procedure
1 g; I' K& w- S' swhile 1=1 do
$ n! {2 i5 F/ k8 p. r6 z begin
7 u5 L( L* l7 r0 _ wait for 1 sec+ Z5 A( V' d3 s4 b) Y, |; A
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: ^% ~- K/ `% V, B. }! D1 s end
+ ?. q& F! _0 i8 D( v3 |end
7 V1 X; v. q- E! S9 c, d% |1 ^& ^6 E; m+ d5 \! l
begin P_Creation4 arriving procedure
0 V: q8 c6 Q: e( Rwhile 1=1 do
" G0 P+ K5 A% k; Y }& X$ _; B begin- V' T, Z! Y0 d
wait for 1 sec7 f: U8 u7 e) n
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)% H/ @9 R( Z6 `; P4 |+ a
end
5 w. z# ?: Y9 v7 [- x0 C5 ?" R) P9 Hend
0 W N! H' P8 c1 R8 N6 i, ~$ T& H
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |