谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ o, O& O; _5 r, V/ D1 _' S
begin model initialization function. w/ x. d2 a5 R3 w2 G: {, C: b" u
create 1 load of load type L_null to P_Creation2, R& \7 f( ~2 j
create 1 load of load type L_null to P_Creation3% `; t9 G5 v4 x2 X( q
create 1 load of load type L_null to P_Creation4; }8 g! U1 z1 ]' J
return true $ }: Y2 }; o- |$ _+ G) _" \
end
) V1 t x* [4 Y) Y$ P( k, d1 \0 t. r7 }- u+ A9 w0 D, {
begin P_Creation2 arriving procedure
, Q! q1 h; [8 \; n7 rwhile 1=1 do
2 g3 x" r1 b5 }/ I begin
* ]7 s6 V! G: M! t( t S- \ wait for 1 sec( h6 S+ z9 y- e! M; g- Z% g
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 u5 t9 O' U) v# }- I; w$ a9 R end
& N* |4 H3 K& D! m: s. t2 ^% Fend
! Y/ J7 ]0 ?* S* u3 T+ W2 G
" S! a1 o( ~* H7 e, mbegin P_Creation3 arriving procedure
- \, S5 w3 D3 i$ ?/ Pwhile 1=1 do
( P- r( G) x5 h& | begin7 \* w0 u M) V- j8 k
wait for 1 sec4 o1 l6 K% s" X" L( d7 [6 h- v
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)( W5 {' R/ K7 o; y
end
+ o- v0 k; Q% d. f2 Gend 1 T5 r7 L: W2 s+ C( k( ~$ a' j
1 Y$ J7 `4 u# y
begin P_Creation4 arriving procedure
^7 y' m9 z3 mwhile 1=1 do
& m& K0 h; s- H" i3 z begin) I9 V, M; u% ^7 b
wait for 1 sec; M u, Z7 f, o
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
! w; g: I2 m+ A& g+ h9 q/ z end
7 y- w. ~: L$ \3 [& [2 J+ J Uend+ L$ L- U4 P, {9 `9 B4 l
) }) v" F6 R$ i0 X
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |